@herbertgao/pi-extensions 2026.9.0 → 2026.9.2

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 (360) hide show
  1. package/node_modules/@czottmann/pi-automode/CHANGELOG.md +13 -1
  2. package/node_modules/@czottmann/pi-automode/README.md +20 -0
  3. package/node_modules/@czottmann/pi-automode/docs/GLOSSARY.md +1 -1
  4. package/node_modules/@czottmann/pi-automode/docs/automode-classifier-flow.md +2 -1
  5. package/node_modules/@czottmann/pi-automode/docs/defaults.md +3 -2
  6. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +38 -2
  7. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/constants.ts +5 -3
  8. package/node_modules/@czottmann/pi-automode/extensions/auto-mode/extension.ts +11 -3
  9. package/node_modules/@czottmann/pi-automode/package.json +1 -1
  10. package/node_modules/@narumitw/pi-btw/README.md +57 -141
  11. package/node_modules/@narumitw/pi-btw/dist/index.ts +466 -41
  12. package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
  13. package/node_modules/@narumitw/pi-btw/docs/workflows.md +74 -0
  14. package/node_modules/@narumitw/pi-btw/package.json +2 -1
  15. package/node_modules/@narumitw/pi-btw/src/btw.ts +15 -1
  16. package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +32 -2
  17. package/node_modules/@narumitw/pi-btw/src/keybindings.ts +330 -0
  18. package/node_modules/@narumitw/pi-btw/src/menu.ts +136 -19
  19. package/node_modules/@narumitw/pi-btw/src/settings.ts +32 -0
  20. package/node_modules/@narumitw/pi-btw/src/side-thread.ts +57 -5
  21. package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +52 -30
  22. package/node_modules/@pi-plugins/fast-mode/README.md +5 -3
  23. package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
  24. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +20 -55
  25. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  26. package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
  27. package/node_modules/pi-lens/CHANGELOG.md +1072 -0
  28. package/node_modules/pi-lens/README.md +3 -0
  29. package/node_modules/pi-lens/config/biome/core.jsonc +11 -2
  30. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +13 -1
  31. package/node_modules/pi-lens/dist/clients/actionable-warnings-logger.js +2 -9
  32. package/node_modules/pi-lens/dist/clients/actionable-warnings.js +927 -80
  33. package/node_modules/pi-lens/dist/clients/advisory-provenance.js +1 -1
  34. package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +13 -4
  35. package/node_modules/pi-lens/dist/clients/ast-grep-client.js +123 -3
  36. package/node_modules/pi-lens/dist/clients/ast-grep-rule-manager.js +60 -5
  37. package/node_modules/pi-lens/dist/clients/ast-grep-tool-logger.js +2 -9
  38. package/node_modules/pi-lens/dist/clients/ast-grep-types.js +2 -0
  39. package/node_modules/pi-lens/dist/clients/bash-file-access.js +133 -3
  40. package/node_modules/pi-lens/dist/clients/biome-client.js +9 -2
  41. package/node_modules/pi-lens/dist/clients/blocker-freshness.js +14 -6
  42. package/node_modules/pi-lens/dist/clients/bootstrap.js +509 -73
  43. package/node_modules/pi-lens/dist/clients/bounded-cache.js +152 -12
  44. package/node_modules/pi-lens/dist/clients/bounded-pid-file-lock.js +1 -1
  45. package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +59 -9
  46. package/node_modules/pi-lens/dist/clients/bundled-resource-health.js +113 -0
  47. package/node_modules/pi-lens/dist/clients/bus-events-logger.js +3 -11
  48. package/node_modules/pi-lens/dist/clients/cache/rule-cache.js +31 -4
  49. package/node_modules/pi-lens/dist/clients/cache-manager.js +105 -6
  50. package/node_modules/pi-lens/dist/clients/cache-observability.js +40 -19
  51. package/node_modules/pi-lens/dist/clients/cargo-manifest.js +422 -0
  52. package/node_modules/pi-lens/dist/clients/cascade-logger.js +2 -9
  53. package/node_modules/pi-lens/dist/clients/child-unref.js +1 -19
  54. package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +13 -3
  55. package/node_modules/pi-lens/dist/clients/complexity-client.js +16 -5
  56. package/node_modules/pi-lens/dist/clients/config-core/deny.js +221 -0
  57. package/node_modules/pi-lens/dist/clients/config-core/index.js +50 -0
  58. package/node_modules/pi-lens/dist/clients/config-core/merge.js +357 -0
  59. package/node_modules/pi-lens/dist/clients/config-core/normalize.js +340 -0
  60. package/node_modules/pi-lens/dist/clients/config-core/process-spec.js +248 -0
  61. package/node_modules/pi-lens/dist/clients/config-core/provenance.js +164 -0
  62. package/node_modules/pi-lens/dist/clients/config-core/records.js +218 -0
  63. package/node_modules/pi-lens/dist/clients/config-core/resolve.js +125 -0
  64. package/node_modules/pi-lens/dist/clients/config-core/safe-object.js +78 -0
  65. package/node_modules/pi-lens/dist/clients/config-core/schema.js +165 -0
  66. package/node_modules/pi-lens/dist/clients/config-diagnostic-codes.js +281 -0
  67. package/node_modules/pi-lens/dist/clients/config-locations.js +160 -0
  68. package/node_modules/pi-lens/dist/clients/config-resolve.js +789 -0
  69. package/node_modules/pi-lens/dist/clients/config-schema.js +234 -0
  70. package/node_modules/pi-lens/dist/clients/config-warn.js +407 -0
  71. package/node_modules/pi-lens/dist/clients/dead-code-client.js +19 -14
  72. package/node_modules/pi-lens/dist/clients/dead-code-logger.js +2 -6
  73. package/node_modules/pi-lens/dist/clients/deadline-utils.js +178 -0
  74. package/node_modules/pi-lens/dist/clients/debug-handles.js +2 -2
  75. package/node_modules/pi-lens/dist/clients/debug-heap.js +3 -3
  76. package/node_modules/pi-lens/dist/clients/deferred-lsp-work.js +106 -0
  77. package/node_modules/pi-lens/dist/clients/degradation-ledger.js +113 -7
  78. package/node_modules/pi-lens/dist/clients/dependency-checker.js +8 -19
  79. package/node_modules/pi-lens/dist/clients/diagnostic-dispositions.js +1 -1
  80. package/node_modules/pi-lens/dist/clients/diagnostic-line-freshness.js +12 -9
  81. package/node_modules/pi-lens/dist/clients/diagnostic-logger.js +15 -5
  82. package/node_modules/pi-lens/dist/clients/dispatch/collect-later-tier.js +0 -4
  83. package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +162 -44
  84. package/node_modules/pi-lens/dist/clients/dispatch/fact-store.js +97 -0
  85. package/node_modules/pi-lens/dist/clients/dispatch/integration.js +27 -8
  86. package/node_modules/pi-lens/dist/clients/dispatch/lazy.js +0 -6
  87. package/node_modules/pi-lens/dist/clients/dispatch/pending-runner-findings.js +1 -1
  88. package/node_modules/pi-lens/dist/clients/dispatch/plan.js +0 -3
  89. package/node_modules/pi-lens/dist/clients/dispatch/rules/high-complexity.js +2 -2
  90. package/node_modules/pi-lens/dist/clients/dispatch/rules/high-fan-out.js +1 -1
  91. package/node_modules/pi-lens/dist/clients/dispatch/runners/actionlint.js +0 -1
  92. package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +383 -27
  93. package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +0 -1
  94. package/node_modules/pi-lens/dist/clients/dispatch/runners/cpp-check.js +4 -1
  95. package/node_modules/pi-lens/dist/clients/dispatch/runners/credo.js +0 -1
  96. package/node_modules/pi-lens/dist/clients/dispatch/runners/cue-vet.js +0 -1
  97. package/node_modules/pi-lens/dist/clients/dispatch/runners/dart-analyze.js +0 -1
  98. package/node_modules/pi-lens/dist/clients/dispatch/runners/detekt.js +0 -1
  99. package/node_modules/pi-lens/dist/clients/dispatch/runners/dotnet-build.js +0 -1
  100. package/node_modules/pi-lens/dist/clients/dispatch/runners/elixir-check.js +0 -1
  101. package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +0 -1
  102. package/node_modules/pi-lens/dist/clients/dispatch/runners/fact-rules.js +0 -1
  103. package/node_modules/pi-lens/dist/clients/dispatch/runners/fish-indent.js +0 -1
  104. package/node_modules/pi-lens/dist/clients/dispatch/runners/gleam-check.js +0 -1
  105. package/node_modules/pi-lens/dist/clients/dispatch/runners/go-vet.js +1 -3
  106. package/node_modules/pi-lens/dist/clients/dispatch/runners/golangci-lint.js +0 -1
  107. package/node_modules/pi-lens/dist/clients/dispatch/runners/hadolint.js +0 -1
  108. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +0 -1
  109. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +1 -2
  110. package/node_modules/pi-lens/dist/clients/dispatch/runners/htmlhint.js +0 -1
  111. package/node_modules/pi-lens/dist/clients/dispatch/runners/javac.js +0 -1
  112. package/node_modules/pi-lens/dist/clients/dispatch/runners/ktlint.js +0 -1
  113. package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +0 -1
  114. package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +0 -1
  115. package/node_modules/pi-lens/dist/clients/dispatch/runners/mypy.js +0 -1
  116. package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +14 -18
  117. package/node_modules/pi-lens/dist/clients/dispatch/runners/php-lint.js +0 -1
  118. package/node_modules/pi-lens/dist/clients/dispatch/runners/phpstan.js +0 -1
  119. package/node_modules/pi-lens/dist/clients/dispatch/runners/prisma-validate.js +0 -1
  120. package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +6 -3
  121. package/node_modules/pi-lens/dist/clients/dispatch/runners/pyright.js +7 -4
  122. package/node_modules/pi-lens/dist/clients/dispatch/runners/rubocop.js +0 -1
  123. package/node_modules/pi-lens/dist/clients/dispatch/runners/ruff.js +1 -2
  124. package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +1 -3
  125. package/node_modules/pi-lens/dist/clients/dispatch/runners/shellcheck.js +1 -2
  126. package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +0 -1
  127. package/node_modules/pi-lens/dist/clients/dispatch/runners/spellcheck.js +4 -3
  128. package/node_modules/pi-lens/dist/clients/dispatch/runners/spotbugs.js +0 -1
  129. package/node_modules/pi-lens/dist/clients/dispatch/runners/sqlfluff.js +0 -1
  130. package/node_modules/pi-lens/dist/clients/dispatch/runners/stylelint.js +0 -1
  131. package/node_modules/pi-lens/dist/clients/dispatch/runners/swiftlint.js +0 -1
  132. package/node_modules/pi-lens/dist/clients/dispatch/runners/taplo.js +0 -1
  133. package/node_modules/pi-lens/dist/clients/dispatch/runners/terragrunt.js +0 -1
  134. package/node_modules/pi-lens/dist/clients/dispatch/runners/tflint.js +0 -1
  135. package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +0 -1
  136. package/node_modules/pi-lens/dist/clients/dispatch/runners/trivy-config.js +0 -1
  137. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/availability-policy.js +3 -0
  138. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +3 -67
  139. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +194 -80
  140. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +84 -15
  141. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils.js +0 -21
  142. package/node_modules/pi-lens/dist/clients/dispatch/runners/vale.js +0 -1
  143. package/node_modules/pi-lens/dist/clients/dispatch/runners/yaml-rule-parser.js +2 -20
  144. package/node_modules/pi-lens/dist/clients/dispatch/runners/yamllint.js +1 -1
  145. package/node_modules/pi-lens/dist/clients/dispatch/runners/zig-check.js +0 -1
  146. package/node_modules/pi-lens/dist/clients/dispatch/utils/format-utils.js +2 -2
  147. package/node_modules/pi-lens/dist/clients/disposition-logger.js +3 -10
  148. package/node_modules/pi-lens/dist/clients/effective-config.js +403 -0
  149. package/node_modules/pi-lens/dist/clients/error-class.js +23 -0
  150. package/node_modules/pi-lens/dist/clients/event-loop-hold.js +274 -0
  151. package/node_modules/pi-lens/dist/clients/event-loop-monitor.js +2 -2
  152. package/node_modules/pi-lens/dist/clients/extension-log.js +2 -2
  153. package/node_modules/pi-lens/dist/clients/feature-hints.js +2 -1
  154. package/node_modules/pi-lens/dist/clients/file-kinds.js +1 -38
  155. package/node_modules/pi-lens/dist/clients/file-time.js +7 -2
  156. package/node_modules/pi-lens/dist/clients/file-utils.js +117 -10
  157. package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +50 -13
  158. package/node_modules/pi-lens/dist/clients/format-service.js +6 -2
  159. package/node_modules/pi-lens/dist/clients/formatters.js +385 -104
  160. package/node_modules/pi-lens/dist/clients/freshness-cadence.js +17 -0
  161. package/node_modules/pi-lens/dist/clients/generated-artifacts.js +116 -22
  162. package/node_modules/pi-lens/dist/clients/generation-guard.js +4 -9
  163. package/node_modules/pi-lens/dist/clients/git-guard.js +6 -1
  164. package/node_modules/pi-lens/dist/clients/go-client.js +39 -0
  165. package/node_modules/pi-lens/dist/clients/gradle-ktfmt-style.js +252 -0
  166. package/node_modules/pi-lens/dist/clients/grammar-source.js +3 -3
  167. package/node_modules/pi-lens/dist/clients/hashline-anchor.js +424 -0
  168. package/node_modules/pi-lens/dist/clients/hook-budgets.js +76 -0
  169. package/node_modules/pi-lens/dist/clients/host-edit-normalize.js +5 -2
  170. package/node_modules/pi-lens/dist/clients/host-ports.js +1 -1
  171. package/node_modules/pi-lens/dist/clients/installer/index.js +289 -59
  172. package/node_modules/pi-lens/dist/clients/installer/managed-tool-refresh.js +84 -18
  173. package/node_modules/pi-lens/dist/clients/instance-reaper.js +110 -236
  174. package/node_modules/pi-lens/dist/clients/instance-registry.js +6 -3
  175. package/node_modules/pi-lens/dist/clients/language-profile.js +0 -9
  176. package/node_modules/pi-lens/dist/clients/language-registry.js +599 -0
  177. package/node_modules/pi-lens/dist/clients/latency-logger.js +165 -9
  178. package/node_modules/pi-lens/dist/clients/ledger-bounds.js +34 -1
  179. package/node_modules/pi-lens/dist/clients/lens-config.js +160 -30
  180. package/node_modules/pi-lens/dist/clients/lens-engine.js +33 -41
  181. package/node_modules/pi-lens/dist/clients/lens-events.js +1 -1
  182. package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +77 -6
  183. package/node_modules/pi-lens/dist/clients/lens-map.js +1 -1
  184. package/node_modules/pi-lens/dist/clients/log-cleanup.js +2 -38
  185. package/node_modules/pi-lens/dist/clients/lsp/aggregation.js +3 -1
  186. package/node_modules/pi-lens/dist/clients/lsp/client.js +172 -33
  187. package/node_modules/pi-lens/dist/clients/lsp/config.js +484 -158
  188. package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +1 -1
  189. package/node_modules/pi-lens/dist/clients/lsp/document-drift.js +1 -1
  190. package/node_modules/pi-lens/dist/clients/lsp/edits.js +18 -5
  191. package/node_modules/pi-lens/dist/clients/lsp/index.js +892 -96
  192. package/node_modules/pi-lens/dist/clients/lsp/inferred-project.js +1 -1
  193. package/node_modules/pi-lens/dist/clients/lsp/language.js +18 -177
  194. package/node_modules/pi-lens/dist/clients/lsp/launch.js +2 -1
  195. package/node_modules/pi-lens/dist/clients/lsp/path-utils.js +1 -1
  196. package/node_modules/pi-lens/dist/clients/lsp/pending-aux-coverage.js +5 -18
  197. package/node_modules/pi-lens/dist/clients/lsp/server.js +284 -147
  198. package/node_modules/pi-lens/dist/clients/lsp/session-roots.js +116 -23
  199. package/node_modules/pi-lens/dist/clients/lsp/spawn-history.js +2 -7
  200. package/node_modules/pi-lens/dist/clients/lsp/sync-kind.js +0 -1
  201. package/node_modules/pi-lens/dist/clients/lsp/tsserver-sync.js +14 -7
  202. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/classification.js +6 -0
  203. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/strategies.js +2 -1
  204. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +1 -1
  205. package/node_modules/pi-lens/dist/clients/lsp-document-symbols.js +1 -1
  206. package/node_modules/pi-lens/dist/clients/lsp-mutation.js +163 -21
  207. package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +36 -0
  208. package/node_modules/pi-lens/dist/clients/mcp/analyze.js +33 -4
  209. package/node_modules/pi-lens/dist/clients/mcp/session.js +5 -16
  210. package/node_modules/pi-lens/dist/clients/memory-sampler.js +8 -3
  211. package/node_modules/pi-lens/dist/clients/metrics-history.js +28 -107
  212. package/node_modules/pi-lens/dist/clients/middle-man-analysis.js +3 -5
  213. package/node_modules/pi-lens/dist/clients/module-report.js +21 -46
  214. package/node_modules/pi-lens/dist/clients/mutating-tool.js +651 -0
  215. package/node_modules/pi-lens/dist/clients/mutation-attribution.js +368 -0
  216. package/node_modules/pi-lens/dist/clients/mutation-bridge.js +240 -0
  217. package/node_modules/pi-lens/dist/clients/ndjson-logger.js +247 -24
  218. package/node_modules/pi-lens/dist/clients/observed-mutation-sources.js +101 -0
  219. package/node_modules/pi-lens/dist/clients/observed-mutation.js +1215 -0
  220. package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +70 -28
  221. package/node_modules/pi-lens/dist/clients/opengrep-config.js +5 -1
  222. package/node_modules/pi-lens/dist/clients/package-manager.js +195 -26
  223. package/node_modules/pi-lens/dist/clients/partial-edit-apply.js +359 -80
  224. package/node_modules/pi-lens/dist/clients/path-attribution-telemetry.js +23 -7
  225. package/node_modules/pi-lens/dist/clients/path-keyed-map.js +21 -2
  226. package/node_modules/pi-lens/dist/clients/path-utils.js +451 -15
  227. package/node_modules/pi-lens/dist/clients/performance-report.js +2 -2
  228. package/node_modules/pi-lens/dist/clients/persist-debounce.js +8 -1
  229. package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +114 -0
  230. package/node_modules/pi-lens/dist/clients/pipeline.js +79 -18
  231. package/node_modules/pi-lens/dist/clients/probe-home-state.js +228 -0
  232. package/node_modules/pi-lens/dist/clients/process-bridge.js +66 -0
  233. package/node_modules/pi-lens/dist/clients/process-snapshot.js +68 -0
  234. package/node_modules/pi-lens/dist/clients/project-changes.js +1 -1
  235. package/node_modules/pi-lens/dist/clients/project-diagnostics/extractors.js +1 -1
  236. package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +4 -3
  237. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/jscpd.js +1 -1
  238. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/knip.js +1 -1
  239. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/madge.js +1 -1
  240. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/opengrep.js +1 -1
  241. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/runner-findings.js +28 -4
  242. package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +51 -20
  243. package/node_modules/pi-lens/dist/clients/project-lens-config.js +438 -122
  244. package/node_modules/pi-lens/dist/clients/project-scan-policy.js +3 -51
  245. package/node_modules/pi-lens/dist/clients/project-snapshot.js +52 -24
  246. package/node_modules/pi-lens/dist/clients/python-environment.js +217 -0
  247. package/node_modules/pi-lens/dist/clients/python-provenance.js +639 -0
  248. package/node_modules/pi-lens/dist/clients/quiet-window.js +6 -1
  249. package/node_modules/pi-lens/dist/clients/read-bridge.js +13 -21
  250. package/node_modules/pi-lens/dist/clients/read-expansion.js +9 -46
  251. package/node_modules/pi-lens/dist/clients/read-guard-logger.js +16 -5
  252. package/node_modules/pi-lens/dist/clients/read-guard-tool-lines.js +364 -212
  253. package/node_modules/pi-lens/dist/clients/read-guard.js +26 -2
  254. package/node_modules/pi-lens/dist/clients/recent-touches.js +2 -2
  255. package/node_modules/pi-lens/dist/clients/resource-sampler.js +195 -96
  256. package/node_modules/pi-lens/dist/clients/review-graph/builder.js +155 -114
  257. package/node_modules/pi-lens/dist/clients/review-graph/import-resolvers.js +1 -1
  258. package/node_modules/pi-lens/dist/clients/review-graph/service.js +55 -3
  259. package/node_modules/pi-lens/dist/clients/review-graph/shared-extraction-ir.js +7 -15
  260. package/node_modules/pi-lens/dist/clients/review-graph/workspace-modules.js +10 -74
  261. package/node_modules/pi-lens/dist/clients/review-graph-logger.js +9 -3
  262. package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +19 -3
  263. package/node_modules/pi-lens/dist/clients/runtime-context.js +49 -16
  264. package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +25 -6
  265. package/node_modules/pi-lens/dist/clients/runtime-session.js +184 -32
  266. package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +179 -36
  267. package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +797 -243
  268. package/node_modules/pi-lens/dist/clients/runtime-turn.js +1028 -53
  269. package/node_modules/pi-lens/dist/clients/rust-client.js +31 -0
  270. package/node_modules/pi-lens/dist/clients/safe-spawn.js +33 -10
  271. package/node_modules/pi-lens/dist/clients/sanitize.js +7 -12
  272. package/node_modules/pi-lens/dist/clients/scan-utils.js +1 -56
  273. package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +1 -3
  274. package/node_modules/pi-lens/dist/clients/security-scan-client.js +3 -0
  275. package/node_modules/pi-lens/dist/clients/session-lifecycle.js +1 -1
  276. package/node_modules/pi-lens/dist/clients/session-start-observability.js +79 -0
  277. package/node_modules/pi-lens/dist/clients/session-summary.js +0 -24
  278. package/node_modules/pi-lens/dist/clients/sessionstart-logger.js +12 -3
  279. package/node_modules/pi-lens/dist/clients/sgconfig.js +7 -6
  280. package/node_modules/pi-lens/dist/clients/shared-checkout-guard.js +1 -1
  281. package/node_modules/pi-lens/dist/clients/skills-resolver.js +105 -0
  282. package/node_modules/pi-lens/dist/clients/smells-rollup.js +4 -4
  283. package/node_modules/pi-lens/dist/clients/startup-scan.js +2 -10
  284. package/node_modules/pi-lens/dist/clients/string-utils.js +13 -0
  285. package/node_modules/pi-lens/dist/clients/subagent-mode.js +17 -4
  286. package/node_modules/pi-lens/dist/clients/test-runner-client.js +176 -39
  287. package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +244 -0
  288. package/node_modules/pi-lens/dist/clients/tool-definition.js +41 -1
  289. package/node_modules/pi-lens/dist/clients/tool-policy.js +92 -22
  290. package/node_modules/pi-lens/dist/clients/tree-sitter-cache.js +40 -40
  291. package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +87 -100
  292. package/node_modules/pi-lens/dist/clients/tree-sitter-logger.js +2 -2
  293. package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +81 -1
  294. package/node_modules/pi-lens/dist/clients/tree-sitter-shared.js +51 -46
  295. package/node_modules/pi-lens/dist/clients/tree-sitter-symbol-extractor.js +28 -0
  296. package/node_modules/pi-lens/dist/clients/tui-fit.js +0 -4
  297. package/node_modules/pi-lens/dist/clients/typos-config.js +5 -0
  298. package/node_modules/pi-lens/dist/clients/user-notify.js +6 -6
  299. package/node_modules/pi-lens/dist/clients/widget-state.js +191 -26
  300. package/node_modules/pi-lens/dist/clients/word-index-logger.js +2 -9
  301. package/node_modules/pi-lens/dist/clients/word-index-store.js +23 -12
  302. package/node_modules/pi-lens/dist/clients/word-index.js +252 -47
  303. package/node_modules/pi-lens/dist/clients/workspace-topology.js +8 -1
  304. package/node_modules/pi-lens/dist/clients/zizmor-config.js +4 -1
  305. package/node_modules/pi-lens/dist/index.js +65899 -55340
  306. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +3 -1
  307. package/node_modules/pi-lens/dist/mcp/build-staleness.js +1 -1
  308. package/node_modules/pi-lens/dist/mcp/server.js +127 -5
  309. package/node_modules/pi-lens/dist/scripts/lib/process-scan.mjs +583 -0
  310. package/node_modules/pi-lens/dist/scripts/lib/skills-predicate.mjs +129 -0
  311. package/node_modules/pi-lens/dist/tools/effective-config.js +89 -0
  312. package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +96 -25
  313. package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +104 -86
  314. package/node_modules/pi-lens/dist/tools/lsp-navigation.js +37 -16
  315. package/node_modules/pi-lens/dist/tools/lsp-structured-output.js +3 -3
  316. package/node_modules/pi-lens/dist/tools/render-compact.js +1 -1
  317. package/node_modules/pi-lens/dist/tools/shared.js +0 -1
  318. package/node_modules/pi-lens/dist/tools/symbol-search.js +1 -2
  319. package/node_modules/pi-lens/docs/agent-guide.md +64 -1
  320. package/node_modules/pi-lens/docs/configuration.md +222 -0
  321. package/node_modules/pi-lens/docs/dependencies.md +3 -3
  322. package/node_modules/pi-lens/docs/features.md +44 -5
  323. package/node_modules/pi-lens/docs/globalconfig.md +20 -0
  324. package/node_modules/pi-lens/docs/language-coverage.md +2 -2
  325. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +9 -1
  326. package/node_modules/pi-lens/docs/pi-lens-fixer.md +25 -0
  327. package/node_modules/pi-lens/docs/pi-lens-investigator.md +25 -0
  328. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +33 -0
  329. package/node_modules/pi-lens/docs/pi-lens-subagent.md +49 -0
  330. package/node_modules/pi-lens/docs/pi-lens-warden.md +55 -0
  331. package/node_modules/pi-lens/docs/public-api-stability.md +359 -0
  332. package/node_modules/pi-lens/docs/release-qa-baseline.md +190 -0
  333. package/node_modules/pi-lens/docs/servercapabilities.md +7 -3
  334. package/node_modules/pi-lens/docs/subagent-compat.md +110 -30
  335. package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +2 -2
  336. package/node_modules/pi-lens/docs/word-index.md +1 -1
  337. package/node_modules/pi-lens/package.json +18 -35
  338. package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-cross-language-method.yml +3 -3
  339. package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-hallucinated-import.yml +2 -2
  340. package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-sql-injection.yml +12 -2
  341. package/node_modules/pi-lens/rules/typos/_typos.toml +4 -2
  342. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +192 -1
  343. package/node_modules/pi-lens/scripts/install-selftest.mjs +58 -2
  344. package/node_modules/pi-lens/scripts/lib/skills-predicate.mjs +129 -0
  345. package/node_modules/pi-lens/scripts/lib/warm-loader-cache.mjs +1 -1
  346. package/node_modules/pi-lens/scripts/rpc-load-check.mjs +3 -1
  347. package/node_modules/pi-lens/scripts/warm-loader-cache.mjs +4 -2
  348. package/node_modules/pi-web-access/CHANGELOG.md +28 -0
  349. package/node_modules/pi-web-access/README.md +62 -15
  350. package/node_modules/pi-web-access/curator-page.ts +3 -1
  351. package/node_modules/pi-web-access/curator-server.ts +5 -1
  352. package/node_modules/pi-web-access/gemini-search.ts +8 -4
  353. package/node_modules/pi-web-access/github-extract.ts +242 -1
  354. package/node_modules/pi-web-access/index.ts +118 -64
  355. package/node_modules/pi-web-access/mistral-search.ts +281 -0
  356. package/node_modules/pi-web-access/package.json +2 -2
  357. package/node_modules/pi-web-access/perplexity.ts +14 -1
  358. package/node_modules/pi-web-access/utils.ts +23 -6
  359. package/node_modules/pi-web-access/xai-search.ts +96 -33
  360. package/package.json +6 -6
@@ -35,7 +35,6 @@ const hadolintRunner = {
35
35
  id: "hadolint",
36
36
  appliesTo: ["docker"],
37
37
  priority: PRIORITY.GENERAL_ANALYSIS,
38
- enabledByDefault: true,
39
38
  skipTestFiles: false,
40
39
  async run(ctx) {
41
40
  const cwd = ctx.cwd || process.cwd();
@@ -144,7 +144,6 @@ const helmLintRunner = {
144
144
  id: "helm-lint",
145
145
  appliesTo: ["yaml", "helm-template"],
146
146
  priority: PRIORITY.GENERAL_ANALYSIS,
147
- enabledByDefault: true,
148
147
  skipTestFiles: false,
149
148
  timeoutMs: 35_000,
150
149
  async run(ctx) {
@@ -489,7 +489,7 @@ const OUR_RENDER_FLAGS = ["--output-dir"];
489
489
  *
490
490
  * Returns the matched flag (for the message) or null.
491
491
  */
492
- export function rejectedOurInvocation(output) {
492
+ function rejectedOurInvocation(output) {
493
493
  if (!output)
494
494
  return null;
495
495
  const complaint = /unknown flag|unknown shorthand flag|flag provided but not defined|unknown command|unrecognized (?:flag|option)/i.test(output);
@@ -893,7 +893,6 @@ const helmRenderRunner = {
893
893
  id: "helm-render",
894
894
  appliesTo: ["yaml", "helm-template"],
895
895
  priority: PRIORITY.GENERAL_ANALYSIS,
896
- enabledByDefault: true,
897
896
  skipTestFiles: false,
898
897
  timeoutMs: RENDER_TIMEOUT_MS + TRIVY_TIMEOUT_MS + 10_000,
899
898
  async run(ctx) {
@@ -47,7 +47,6 @@ const htmlhintRunner = {
47
47
  id: "htmlhint",
48
48
  appliesTo: ["html"],
49
49
  priority: PRIORITY.GENERAL_ANALYSIS,
50
- enabledByDefault: true,
51
50
  skipTestFiles: false,
52
51
  async run(ctx) {
53
52
  const cwd = ctx.cwd || process.cwd();
@@ -39,7 +39,6 @@ const javacRunner = {
39
39
  id: "javac",
40
40
  appliesTo: ["java"],
41
41
  priority: PRIORITY.GENERAL_ANALYSIS,
42
- enabledByDefault: true,
43
42
  skipTestFiles: false,
44
43
  async run(ctx) {
45
44
  const cwd = ctx.cwd || process.cwd();
@@ -56,7 +56,6 @@ const ktlintRunner = {
56
56
  id: "ktlint",
57
57
  appliesTo: ["kotlin"],
58
58
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
59
- enabledByDefault: true,
60
59
  skipTestFiles: false,
61
60
  async run(ctx) {
62
61
  const cwd = ctx.cwd || process.cwd();
@@ -93,7 +93,6 @@ const lspRunner = {
93
93
  // is now the only step this seam needs (#1545).
94
94
  appliesTo: getLspCapableKinds(),
95
95
  priority: PRIORITY.LSP_PRIMARY,
96
- enabledByDefault: true,
97
96
  timeoutMs: LSP_RUNNER_TIMEOUT_MS,
98
97
  async run(ctx) {
99
98
  const diagnosticPath = resolveRunnerPath(ctx.cwd, ctx.filePath);
@@ -94,7 +94,6 @@ const markdownlintRunner = {
94
94
  id: "markdownlint",
95
95
  appliesTo: ["markdown"],
96
96
  priority: PRIORITY.DOC_QUALITY,
97
- enabledByDefault: true,
98
97
  skipTestFiles: false,
99
98
  async run(ctx) {
100
99
  const cwd = ctx.cwd || process.cwd();
@@ -59,7 +59,6 @@ const mypyRunner = {
59
59
  id: "mypy",
60
60
  appliesTo: ["python"],
61
61
  priority: PRIORITY.GENERAL_ANALYSIS,
62
- enabledByDefault: true,
63
62
  skipTestFiles: false,
64
63
  async run(ctx) {
65
64
  const cwd = ctx.cwd || process.cwd();
@@ -6,9 +6,7 @@
6
6
  *
7
7
  * Requires: oxlint (npm install -g oxlint)
8
8
  */
9
- import * as fs from "node:fs";
10
- import * as path from "node:path";
11
- import { walkUpDirs } from "../../path-utils.js";
9
+ import { findLocalBinUpwards } from "../../package-manager.js";
12
10
  import { safeSpawnAsync } from "../../safe-spawn.js";
13
11
  import { truncatedByOutputCap } from "../../spawn-output-cap.js";
14
12
  import { getJstsLintPolicyForCwd, hasVitePlusConfig, } from "../../tool-policy.js";
@@ -30,21 +28,19 @@ const OXLINT_NO_FILES_REPORT_KEYS = new Set([
30
28
  "threads_count",
31
29
  "start_time",
32
30
  ]);
31
+ /**
32
+ * Vite+'s `vp` from the project's own `node_modules/.bin`.
33
+ *
34
+ * Delegates to THE shared bin walker (#2544 review F1). This was a private,
35
+ * UNCEILINGED copy of that walk, while `formatters.ts`'s `oxfmtFormatter`
36
+ * resolved the SAME binary — `vp` — through the ceilinged `findInNodeModules`:
37
+ * one `vp` resolver stopped at `$HOME` and the other climbed past it to the
38
+ * filesystem root, so which policy applied depended on whether the format path
39
+ * or the lint path asked. A `node_modules/.bin/vp` at or above `$HOME` can
40
+ * never be this project's own Vite+ install (#2514).
41
+ */
33
42
  function resolveLocalVp(cwd) {
34
- const isWin = process.platform === "win32";
35
- for (const dir of walkUpDirs(cwd)) {
36
- const candidates = isWin
37
- ? [
38
- path.join(dir, "node_modules", ".bin", "vp.cmd"),
39
- path.join(dir, "node_modules", ".bin", "vp"),
40
- ]
41
- : [path.join(dir, "node_modules", ".bin", "vp")];
42
- for (const candidate of candidates) {
43
- if (fs.existsSync(candidate))
44
- return candidate;
45
- }
46
- }
47
- return null;
43
+ return findLocalBinUpwards("vp", cwd) ?? null;
48
44
  }
49
45
  async function resolveVitePlusCommand(cwd) {
50
46
  const local = resolveLocalVp(cwd);
@@ -60,7 +56,6 @@ const oxlintRunner = {
60
56
  id: "oxlint",
61
57
  appliesTo: ["jsts"],
62
58
  priority: PRIORITY.LINT_SECONDARY,
63
- enabledByDefault: true,
64
59
  skipTestFiles: false,
65
60
  async run(ctx) {
66
61
  const cwd = ctx.cwd || process.cwd();
@@ -91,6 +86,7 @@ const oxlintRunner = {
91
86
  }
92
87
  // Run oxlint (or Vite+'s vp lint wrapper) on the file.
93
88
  const result = await safeSpawnAsync(cmd, args, {
89
+ cwd,
94
90
  timeout: 30000,
95
91
  maxOutputBytes: MAX_OXLINT_OUTPUT_BYTES,
96
92
  });
@@ -29,7 +29,6 @@ const phpLintRunner = {
29
29
  id: "php-lint",
30
30
  appliesTo: ["php"],
31
31
  priority: PRIORITY.GENERAL_ANALYSIS,
32
- enabledByDefault: true,
33
32
  skipTestFiles: false,
34
33
  async run(ctx) {
35
34
  const cwd = ctx.cwd || process.cwd();
@@ -82,7 +82,6 @@ const phpstanRunner = {
82
82
  id: "phpstan",
83
83
  appliesTo: ["php"],
84
84
  priority: PRIORITY.GENERAL_ANALYSIS,
85
- enabledByDefault: true,
86
85
  skipTestFiles: false,
87
86
  async run(ctx) {
88
87
  const cwd = ctx.cwd || process.cwd();
@@ -35,7 +35,6 @@ const prismaValidateRunner = {
35
35
  id: "prisma-validate",
36
36
  appliesTo: ["prisma"],
37
37
  priority: PRIORITY.GENERAL_ANALYSIS,
38
- enabledByDefault: true,
39
38
  skipTestFiles: false,
40
39
  async run(ctx) {
41
40
  const cwd = ctx.cwd || process.cwd();
@@ -26,8 +26,10 @@ const PS_TIMEOUT_MS = 30000;
26
26
  * `spawnFailure.kind` and the errno on `error` — which is what lets the
27
27
  * availability policy tell a stall from an absence.
28
28
  */
29
- function spawnPs(cmd, args, timeoutMs = PS_TIMEOUT_MS) {
29
+ function spawnPs(cmd, args, options = {}) {
30
+ const { timeoutMs = PS_TIMEOUT_MS, cwd } = options;
30
31
  return safeSpawnAsync(cmd, args, {
32
+ cwd,
31
33
  timeout: timeoutMs,
32
34
  resourceLabel: "psscriptanalyzer",
33
35
  });
@@ -124,6 +126,7 @@ async function resolvePowerShellCmd() {
124
126
  for (const candidate of ["pwsh", "powershell"]) {
125
127
  const sampler = startHostStallSampler();
126
128
  const startedAt = Date.now();
129
+ // cwd-exempt: global interpreter-presence probe ("is pwsh/powershell on PATH at all"), not tied to any project
127
130
  const result = await spawnPs(candidate, [
128
131
  "-NoProfile",
129
132
  "-NonInteractive",
@@ -175,6 +178,7 @@ async function checkModuleAvailable(cmd) {
175
178
  return memo;
176
179
  const sampler = startHostStallSampler();
177
180
  const startedAt = Date.now();
181
+ // cwd-exempt: global module-presence probe -- PSScriptAnalyzer resolves from PowerShell's module search path, not a per-project install
178
182
  const result = await spawnPs(cmd, [
179
183
  "-NoProfile",
180
184
  "-NonInteractive",
@@ -269,7 +273,6 @@ const psScriptAnalyzerRunner = {
269
273
  id: "psscriptanalyzer",
270
274
  appliesTo: ["powershell"],
271
275
  priority: PRIORITY.GENERAL_ANALYSIS,
272
- enabledByDefault: true,
273
276
  skipTestFiles: false,
274
277
  async run(ctx) {
275
278
  const cmd = await resolvePowerShellCmd();
@@ -304,7 +307,7 @@ const psScriptAnalyzerRunner = {
304
307
  tmpScript,
305
308
  "-FilePath",
306
309
  absPath,
307
- ]);
310
+ ], { timeoutMs: PS_TIMEOUT_MS, cwd });
308
311
  const hostStallMs = sampler.stop();
309
312
  const elapsedMs = Date.now() - startedAt;
310
313
  // The two probes above use `-Command`, which PowerShell's execution
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import { logExtension } from "../../extension-log.js";
10
10
  import { getLSPService } from "../../lsp/index.js";
11
+ import { augmentPythonEnvironment, detectPythonEnvironment, } from "../../python-environment.js";
11
12
  import { safeSpawnAsync } from "../../safe-spawn.js";
12
13
  import { PRIORITY } from "../priorities.js";
13
14
  import { createAvailabilityChecker, resolveAvailableOrInstall, } from "./utils/runner-helpers.js";
@@ -17,7 +18,6 @@ const pyrightRunner = {
17
18
  id: "pyright",
18
19
  appliesTo: ["python"],
19
20
  priority: PRIORITY.LSP_FALLBACK,
20
- enabledByDefault: true,
21
21
  timeoutMs: 75_000,
22
22
  async run(ctx) {
23
23
  // Always allow pyright CLI fallback even when LSP is enabled.
@@ -52,12 +52,15 @@ const pyrightRunner = {
52
52
  if (!cmd) {
53
53
  return { status: "skipped", diagnostics: [], semantic: "none" };
54
54
  }
55
- // Run pyright with JSON output. Pass cwd so pyright resolves
56
- // pyrightconfig.json / the project venv from the project root rather than
57
- // falling back to process.cwd() (which mis-resolves in multi-root setups).
55
+ // Pyright's Node CLI falls back to `python` on PATH when the project has no
56
+ // explicit Pyright config. Apply the same environment the Python LSP uses so
57
+ // a conventional project .venv resolves without shell activation.
58
+ const pythonEnvironment = await detectPythonEnvironment(cwd);
59
+ const env = augmentPythonEnvironment(process.env, pythonEnvironment);
58
60
  const result = await safeSpawnAsync(cmd, ["--outputjson", ctx.filePath], {
59
61
  timeout: 60000,
60
62
  cwd,
63
+ env,
61
64
  });
62
65
  // Pyright returns non-zero when errors found, that's OK
63
66
  if (result.error) {
@@ -54,7 +54,6 @@ const rubocopRunner = {
54
54
  id: "rubocop",
55
55
  appliesTo: ["ruby"],
56
56
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
57
- enabledByDefault: true,
58
57
  async run(ctx) {
59
58
  const cwd = ctx.cwd || process.cwd();
60
59
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
@@ -49,7 +49,6 @@ const ruffRunner = {
49
49
  id: "ruff-lint",
50
50
  appliesTo: ["python"],
51
51
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
52
- enabledByDefault: true,
53
52
  async run(ctx) {
54
53
  const cwd = ctx.cwd || process.cwd();
55
54
  const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
@@ -64,7 +63,7 @@ const ruffRunner = {
64
63
  // builder, so the package-owned fallback config can never drift.
65
64
  const configArgs = ruffConfigArgs(cwd);
66
65
  // Step 1: Capture diagnostics (before fixing) — teaching signal for the agent
67
- const checkResult = await safeSpawnAsync(cmd, ["check", "--output-format", "json", ...configArgs, ctx.filePath], { timeout: 30000 });
66
+ const checkResult = await safeSpawnAsync(cmd, ["check", "--output-format", "json", ...configArgs, ctx.filePath], { cwd, timeout: 30000 });
68
67
  const raw = stripAnsi(checkResult.stdout + checkResult.stderr);
69
68
  const diagnostics = parseRuffJson(checkResult.stdout || "", ctx.filePath);
70
69
  const parsedDiagnostics = diagnostics.length > 0 ? diagnostics : parseRuffOutput(raw, ctx.filePath);
@@ -5,14 +5,13 @@
5
5
  */
6
6
  import { dirname, isAbsolute, join, resolve } from "node:path";
7
7
  import { findNearestContaining } from "../../path-utils.js";
8
- import { RustClient } from "../../rust-client.js";
8
+ import { rustClient } from "../../rust-client.js";
9
9
  import { safeSpawnAsync } from "../../safe-spawn.js";
10
10
  import { stripAnsi } from "../../sanitize.js";
11
11
  import { getLazyInstallAttempt, tryLazyInstall, } from "./utils/lazy-installer.js";
12
12
  import { describeInstallAttempt, logAvailabilityDecision, } from "./utils/availability-policy.js";
13
13
  import { PRIORITY } from "../priorities.js";
14
14
  import { createCwdCachedProbe } from "./utils/runner-helpers.js";
15
- const rustClient = new RustClient();
16
15
  // Cached per-cwd `cargo clippy --version` probe (#120). Before this, the
17
16
  // probe fired on every Rust file save in a project where clippy was already
18
17
  // installed.
@@ -49,7 +48,6 @@ const rustClippyRunner = {
49
48
  id: "rust-clippy",
50
49
  appliesTo: ["rust"],
51
50
  priority: PRIORITY.SPECIALIZED_ANALYSIS,
52
- enabledByDefault: true,
53
51
  timeoutMs: 90_000,
54
52
  async run(ctx) {
55
53
  // Resolve cargo path using platform-aware lookup (handles ~/.cargo/bin on Windows)
@@ -108,7 +108,6 @@ const shellcheckRunner = {
108
108
  id: "shellcheck",
109
109
  appliesTo: ["shell"],
110
110
  priority: PRIORITY.GENERAL_ANALYSIS,
111
- enabledByDefault: true,
112
111
  skipTestFiles: false, // Shell scripts in test directories should still be checked
113
112
  async run(ctx) {
114
113
  const cwd = ctx.cwd || process.cwd();
@@ -150,7 +149,7 @@ const shellcheckRunner = {
150
149
  args.push("--severity", "info");
151
150
  }
152
151
  args.push(ctx.filePath);
153
- const result = await safeSpawnAsync(cmd, args, { timeout: 15000 });
152
+ const result = await safeSpawnAsync(cmd, args, { cwd, timeout: 15000 });
154
153
  // shellcheck exits with code 1 if issues found, 0 if clean
155
154
  if (result.status === 0 && !result.stdout?.trim()) {
156
155
  return { status: "succeeded", diagnostics: [], semantic: "none" };
@@ -29,7 +29,6 @@ const shfmtRunner = {
29
29
  id: "shfmt",
30
30
  appliesTo: ["shell"],
31
31
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
32
- enabledByDefault: true,
33
32
  skipTestFiles: false,
34
33
  async run(ctx) {
35
34
  const cwd = ctx.cwd || process.cwd();
@@ -80,18 +80,19 @@ const spellcheckRunner = {
80
80
  id: "spellcheck",
81
81
  appliesTo: ["markdown"],
82
82
  priority: PRIORITY.DOC_QUALITY,
83
- enabledByDefault: true,
84
83
  skipTestFiles: false, // Check docs in test files too
85
84
  async run(ctx) {
85
+ const cwd = ctx.cwd || process.cwd();
86
86
  // Skip if typos-cli is not installed
87
- if (!(await typos.isAvailableAsync(ctx.cwd || process.cwd()))) {
87
+ if (!(await typos.isAvailableAsync(cwd))) {
88
88
  return { status: "skipped", diagnostics: [], semantic: "none" };
89
89
  }
90
90
  // Run typos-cli with JSON output
91
91
  // --format json: Output JSON Lines
92
92
  // --exclude <pattern>: Could be used to exclude code blocks if needed
93
93
  const args = ["--format", "json", ctx.filePath];
94
- const result = await safeSpawnAsync(typos.getCommand(ctx.cwd || process.cwd()), args, {
94
+ const result = await safeSpawnAsync(typos.getCommand(cwd), args, {
95
+ cwd,
95
96
  timeout: 15000,
96
97
  });
97
98
  // #1816: typos-cli exits 0 clean, 2 with typos found, and 1 on an ERROR
@@ -190,7 +190,6 @@ const spotbugsRunner = {
190
190
  id: "spotbugs",
191
191
  appliesTo: ["java", "kotlin"],
192
192
  priority: PRIORITY.DEEP_LANGUAGE_ANALYSIS,
193
- enabledByDefault: false,
194
193
  async run(ctx) {
195
194
  const cwd = ctx.cwd || process.cwd();
196
195
  const classesDir = findCompiledClassesDir(cwd);
@@ -115,7 +115,6 @@ const sqlfluffRunner = {
115
115
  id: "sqlfluff",
116
116
  appliesTo: ["sql"],
117
117
  priority: PRIORITY.SQL_LINT,
118
- enabledByDefault: true,
119
118
  skipTestFiles: false,
120
119
  async run(ctx) {
121
120
  const cwd = ctx.cwd || process.cwd();
@@ -114,7 +114,6 @@ const stylelintRunner = {
114
114
  id: "stylelint",
115
115
  appliesTo: ["css"],
116
116
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
117
- enabledByDefault: true,
118
117
  skipTestFiles: false,
119
118
  async run(ctx) {
120
119
  const cwd = ctx.cwd || process.cwd();
@@ -113,7 +113,6 @@ const swiftlintRunner = {
113
113
  id: "swiftlint",
114
114
  appliesTo: ["swift"],
115
115
  priority: PRIORITY.GENERAL_ANALYSIS,
116
- enabledByDefault: true,
117
116
  skipTestFiles: false,
118
117
  async run(ctx) {
119
118
  const cwd = ctx.cwd || process.cwd();
@@ -104,7 +104,6 @@ const taploRunner = {
104
104
  id: "taplo",
105
105
  appliesTo: ["toml"],
106
106
  priority: PRIORITY.FORMAT_AND_LINT_PRIMARY,
107
- enabledByDefault: true,
108
107
  skipTestFiles: false,
109
108
  async run(ctx) {
110
109
  const cwd = ctx.cwd || process.cwd();
@@ -126,7 +126,6 @@ const terragruntRunner = {
126
126
  id: "terragrunt",
127
127
  appliesTo: ["terragrunt"],
128
128
  priority: PRIORITY.GENERAL_ANALYSIS,
129
- enabledByDefault: true,
130
129
  skipTestFiles: false,
131
130
  async run(ctx) {
132
131
  const cwd = ctx.cwd || process.cwd();
@@ -50,7 +50,6 @@ const tflintRunner = {
50
50
  id: "tflint",
51
51
  appliesTo: ["terraform"],
52
52
  priority: PRIORITY.GENERAL_ANALYSIS,
53
- enabledByDefault: true,
54
53
  skipTestFiles: false,
55
54
  async run(ctx) {
56
55
  const cwd = ctx.cwd || process.cwd();
@@ -325,7 +325,6 @@ const treeSitterRunner = {
325
325
  "css",
326
326
  ],
327
327
  priority: PRIORITY.STRUCTURAL_ANALYSIS,
328
- enabledByDefault: true,
329
328
  skipTestFiles: false, // Run on test files too (structural issues matter there)
330
329
  async run(ctx) {
331
330
  // Use singleton client — WASM must never be re-initialized after first call
@@ -146,7 +146,6 @@ const trivyConfigRunner = {
146
146
  id: "trivy-config",
147
147
  appliesTo: ["docker", "yaml", "terraform", "json"],
148
148
  priority: PRIORITY.GENERAL_ANALYSIS,
149
- enabledByDefault: true,
150
149
  skipTestFiles: false,
151
150
  async run(ctx) {
152
151
  const cwd = ctx.cwd || process.cwd();
@@ -460,6 +460,9 @@ export function logAvailabilityDecision(decision, filePath = "<pi-lens>") {
460
460
  durationMs: Math.round(decision.elapsedMs),
461
461
  metadata: {
462
462
  tool: decision.tool,
463
+ ...(decision.producer !== undefined && {
464
+ producer: decision.producer,
465
+ }),
463
466
  verdict: decision.verdict,
464
467
  outcome: decision.outcome,
465
468
  cause: decision.cause,
@@ -4,16 +4,17 @@
4
4
  * Common patterns for parsing tool output into standardized diagnostics.
5
5
  * Supports the common `file:line:col: message` format used by most linters.
6
6
  */
7
+ import { stripAnsi } from "../../../sanitize.js";
7
8
  import { getAutofixCapability } from "../../../tool-policy.js";
8
9
  /**
9
10
  * Create a parser for line-based tool output.
10
11
  * Common format: file:line:col: message (with variations)
11
12
  */
12
- export function createLineParser(config) {
13
+ function createLineParser(config) {
13
14
  return (raw, filePath) => {
14
15
  const diagnostics = [];
15
16
  // Optionally strip ANSI codes (for tools that output colored text)
16
- const clean = config.stripAnsi !== false ? raw.replace(/\x1b\[[0-9;]*m/g, "") : raw;
17
+ const clean = config.stripAnsi !== false ? stripAnsi(raw) : raw;
17
18
  const lines = clean.split("\n").filter((l) => l.trim());
18
19
  for (const line of lines) {
19
20
  const match = line.match(config.regex);
@@ -79,71 +80,6 @@ export const parseGoVetOutput = createLineParser({
79
80
  generateId: (m) => `go-vet-${m[2]}`,
80
81
  defectClass: "correctness",
81
82
  });
82
- /**
83
- * Parse Biome output: file:line:col message (category)
84
- * With autofix support for fix suggestions
85
- */
86
- export function createBiomeParser(_autofix = false) {
87
- const biomeAutofix = getAutofixCapability("biome");
88
- return createLineParser({
89
- tool: "biome",
90
- regex: /^(.+?):(\d+):(\d+)\s+(.+?)\s*\((.+?)\)/,
91
- extractMessage: (m) => `${m[5]}: ${m[4]}`, // category: message
92
- extractRule: (m) => m[5],
93
- generateId: (m) => `biome-${m[2]}-${m[5]}`,
94
- getSeverity: (line) => (line.includes("error") ? "error" : "warning"),
95
- fixable: true,
96
- autoFixAvailable: biomeAutofix?.safePipelineAutofix ?? false,
97
- fixKind: biomeAutofix?.fixKind === "none" ? undefined : biomeAutofix?.fixKind,
98
- });
99
- }
100
- // Backward-compatible default biome parser
101
- export const parseBiomeOutput = createBiomeParser(false);
102
83
  // =============================================================================
103
84
  // GENERIC PARSER FACTORY
104
85
  // =============================================================================
105
- /**
106
- * Create a simple parser for tools using standard file:line:col format.
107
- * Format variations: :line:col:, line:col, (line,col), etc.
108
- */
109
- export function createSimpleParser(tool, options = {}) {
110
- const sep = options.separator ?? ":";
111
- const severity = options.severity ?? "warning";
112
- const fixable = options.fixable ?? false;
113
- // Build regex based on separator type
114
- const escapedSep = sep === " " ? "\\s+" : escapeRegExp(sep);
115
- const regex = options.includesFileName
116
- ? new RegExp(`^(.+?)${escapedSep}(\\d+)${escapedSep}(\\d+)${escapedSep}(.+)`)
117
- : new RegExp(`^(\\d+)${escapedSep}(\\d+)${escapedSep}(.+)`);
118
- return (raw, filePath) => {
119
- const diagnostics = [];
120
- const lines = raw.split("\n").filter((l) => l.trim());
121
- for (const line of lines) {
122
- const match = line.match(regex);
123
- if (!match)
124
- continue;
125
- const lineNum = options.includesFileName
126
- ? parseInt(match[2], 10)
127
- : parseInt(match[1], 10);
128
- const colNum = options.includesFileName
129
- ? parseInt(match[3], 10)
130
- : parseInt(match[2], 10);
131
- const message = options.includesFileName ? match[4] : match[3];
132
- diagnostics.push({
133
- id: `${tool}-${lineNum}`,
134
- message: message.trim(),
135
- filePath,
136
- line: lineNum,
137
- column: colNum,
138
- severity,
139
- semantic: severity === "error" ? "blocking" : "warning",
140
- tool,
141
- fixable,
142
- });
143
- }
144
- return diagnostics;
145
- };
146
- }
147
- function escapeRegExp(string) {
148
- return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
149
- }