@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.
- package/node_modules/@czottmann/pi-automode/CHANGELOG.md +13 -1
- package/node_modules/@czottmann/pi-automode/README.md +20 -0
- package/node_modules/@czottmann/pi-automode/docs/GLOSSARY.md +1 -1
- package/node_modules/@czottmann/pi-automode/docs/automode-classifier-flow.md +2 -1
- package/node_modules/@czottmann/pi-automode/docs/defaults.md +3 -2
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/classifier.ts +38 -2
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/constants.ts +5 -3
- package/node_modules/@czottmann/pi-automode/extensions/auto-mode/extension.ts +11 -3
- package/node_modules/@czottmann/pi-automode/package.json +1 -1
- package/node_modules/@narumitw/pi-btw/README.md +57 -141
- package/node_modules/@narumitw/pi-btw/dist/index.ts +466 -41
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +4 -4
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +74 -0
- package/node_modules/@narumitw/pi-btw/package.json +2 -1
- package/node_modules/@narumitw/pi-btw/src/btw.ts +15 -1
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +32 -2
- package/node_modules/@narumitw/pi-btw/src/keybindings.ts +330 -0
- package/node_modules/@narumitw/pi-btw/src/menu.ts +136 -19
- package/node_modules/@narumitw/pi-btw/src/settings.ts +32 -0
- package/node_modules/@narumitw/pi-btw/src/side-thread.ts +57 -5
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +52 -30
- package/node_modules/@pi-plugins/fast-mode/README.md +5 -3
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +20 -55
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +1 -1
- package/node_modules/pi-lens/CHANGELOG.md +1072 -0
- package/node_modules/pi-lens/README.md +3 -0
- package/node_modules/pi-lens/config/biome/core.jsonc +11 -2
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +13 -1
- package/node_modules/pi-lens/dist/clients/actionable-warnings-logger.js +2 -9
- package/node_modules/pi-lens/dist/clients/actionable-warnings.js +927 -80
- package/node_modules/pi-lens/dist/clients/advisory-provenance.js +1 -1
- package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +13 -4
- package/node_modules/pi-lens/dist/clients/ast-grep-client.js +123 -3
- package/node_modules/pi-lens/dist/clients/ast-grep-rule-manager.js +60 -5
- package/node_modules/pi-lens/dist/clients/ast-grep-tool-logger.js +2 -9
- package/node_modules/pi-lens/dist/clients/ast-grep-types.js +2 -0
- package/node_modules/pi-lens/dist/clients/bash-file-access.js +133 -3
- package/node_modules/pi-lens/dist/clients/biome-client.js +9 -2
- package/node_modules/pi-lens/dist/clients/blocker-freshness.js +14 -6
- package/node_modules/pi-lens/dist/clients/bootstrap.js +509 -73
- package/node_modules/pi-lens/dist/clients/bounded-cache.js +152 -12
- package/node_modules/pi-lens/dist/clients/bounded-pid-file-lock.js +1 -1
- package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +59 -9
- package/node_modules/pi-lens/dist/clients/bundled-resource-health.js +113 -0
- package/node_modules/pi-lens/dist/clients/bus-events-logger.js +3 -11
- package/node_modules/pi-lens/dist/clients/cache/rule-cache.js +31 -4
- package/node_modules/pi-lens/dist/clients/cache-manager.js +105 -6
- package/node_modules/pi-lens/dist/clients/cache-observability.js +40 -19
- package/node_modules/pi-lens/dist/clients/cargo-manifest.js +422 -0
- package/node_modules/pi-lens/dist/clients/cascade-logger.js +2 -9
- package/node_modules/pi-lens/dist/clients/child-unref.js +1 -19
- package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +13 -3
- package/node_modules/pi-lens/dist/clients/complexity-client.js +16 -5
- package/node_modules/pi-lens/dist/clients/config-core/deny.js +221 -0
- package/node_modules/pi-lens/dist/clients/config-core/index.js +50 -0
- package/node_modules/pi-lens/dist/clients/config-core/merge.js +357 -0
- package/node_modules/pi-lens/dist/clients/config-core/normalize.js +340 -0
- package/node_modules/pi-lens/dist/clients/config-core/process-spec.js +248 -0
- package/node_modules/pi-lens/dist/clients/config-core/provenance.js +164 -0
- package/node_modules/pi-lens/dist/clients/config-core/records.js +218 -0
- package/node_modules/pi-lens/dist/clients/config-core/resolve.js +125 -0
- package/node_modules/pi-lens/dist/clients/config-core/safe-object.js +78 -0
- package/node_modules/pi-lens/dist/clients/config-core/schema.js +165 -0
- package/node_modules/pi-lens/dist/clients/config-diagnostic-codes.js +281 -0
- package/node_modules/pi-lens/dist/clients/config-locations.js +160 -0
- package/node_modules/pi-lens/dist/clients/config-resolve.js +789 -0
- package/node_modules/pi-lens/dist/clients/config-schema.js +234 -0
- package/node_modules/pi-lens/dist/clients/config-warn.js +407 -0
- package/node_modules/pi-lens/dist/clients/dead-code-client.js +19 -14
- package/node_modules/pi-lens/dist/clients/dead-code-logger.js +2 -6
- package/node_modules/pi-lens/dist/clients/deadline-utils.js +178 -0
- package/node_modules/pi-lens/dist/clients/debug-handles.js +2 -2
- package/node_modules/pi-lens/dist/clients/debug-heap.js +3 -3
- package/node_modules/pi-lens/dist/clients/deferred-lsp-work.js +106 -0
- package/node_modules/pi-lens/dist/clients/degradation-ledger.js +113 -7
- package/node_modules/pi-lens/dist/clients/dependency-checker.js +8 -19
- package/node_modules/pi-lens/dist/clients/diagnostic-dispositions.js +1 -1
- package/node_modules/pi-lens/dist/clients/diagnostic-line-freshness.js +12 -9
- package/node_modules/pi-lens/dist/clients/diagnostic-logger.js +15 -5
- package/node_modules/pi-lens/dist/clients/dispatch/collect-later-tier.js +0 -4
- package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +162 -44
- package/node_modules/pi-lens/dist/clients/dispatch/fact-store.js +97 -0
- package/node_modules/pi-lens/dist/clients/dispatch/integration.js +27 -8
- package/node_modules/pi-lens/dist/clients/dispatch/lazy.js +0 -6
- package/node_modules/pi-lens/dist/clients/dispatch/pending-runner-findings.js +1 -1
- package/node_modules/pi-lens/dist/clients/dispatch/plan.js +0 -3
- package/node_modules/pi-lens/dist/clients/dispatch/rules/high-complexity.js +2 -2
- package/node_modules/pi-lens/dist/clients/dispatch/rules/high-fan-out.js +1 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/actionlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +383 -27
- package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/cpp-check.js +4 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/credo.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/cue-vet.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/dart-analyze.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/detekt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/dotnet-build.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/elixir-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/fact-rules.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/fish-indent.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/gleam-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/go-vet.js +1 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/golangci-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/hadolint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +1 -2
- package/node_modules/pi-lens/dist/clients/dispatch/runners/htmlhint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/javac.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ktlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/mypy.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +14 -18
- package/node_modules/pi-lens/dist/clients/dispatch/runners/php-lint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/phpstan.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/prisma-validate.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +6 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/pyright.js +7 -4
- package/node_modules/pi-lens/dist/clients/dispatch/runners/rubocop.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ruff.js +1 -2
- package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +1 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/shellcheck.js +1 -2
- package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/spellcheck.js +4 -3
- package/node_modules/pi-lens/dist/clients/dispatch/runners/spotbugs.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/sqlfluff.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/stylelint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/swiftlint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/taplo.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/terragrunt.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/tflint.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/trivy-config.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/availability-policy.js +3 -0
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +3 -67
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +194 -80
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +84 -15
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils.js +0 -21
- package/node_modules/pi-lens/dist/clients/dispatch/runners/vale.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/yaml-rule-parser.js +2 -20
- package/node_modules/pi-lens/dist/clients/dispatch/runners/yamllint.js +1 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/zig-check.js +0 -1
- package/node_modules/pi-lens/dist/clients/dispatch/utils/format-utils.js +2 -2
- package/node_modules/pi-lens/dist/clients/disposition-logger.js +3 -10
- package/node_modules/pi-lens/dist/clients/effective-config.js +403 -0
- package/node_modules/pi-lens/dist/clients/error-class.js +23 -0
- package/node_modules/pi-lens/dist/clients/event-loop-hold.js +274 -0
- package/node_modules/pi-lens/dist/clients/event-loop-monitor.js +2 -2
- package/node_modules/pi-lens/dist/clients/extension-log.js +2 -2
- package/node_modules/pi-lens/dist/clients/feature-hints.js +2 -1
- package/node_modules/pi-lens/dist/clients/file-kinds.js +1 -38
- package/node_modules/pi-lens/dist/clients/file-time.js +7 -2
- package/node_modules/pi-lens/dist/clients/file-utils.js +117 -10
- package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +50 -13
- package/node_modules/pi-lens/dist/clients/format-service.js +6 -2
- package/node_modules/pi-lens/dist/clients/formatters.js +385 -104
- package/node_modules/pi-lens/dist/clients/freshness-cadence.js +17 -0
- package/node_modules/pi-lens/dist/clients/generated-artifacts.js +116 -22
- package/node_modules/pi-lens/dist/clients/generation-guard.js +4 -9
- package/node_modules/pi-lens/dist/clients/git-guard.js +6 -1
- package/node_modules/pi-lens/dist/clients/go-client.js +39 -0
- package/node_modules/pi-lens/dist/clients/gradle-ktfmt-style.js +252 -0
- package/node_modules/pi-lens/dist/clients/grammar-source.js +3 -3
- package/node_modules/pi-lens/dist/clients/hashline-anchor.js +424 -0
- package/node_modules/pi-lens/dist/clients/hook-budgets.js +76 -0
- package/node_modules/pi-lens/dist/clients/host-edit-normalize.js +5 -2
- package/node_modules/pi-lens/dist/clients/host-ports.js +1 -1
- package/node_modules/pi-lens/dist/clients/installer/index.js +289 -59
- package/node_modules/pi-lens/dist/clients/installer/managed-tool-refresh.js +84 -18
- package/node_modules/pi-lens/dist/clients/instance-reaper.js +110 -236
- package/node_modules/pi-lens/dist/clients/instance-registry.js +6 -3
- package/node_modules/pi-lens/dist/clients/language-profile.js +0 -9
- package/node_modules/pi-lens/dist/clients/language-registry.js +599 -0
- package/node_modules/pi-lens/dist/clients/latency-logger.js +165 -9
- package/node_modules/pi-lens/dist/clients/ledger-bounds.js +34 -1
- package/node_modules/pi-lens/dist/clients/lens-config.js +160 -30
- package/node_modules/pi-lens/dist/clients/lens-engine.js +33 -41
- package/node_modules/pi-lens/dist/clients/lens-events.js +1 -1
- package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +77 -6
- package/node_modules/pi-lens/dist/clients/lens-map.js +1 -1
- package/node_modules/pi-lens/dist/clients/log-cleanup.js +2 -38
- package/node_modules/pi-lens/dist/clients/lsp/aggregation.js +3 -1
- package/node_modules/pi-lens/dist/clients/lsp/client.js +172 -33
- package/node_modules/pi-lens/dist/clients/lsp/config.js +484 -158
- package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp/document-drift.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp/edits.js +18 -5
- package/node_modules/pi-lens/dist/clients/lsp/index.js +892 -96
- package/node_modules/pi-lens/dist/clients/lsp/inferred-project.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp/language.js +18 -177
- package/node_modules/pi-lens/dist/clients/lsp/launch.js +2 -1
- package/node_modules/pi-lens/dist/clients/lsp/path-utils.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp/pending-aux-coverage.js +5 -18
- package/node_modules/pi-lens/dist/clients/lsp/server.js +284 -147
- package/node_modules/pi-lens/dist/clients/lsp/session-roots.js +116 -23
- package/node_modules/pi-lens/dist/clients/lsp/spawn-history.js +2 -7
- package/node_modules/pi-lens/dist/clients/lsp/sync-kind.js +0 -1
- package/node_modules/pi-lens/dist/clients/lsp/tsserver-sync.js +14 -7
- package/node_modules/pi-lens/dist/clients/lsp/wait-policy/classification.js +6 -0
- package/node_modules/pi-lens/dist/clients/lsp/wait-policy/strategies.js +2 -1
- package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp-document-symbols.js +1 -1
- package/node_modules/pi-lens/dist/clients/lsp-mutation.js +163 -21
- package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +36 -0
- package/node_modules/pi-lens/dist/clients/mcp/analyze.js +33 -4
- package/node_modules/pi-lens/dist/clients/mcp/session.js +5 -16
- package/node_modules/pi-lens/dist/clients/memory-sampler.js +8 -3
- package/node_modules/pi-lens/dist/clients/metrics-history.js +28 -107
- package/node_modules/pi-lens/dist/clients/middle-man-analysis.js +3 -5
- package/node_modules/pi-lens/dist/clients/module-report.js +21 -46
- package/node_modules/pi-lens/dist/clients/mutating-tool.js +651 -0
- package/node_modules/pi-lens/dist/clients/mutation-attribution.js +368 -0
- package/node_modules/pi-lens/dist/clients/mutation-bridge.js +240 -0
- package/node_modules/pi-lens/dist/clients/ndjson-logger.js +247 -24
- package/node_modules/pi-lens/dist/clients/observed-mutation-sources.js +101 -0
- package/node_modules/pi-lens/dist/clients/observed-mutation.js +1215 -0
- package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +70 -28
- package/node_modules/pi-lens/dist/clients/opengrep-config.js +5 -1
- package/node_modules/pi-lens/dist/clients/package-manager.js +195 -26
- package/node_modules/pi-lens/dist/clients/partial-edit-apply.js +359 -80
- package/node_modules/pi-lens/dist/clients/path-attribution-telemetry.js +23 -7
- package/node_modules/pi-lens/dist/clients/path-keyed-map.js +21 -2
- package/node_modules/pi-lens/dist/clients/path-utils.js +451 -15
- package/node_modules/pi-lens/dist/clients/performance-report.js +2 -2
- package/node_modules/pi-lens/dist/clients/persist-debounce.js +8 -1
- package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +114 -0
- package/node_modules/pi-lens/dist/clients/pipeline.js +79 -18
- package/node_modules/pi-lens/dist/clients/probe-home-state.js +228 -0
- package/node_modules/pi-lens/dist/clients/process-bridge.js +66 -0
- package/node_modules/pi-lens/dist/clients/process-snapshot.js +68 -0
- package/node_modules/pi-lens/dist/clients/project-changes.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/extractors.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +4 -3
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/jscpd.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/knip.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/madge.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/opengrep.js +1 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/runner-findings.js +28 -4
- package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +51 -20
- package/node_modules/pi-lens/dist/clients/project-lens-config.js +438 -122
- package/node_modules/pi-lens/dist/clients/project-scan-policy.js +3 -51
- package/node_modules/pi-lens/dist/clients/project-snapshot.js +52 -24
- package/node_modules/pi-lens/dist/clients/python-environment.js +217 -0
- package/node_modules/pi-lens/dist/clients/python-provenance.js +639 -0
- package/node_modules/pi-lens/dist/clients/quiet-window.js +6 -1
- package/node_modules/pi-lens/dist/clients/read-bridge.js +13 -21
- package/node_modules/pi-lens/dist/clients/read-expansion.js +9 -46
- package/node_modules/pi-lens/dist/clients/read-guard-logger.js +16 -5
- package/node_modules/pi-lens/dist/clients/read-guard-tool-lines.js +364 -212
- package/node_modules/pi-lens/dist/clients/read-guard.js +26 -2
- package/node_modules/pi-lens/dist/clients/recent-touches.js +2 -2
- package/node_modules/pi-lens/dist/clients/resource-sampler.js +195 -96
- package/node_modules/pi-lens/dist/clients/review-graph/builder.js +155 -114
- package/node_modules/pi-lens/dist/clients/review-graph/import-resolvers.js +1 -1
- package/node_modules/pi-lens/dist/clients/review-graph/service.js +55 -3
- package/node_modules/pi-lens/dist/clients/review-graph/shared-extraction-ir.js +7 -15
- package/node_modules/pi-lens/dist/clients/review-graph/workspace-modules.js +10 -74
- package/node_modules/pi-lens/dist/clients/review-graph-logger.js +9 -3
- package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +19 -3
- package/node_modules/pi-lens/dist/clients/runtime-context.js +49 -16
- package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +25 -6
- package/node_modules/pi-lens/dist/clients/runtime-session.js +184 -32
- package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +179 -36
- package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +797 -243
- package/node_modules/pi-lens/dist/clients/runtime-turn.js +1028 -53
- package/node_modules/pi-lens/dist/clients/rust-client.js +31 -0
- package/node_modules/pi-lens/dist/clients/safe-spawn.js +33 -10
- package/node_modules/pi-lens/dist/clients/sanitize.js +7 -12
- package/node_modules/pi-lens/dist/clients/scan-utils.js +1 -56
- package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +1 -3
- package/node_modules/pi-lens/dist/clients/security-scan-client.js +3 -0
- package/node_modules/pi-lens/dist/clients/session-lifecycle.js +1 -1
- package/node_modules/pi-lens/dist/clients/session-start-observability.js +79 -0
- package/node_modules/pi-lens/dist/clients/session-summary.js +0 -24
- package/node_modules/pi-lens/dist/clients/sessionstart-logger.js +12 -3
- package/node_modules/pi-lens/dist/clients/sgconfig.js +7 -6
- package/node_modules/pi-lens/dist/clients/shared-checkout-guard.js +1 -1
- package/node_modules/pi-lens/dist/clients/skills-resolver.js +105 -0
- package/node_modules/pi-lens/dist/clients/smells-rollup.js +4 -4
- package/node_modules/pi-lens/dist/clients/startup-scan.js +2 -10
- package/node_modules/pi-lens/dist/clients/string-utils.js +13 -0
- package/node_modules/pi-lens/dist/clients/subagent-mode.js +17 -4
- package/node_modules/pi-lens/dist/clients/test-runner-client.js +176 -39
- package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +244 -0
- package/node_modules/pi-lens/dist/clients/tool-definition.js +41 -1
- package/node_modules/pi-lens/dist/clients/tool-policy.js +92 -22
- package/node_modules/pi-lens/dist/clients/tree-sitter-cache.js +40 -40
- package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +87 -100
- package/node_modules/pi-lens/dist/clients/tree-sitter-logger.js +2 -2
- package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +81 -1
- package/node_modules/pi-lens/dist/clients/tree-sitter-shared.js +51 -46
- package/node_modules/pi-lens/dist/clients/tree-sitter-symbol-extractor.js +28 -0
- package/node_modules/pi-lens/dist/clients/tui-fit.js +0 -4
- package/node_modules/pi-lens/dist/clients/typos-config.js +5 -0
- package/node_modules/pi-lens/dist/clients/user-notify.js +6 -6
- package/node_modules/pi-lens/dist/clients/widget-state.js +191 -26
- package/node_modules/pi-lens/dist/clients/word-index-logger.js +2 -9
- package/node_modules/pi-lens/dist/clients/word-index-store.js +23 -12
- package/node_modules/pi-lens/dist/clients/word-index.js +252 -47
- package/node_modules/pi-lens/dist/clients/workspace-topology.js +8 -1
- package/node_modules/pi-lens/dist/clients/zizmor-config.js +4 -1
- package/node_modules/pi-lens/dist/index.js +65899 -55340
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +3 -1
- package/node_modules/pi-lens/dist/mcp/build-staleness.js +1 -1
- package/node_modules/pi-lens/dist/mcp/server.js +127 -5
- package/node_modules/pi-lens/dist/scripts/lib/process-scan.mjs +583 -0
- package/node_modules/pi-lens/dist/scripts/lib/skills-predicate.mjs +129 -0
- package/node_modules/pi-lens/dist/tools/effective-config.js +89 -0
- package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +96 -25
- package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +104 -86
- package/node_modules/pi-lens/dist/tools/lsp-navigation.js +37 -16
- package/node_modules/pi-lens/dist/tools/lsp-structured-output.js +3 -3
- package/node_modules/pi-lens/dist/tools/render-compact.js +1 -1
- package/node_modules/pi-lens/dist/tools/shared.js +0 -1
- package/node_modules/pi-lens/dist/tools/symbol-search.js +1 -2
- package/node_modules/pi-lens/docs/agent-guide.md +64 -1
- package/node_modules/pi-lens/docs/configuration.md +222 -0
- package/node_modules/pi-lens/docs/dependencies.md +3 -3
- package/node_modules/pi-lens/docs/features.md +44 -5
- package/node_modules/pi-lens/docs/globalconfig.md +20 -0
- package/node_modules/pi-lens/docs/language-coverage.md +2 -2
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +9 -1
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +25 -0
- package/node_modules/pi-lens/docs/pi-lens-investigator.md +25 -0
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +33 -0
- package/node_modules/pi-lens/docs/pi-lens-subagent.md +49 -0
- package/node_modules/pi-lens/docs/pi-lens-warden.md +55 -0
- package/node_modules/pi-lens/docs/public-api-stability.md +359 -0
- package/node_modules/pi-lens/docs/release-qa-baseline.md +190 -0
- package/node_modules/pi-lens/docs/servercapabilities.md +7 -3
- package/node_modules/pi-lens/docs/subagent-compat.md +110 -30
- package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +2 -2
- package/node_modules/pi-lens/docs/word-index.md +1 -1
- package/node_modules/pi-lens/package.json +18 -35
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-cross-language-method.yml +3 -3
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-hallucinated-import.yml +2 -2
- package/node_modules/pi-lens/rules/tree-sitter-queries/python/python-sql-injection.yml +12 -2
- package/node_modules/pi-lens/rules/typos/_typos.toml +4 -2
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +192 -1
- package/node_modules/pi-lens/scripts/install-selftest.mjs +58 -2
- package/node_modules/pi-lens/scripts/lib/skills-predicate.mjs +129 -0
- package/node_modules/pi-lens/scripts/lib/warm-loader-cache.mjs +1 -1
- package/node_modules/pi-lens/scripts/rpc-load-check.mjs +3 -1
- package/node_modules/pi-lens/scripts/warm-loader-cache.mjs +4 -2
- package/node_modules/pi-web-access/CHANGELOG.md +28 -0
- package/node_modules/pi-web-access/README.md +62 -15
- package/node_modules/pi-web-access/curator-page.ts +3 -1
- package/node_modules/pi-web-access/curator-server.ts +5 -1
- package/node_modules/pi-web-access/gemini-search.ts +8 -4
- package/node_modules/pi-web-access/github-extract.ts +242 -1
- package/node_modules/pi-web-access/index.ts +118 -64
- package/node_modules/pi-web-access/mistral-search.ts +281 -0
- package/node_modules/pi-web-access/package.json +2 -2
- package/node_modules/pi-web-access/perplexity.ts +14 -1
- package/node_modules/pi-web-access/utils.ts +23 -6
- package/node_modules/pi-web-access/xai-search.ts +96 -33
- package/package.json +6 -6
|
@@ -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
|
-
|
|
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) {
|
|
@@ -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);
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Requires: oxlint (npm install -g oxlint)
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
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
|
-
|
|
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
|
});
|
|
@@ -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,
|
|
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
|
-
//
|
|
56
|
-
//
|
|
57
|
-
//
|
|
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) {
|
|
@@ -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 {
|
|
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" };
|
|
@@ -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(
|
|
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(
|
|
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);
|
|
@@ -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
|
-
|
|
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
|
|
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
|
-
}
|