@duckmind/dm-darwin-x64 0.67.5 → 0.67.6
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/README.md +2 -2
- package/dm +2 -2
- package/extensions/.dm-extensions.json +93 -27
- package/extensions/dm-lens/clients/actionable-warnings.js +12 -5
- package/extensions/dm-lens/clients/advisory-provenance.js +6 -2
- package/extensions/dm-lens/clients/agent-behavior-client.js +32 -2
- package/extensions/dm-lens/clients/agent-nudge.js +10 -0
- package/extensions/dm-lens/clients/analysis-root.js +3 -6
- package/extensions/dm-lens/clients/ast-grep-client.js +123 -33
- package/extensions/dm-lens/clients/ast-grep-tool-logger.js +1 -0
- package/extensions/dm-lens/clients/background-write-drains.js +16 -0
- package/extensions/dm-lens/clients/bash-file-access.js +556 -78
- package/extensions/dm-lens/clients/blocker-freshness.js +9 -5
- package/extensions/dm-lens/clients/bootstrap.js +0 -3
- package/extensions/dm-lens/clients/bounded-pid-file-lock.js +3 -12
- package/extensions/dm-lens/clients/bounded-telemetry.js +1 -0
- package/extensions/dm-lens/clients/bundled-resource-health.js +1 -0
- package/extensions/dm-lens/clients/bus-event-rollup.js +5 -0
- package/extensions/dm-lens/clients/bus-publish.js +45 -85
- package/extensions/dm-lens/clients/cache-manager.js +7 -14
- package/extensions/dm-lens/clients/cache-observability.js +36 -58
- package/extensions/dm-lens/clients/cargo-manifest.js +7 -3
- package/extensions/dm-lens/clients/cascade-budget.js +2 -3
- package/extensions/dm-lens/clients/cascade-format.js +21 -9
- package/extensions/dm-lens/clients/command-path.js +29 -0
- package/extensions/dm-lens/clients/complexity-client.js +25 -259
- package/extensions/dm-lens/clients/config-diagnostic-codes.js +1 -1
- package/extensions/dm-lens/clients/config-locations.js +10 -3
- package/extensions/dm-lens/clients/config-resolve.js +5 -3
- package/extensions/dm-lens/clients/config-schema.js +28 -2
- package/extensions/dm-lens/clients/context-injection-ledger.js +3 -0
- package/extensions/dm-lens/clients/dead-code-client.js +13 -13
- package/extensions/dm-lens/clients/deadline-utils.js +22 -13
- package/extensions/dm-lens/clients/deferred-runner-blockers.js +1 -1
- package/extensions/dm-lens/clients/degradation-ledger.js +29 -8
- package/extensions/dm-lens/clients/dependency-checker.js +7 -9
- package/extensions/dm-lens/clients/diagnostic-dispositions.js +94 -9
- package/extensions/dm-lens/clients/diagnostics-publish.js +38 -83
- package/extensions/dm-lens/clients/dispatch/adopted-root-runners.js +1 -0
- package/extensions/dm-lens/clients/dispatch/auxiliary-lsp.js +54 -3
- package/extensions/dm-lens/clients/dispatch/collect-later-tier.js +61 -4
- package/extensions/dm-lens/clients/dispatch/disabled-runners.js +66 -0
- package/extensions/dm-lens/clients/dispatch/dispatcher.js +289 -247
- package/extensions/dm-lens/clients/dispatch/fact-rule-runner.js +3 -0
- package/extensions/dm-lens/clients/dispatch/fact-runner.js +3 -0
- package/extensions/dm-lens/clients/dispatch/fact-store.js +1 -1
- package/extensions/dm-lens/clients/dispatch/facts/comment-facts.js +2 -1
- package/extensions/dm-lens/clients/dispatch/facts/function-facts.js +13 -85
- package/extensions/dm-lens/clients/dispatch/facts/try-catch-facts.js +2 -1
- package/extensions/dm-lens/clients/dispatch/finding-policy.js +65 -6
- package/extensions/dm-lens/clients/dispatch/integration.js +316 -114
- package/extensions/dm-lens/clients/dispatch/pending-runner-findings.js +4 -1
- package/extensions/dm-lens/clients/dispatch/plan.js +5 -0
- package/extensions/dm-lens/clients/dispatch/pre-edit-seed.js +28 -7
- package/extensions/dm-lens/clients/dispatch/rule-id-normalize.js +67 -0
- package/extensions/dm-lens/clients/dispatch/rule-ignores.js +4 -4
- package/extensions/dm-lens/clients/dispatch/rule-policy.js +158 -33
- package/extensions/dm-lens/clients/dispatch/rules/async-noise.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/async-unnecessary-wrapper.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/cors-wildcard.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/error-obscuring.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/error-swallowing.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/high-complexity.js +5 -4
- package/extensions/dm-lens/clients/dispatch/rules/high-fan-out.js +3 -2
- package/extensions/dm-lens/clients/dispatch/rules/high-import-coupling.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/missing-error-propagation.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/no-commented-credentials.js +7 -2
- package/extensions/dm-lens/clients/dispatch/rules/pass-through-wrappers.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/placeholder-comments.js +2 -1
- package/extensions/dm-lens/clients/dispatch/rules/unsafe-boundary.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runner-context.js +5 -7
- package/extensions/dm-lens/clients/dispatch/runners/actionlint.js +6 -13
- package/extensions/dm-lens/clients/dispatch/runners/ast-grep-napi.js +4 -3
- package/extensions/dm-lens/clients/dispatch/runners/biome-check.js +7 -4
- package/extensions/dm-lens/clients/dispatch/runners/cpp-check.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runners/credo.js +263 -14
- package/extensions/dm-lens/clients/dispatch/runners/cue-vet.js +8 -3
- package/extensions/dm-lens/clients/dispatch/runners/dart-analyze.js +4 -2
- package/extensions/dm-lens/clients/dispatch/runners/detekt.js +145 -37
- package/extensions/dm-lens/clients/dispatch/runners/dotnet-build.js +5 -3
- package/extensions/dm-lens/clients/dispatch/runners/elixir-check.js +8 -7
- package/extensions/dm-lens/clients/dispatch/runners/eslint.js +29 -18
- package/extensions/dm-lens/clients/dispatch/runners/fish-indent.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runners/gleam-check.js +8 -5
- package/extensions/dm-lens/clients/dispatch/runners/go-vet.js +6 -5
- package/extensions/dm-lens/clients/dispatch/runners/golangci-lint.js +15 -13
- package/extensions/dm-lens/clients/dispatch/runners/hadolint.js +8 -14
- package/extensions/dm-lens/clients/dispatch/runners/helm-lint.js +16 -15
- package/extensions/dm-lens/clients/dispatch/runners/helm-render.js +29 -23
- package/extensions/dm-lens/clients/dispatch/runners/htmlhint.js +8 -14
- package/extensions/dm-lens/clients/dispatch/runners/javac.js +8 -5
- package/extensions/dm-lens/clients/dispatch/runners/ktlint.js +6 -13
- package/extensions/dm-lens/clients/dispatch/runners/lsp.js +37 -14
- package/extensions/dm-lens/clients/dispatch/runners/markdownlint.js +13 -36
- package/extensions/dm-lens/clients/dispatch/runners/mypy.js +11 -16
- package/extensions/dm-lens/clients/dispatch/runners/oxlint.js +25 -21
- package/extensions/dm-lens/clients/dispatch/runners/php-lint.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runners/phpstan.js +221 -8
- package/extensions/dm-lens/clients/dispatch/runners/prisma-validate.js +14 -7
- package/extensions/dm-lens/clients/dispatch/runners/psscriptanalyzer.js +27 -12
- package/extensions/dm-lens/clients/dispatch/runners/pyright.js +13 -7
- package/extensions/dm-lens/clients/dispatch/runners/rubocop.js +12 -12
- package/extensions/dm-lens/clients/dispatch/runners/ruff.js +26 -12
- package/extensions/dm-lens/clients/dispatch/runners/rust-clippy.js +14 -4
- package/extensions/dm-lens/clients/dispatch/runners/shellcheck.js +14 -60
- package/extensions/dm-lens/clients/dispatch/runners/shfmt.js +7 -8
- package/extensions/dm-lens/clients/dispatch/runners/spellcheck.js +14 -11
- package/extensions/dm-lens/clients/dispatch/runners/spotbugs.js +10 -10
- package/extensions/dm-lens/clients/dispatch/runners/sqlfluff.js +9 -17
- package/extensions/dm-lens/clients/dispatch/runners/stylelint.js +11 -19
- package/extensions/dm-lens/clients/dispatch/runners/swiftlint.js +15 -25
- package/extensions/dm-lens/clients/dispatch/runners/taplo.js +31 -23
- package/extensions/dm-lens/clients/dispatch/runners/terragrunt.js +12 -10
- package/extensions/dm-lens/clients/dispatch/runners/tflint.js +8 -12
- package/extensions/dm-lens/clients/dispatch/runners/tree-sitter.js +7 -2
- package/extensions/dm-lens/clients/dispatch/runners/trivy-config.js +16 -17
- package/extensions/dm-lens/clients/dispatch/runners/utils/availability-policy.js +18 -0
- package/extensions/dm-lens/clients/dispatch/runners/utils/diagnostic-parsers.js +8 -4
- package/extensions/dm-lens/clients/dispatch/runners/utils/ignore-anchor.js +105 -0
- package/extensions/dm-lens/clients/dispatch/runners/utils/lazy-installer.js +10 -0
- package/extensions/dm-lens/clients/dispatch/runners/utils/markdownlint-api.js +52 -0
- package/extensions/dm-lens/clients/dispatch/runners/utils/runner-helpers.js +263 -395
- package/extensions/dm-lens/clients/dispatch/runners/utils/spawn-outcome.js +8 -3
- package/extensions/dm-lens/clients/dispatch/runners/utils/tool-failure.js +45 -16
- package/extensions/dm-lens/clients/dispatch/runners/vale.js +24 -33
- package/extensions/dm-lens/clients/dispatch/runners/yamllint.js +13 -17
- package/extensions/dm-lens/clients/dispatch/runners/zig-check.js +4 -2
- package/extensions/dm-lens/clients/dispatch/types.js +119 -2
- package/extensions/dm-lens/clients/dispatch/utils/lsp-diagnostics.js +2 -1
- package/extensions/dm-lens/clients/disposition-publish.js +14 -63
- package/extensions/dm-lens/clients/effective-config.js +44 -17
- package/extensions/dm-lens/clients/env-utils.js +13 -0
- package/extensions/dm-lens/clients/event-loop-hold.js +1 -1
- package/extensions/dm-lens/clients/feature-hints.js +2 -1
- package/extensions/dm-lens/clients/file-kinds.js +13 -0
- package/extensions/dm-lens/clients/file-role.js +3 -4
- package/extensions/dm-lens/clients/file-time.js +1 -16
- package/extensions/dm-lens/clients/file-utils.js +61 -52
- package/extensions/dm-lens/clients/finding-delivery-gate.js +2 -1
- package/extensions/dm-lens/clients/finding-identity.js +12 -2
- package/extensions/dm-lens/clients/fix-run-restore.js +3 -6
- package/extensions/dm-lens/clients/fix-worklog.js +0 -22
- package/extensions/dm-lens/clients/format-events-publish.js +85 -268
- package/extensions/dm-lens/clients/format-service.js +3 -10
- package/extensions/dm-lens/clients/formatters.js +150 -135
- package/extensions/dm-lens/clients/generation-lock.js +2 -11
- package/extensions/dm-lens/clients/git-guard.js +531 -161
- package/extensions/dm-lens/clients/gitleaks-client.js +60 -79
- package/extensions/dm-lens/clients/govulncheck-client.js +9 -0
- package/extensions/dm-lens/clients/gradle-ktfmt-style.js +10 -11
- package/extensions/dm-lens/clients/grammar-source.js +10 -3
- package/extensions/dm-lens/clients/inline-blocker-dispositions.js +23 -31
- package/extensions/dm-lens/clients/inline-blocker-fields.js +36 -3
- package/extensions/dm-lens/clients/install-diagnostics.js +1 -1
- package/extensions/dm-lens/clients/installer/index.js +176 -100
- package/extensions/dm-lens/clients/installer/managed-tool-refresh.js +12 -18
- package/extensions/dm-lens/clients/instance-reaper.js +10 -14
- package/extensions/dm-lens/clients/instance-registry.js +1 -7
- package/extensions/dm-lens/clients/issues-status.js +19 -0
- package/extensions/dm-lens/clients/jscpd-client.js +105 -130
- package/extensions/dm-lens/clients/knip-client.js +7 -9
- package/extensions/dm-lens/clients/language-policy.js +2 -0
- package/extensions/dm-lens/clients/language-registry.js +46 -2
- package/extensions/dm-lens/clients/lens-config.js +24 -10
- package/extensions/dm-lens/clients/lens-engine.js +117 -22
- package/extensions/dm-lens/clients/lens-events.js +16 -45
- package/extensions/dm-lens/clients/lens-flag-registry.js +55 -5
- package/extensions/dm-lens/clients/live-bus-emitter.js +134 -3
- package/extensions/dm-lens/clients/lsp/client-registry.js +75 -38
- package/extensions/dm-lens/clients/lsp/client.js +327 -78
- package/extensions/dm-lens/clients/lsp/config.js +151 -41
- package/extensions/dm-lens/clients/lsp/content-limits.js +24 -4
- package/extensions/dm-lens/clients/lsp/diagnostic-binding.js +23 -2
- package/extensions/dm-lens/clients/lsp/document-drift.js +2 -4
- package/extensions/dm-lens/clients/lsp/edits.js +38 -27
- package/extensions/dm-lens/clients/lsp/environment-gap.js +11 -14
- package/extensions/dm-lens/clients/lsp/grouping.js +5 -1
- package/extensions/dm-lens/clients/lsp/index.js +256 -163
- package/extensions/dm-lens/clients/lsp/inferred-project.js +2 -11
- package/extensions/dm-lens/clients/lsp/jvm-runtime.js +3 -90
- package/extensions/dm-lens/clients/lsp/launch.js +18 -14
- package/extensions/dm-lens/clients/lsp/request-timeout-error.js +18 -0
- package/extensions/dm-lens/clients/lsp/resolved-config.js +2 -1
- package/extensions/dm-lens/clients/lsp/server-config-files.js +8 -1
- package/extensions/dm-lens/clients/lsp/server.js +281 -140
- package/extensions/dm-lens/clients/lsp/session-roots.js +1 -6
- package/extensions/dm-lens/clients/lsp/wait-policy/strategies.js +7 -14
- package/extensions/dm-lens/clients/lsp/workspace-diagnostics-cache.js +8 -10
- package/extensions/dm-lens/clients/lsp/workspace-sweep-hold.js +1 -1
- package/extensions/dm-lens/clients/lsp-document-symbols.js +14 -11
- package/extensions/dm-lens/clients/lsp-mutation.js +114 -82
- package/extensions/dm-lens/clients/mcp/analyze.js +9 -4
- package/extensions/dm-lens/clients/mcp/ipc.js +28 -9
- package/extensions/dm-lens/clients/mcp/review.js +2 -1
- package/extensions/dm-lens/clients/mcp/session.js +15 -10
- package/extensions/dm-lens/clients/memory-sampler.js +11 -10
- package/extensions/dm-lens/clients/metrics/complexity-baseline.js +288 -0
- package/extensions/dm-lens/clients/metrics/function-metrics.js +388 -0
- package/extensions/dm-lens/clients/metrics-history.js +9 -4
- package/extensions/dm-lens/clients/module-report-lsp.js +7 -6
- package/extensions/dm-lens/clients/module-report.js +290 -116
- package/extensions/dm-lens/clients/mutating-tool.js +11 -5
- package/extensions/dm-lens/clients/mutation-bridge.js +40 -9
- package/extensions/dm-lens/clients/observed-mutation.js +3 -2
- package/extensions/dm-lens/clients/opaque-mutation-scan.js +80 -11
- package/extensions/dm-lens/clients/opengrep-client.js +64 -77
- package/extensions/dm-lens/clients/out-of-band-changes.js +109 -24
- package/extensions/dm-lens/clients/package-manager.js +31 -16
- package/extensions/dm-lens/clients/package-root.js +2 -2
- package/extensions/dm-lens/clients/partial-edit-apply.js +3 -233
- package/extensions/dm-lens/clients/path-globs.js +90 -0
- package/extensions/dm-lens/clients/path-utils.js +42 -29
- package/extensions/dm-lens/clients/performance-report.js +8 -3
- package/extensions/dm-lens/clients/persistent-reverify.js +26 -15
- package/extensions/dm-lens/clients/pid-liveness.js +21 -0
- package/extensions/dm-lens/clients/pipeline.js +97 -86
- package/extensions/dm-lens/clients/post-autofix-notice.js +1 -0
- package/extensions/dm-lens/clients/pre-edit-capture.js +67 -0
- package/extensions/dm-lens/clients/probe-home-state.js +3 -14
- package/extensions/dm-lens/clients/project-diagnostics/fresh-fetch.js +8 -16
- package/extensions/dm-lens/clients/project-diagnostics/scanner.js +2 -10
- package/extensions/dm-lens/clients/project-lens-config.js +164 -74
- package/extensions/dm-lens/clients/project-report.js +138 -47
- package/extensions/dm-lens/clients/project-snapshot.js +12 -4
- package/extensions/dm-lens/clients/project-trust.js +39 -1
- package/extensions/dm-lens/clients/python-environment.js +13 -8
- package/extensions/dm-lens/clients/quiet-window.js +3 -13
- package/extensions/dm-lens/clients/read-expansion.js +16 -7
- package/extensions/dm-lens/clients/read-guard-logger.js +1 -2
- package/extensions/dm-lens/clients/read-guard-tool-lines.js +18 -96
- package/extensions/dm-lens/clients/read-guard.js +4 -1
- package/extensions/dm-lens/clients/recent-touches.js +42 -26
- package/extensions/dm-lens/clients/report-scan.js +92 -0
- package/extensions/dm-lens/clients/resource-sampler.js +6 -1
- package/extensions/dm-lens/clients/review-graph/builder.js +40 -22
- package/extensions/dm-lens/clients/review-graph/git-identity.js +5 -11
- package/extensions/dm-lens/clients/review-graph/import-resolvers.js +13 -18
- package/extensions/dm-lens/clients/review-graph/query.js +11 -1
- package/extensions/dm-lens/clients/review-graph/types.js +1 -0
- package/extensions/dm-lens/clients/review-graph/workspace-modules.js +8 -11
- package/extensions/dm-lens/clients/ruff-client.js +23 -20
- package/extensions/dm-lens/clients/rules-scanner.js +2 -1
- package/extensions/dm-lens/clients/runtime-agent-end.js +82 -90
- package/extensions/dm-lens/clients/runtime-config.js +1 -0
- package/extensions/dm-lens/clients/runtime-context.js +75 -11
- package/extensions/dm-lens/clients/runtime-coordinator.js +269 -87
- package/extensions/dm-lens/clients/runtime-session.js +106 -152
- package/extensions/dm-lens/clients/runtime-tool-call.js +202 -227
- package/extensions/dm-lens/clients/runtime-tool-result.js +390 -80
- package/extensions/dm-lens/clients/runtime-turn.js +356 -98
- package/extensions/dm-lens/clients/safe-spawn.js +43 -27
- package/extensions/dm-lens/clients/scratch-tree-policy.js +29 -13
- package/extensions/dm-lens/clients/secret-findings.js +8 -5
- package/extensions/dm-lens/clients/security-scan-client.js +18 -0
- package/extensions/dm-lens/clients/session-lifecycle.js +13 -1
- package/extensions/dm-lens/clients/session-scope.js +41 -0
- package/extensions/dm-lens/clients/sg-runner.js +84 -33
- package/extensions/dm-lens/clients/sgconfig.js +2 -2
- package/extensions/dm-lens/clients/shell-dialect.js +62 -0
- package/extensions/dm-lens/clients/single-flight.js +4 -2
- package/extensions/dm-lens/clients/source-filter.js +7 -2
- package/extensions/dm-lens/clients/spawn-abort-scope.js +10 -0
- package/extensions/dm-lens/clients/spawn-timeout-cooldown.js +2 -1
- package/extensions/dm-lens/clients/staged-delta.js +461 -0
- package/extensions/dm-lens/clients/startup-scan.js +3 -2
- package/extensions/dm-lens/clients/startup-timing.js +2 -2
- package/extensions/dm-lens/clients/test-runner-client.js +50 -17
- package/extensions/dm-lens/clients/test-runner-delivery.js +31 -4
- package/extensions/dm-lens/clients/tool-agreement.js +25 -49
- package/extensions/dm-lens/clients/tool-config-presence.js +476 -0
- package/extensions/dm-lens/clients/tool-config.js +2 -2
- package/extensions/dm-lens/clients/tool-cwd.js +33 -11
- package/extensions/dm-lens/clients/tool-policy.js +187 -633
- package/extensions/dm-lens/clients/tool-probe.js +1 -1
- package/extensions/dm-lens/clients/tool-set-policy.js +5 -1
- package/extensions/dm-lens/clients/tree-sitter-client.js +83 -10
- package/extensions/dm-lens/clients/tree-sitter-query-loader.js +3 -2
- package/extensions/dm-lens/clients/tree-sitter-symbol-extractor.js +177 -3
- package/extensions/dm-lens/clients/trivy-client.js +68 -83
- package/extensions/dm-lens/clients/turn-end/delivery-holds.js +7 -3
- package/extensions/dm-lens/clients/turn-end/lanes/govulncheck.js +13 -1
- package/extensions/dm-lens/clients/turn-end/lanes/secrets.js +11 -9
- package/extensions/dm-lens/clients/warm-attach.js +7 -5
- package/extensions/dm-lens/clients/widget-state.js +228 -47
- package/extensions/dm-lens/clients/word-index.js +32 -19
- package/extensions/dm-lens/clients/write-source-file.js +30 -0
- package/extensions/dm-lens/clients/writers.js +529 -0
- package/extensions/dm-lens/clients/zizmor-config.js +3 -3
- package/extensions/dm-lens/config/dependency-cruiser-eager-allowlist.json +2 -1
- package/extensions/dm-lens/config/markdownlint/run-no-fix.mjs +23 -0
- package/extensions/dm-lens/dist/clients/actionable-warnings.js +11 -5
- package/extensions/dm-lens/dist/clients/advisory-provenance.js +6 -2
- package/extensions/dm-lens/dist/clients/agent-behavior-client.js +32 -2
- package/extensions/dm-lens/dist/clients/agent-nudge.js +10 -0
- package/extensions/dm-lens/dist/clients/analysis-root.js +3 -6
- package/extensions/dm-lens/dist/clients/ast-grep-client.js +123 -33
- package/extensions/dm-lens/dist/clients/ast-grep-tool-logger.js +1 -0
- package/extensions/dm-lens/dist/clients/background-write-drains.js +16 -0
- package/extensions/dm-lens/dist/clients/bash-file-access.js +556 -78
- package/extensions/dm-lens/dist/clients/blocker-freshness.js +5 -5
- package/extensions/dm-lens/dist/clients/bootstrap.js +1 -3
- package/extensions/dm-lens/dist/clients/bounded-pid-file-lock.js +3 -12
- package/extensions/dm-lens/dist/clients/bounded-telemetry.js +1 -0
- package/extensions/dm-lens/dist/clients/bundled-resource-health.js +1 -0
- package/extensions/dm-lens/dist/clients/bus-event-rollup.js +1 -0
- package/extensions/dm-lens/dist/clients/bus-publish.js +44 -83
- package/extensions/dm-lens/dist/clients/cache-manager.js +7 -14
- package/extensions/dm-lens/dist/clients/cache-observability.js +32 -58
- package/extensions/dm-lens/dist/clients/cargo-manifest.js +3 -3
- package/extensions/dm-lens/dist/clients/cascade-budget.js +2 -3
- package/extensions/dm-lens/dist/clients/cascade-format.js +21 -9
- package/extensions/dm-lens/dist/clients/command-path.js +26 -0
- package/extensions/dm-lens/dist/clients/complexity-client.js +23 -259
- package/extensions/dm-lens/dist/clients/config-diagnostic-codes.js +1 -1
- package/extensions/dm-lens/dist/clients/config-locations.js +10 -4
- package/extensions/dm-lens/dist/clients/config-resolve.js +5 -3
- package/extensions/dm-lens/dist/clients/config-schema.js +28 -2
- package/extensions/dm-lens/dist/clients/context-injection-ledger.js +3 -0
- package/extensions/dm-lens/dist/clients/dead-code-client.js +10 -13
- package/extensions/dm-lens/dist/clients/deadline-utils.js +22 -13
- package/extensions/dm-lens/dist/clients/deferred-runner-blockers.js +1 -1
- package/extensions/dm-lens/dist/clients/degradation-ledger.js +23 -9
- package/extensions/dm-lens/dist/clients/dependency-checker.js +7 -9
- package/extensions/dm-lens/dist/clients/diagnostic-dispositions.js +93 -10
- package/extensions/dm-lens/dist/clients/diagnostics-publish.js +37 -81
- package/extensions/dm-lens/dist/clients/dispatch/adopted-root-runners.js +1 -0
- package/extensions/dm-lens/dist/clients/dispatch/auxiliary-lsp.js +54 -3
- package/extensions/dm-lens/dist/clients/dispatch/collect-later-tier.js +61 -4
- package/extensions/dm-lens/dist/clients/dispatch/disabled-runners.js +57 -0
- package/extensions/dm-lens/dist/clients/dispatch/dispatcher.js +264 -235
- package/extensions/dm-lens/dist/clients/dispatch/fact-rule-runner.js +3 -0
- package/extensions/dm-lens/dist/clients/dispatch/fact-runner.js +3 -0
- package/extensions/dm-lens/dist/clients/dispatch/fact-store.js +1 -1
- package/extensions/dm-lens/dist/clients/dispatch/facts/comment-facts.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/facts/function-facts.js +10 -85
- package/extensions/dm-lens/dist/clients/dispatch/facts/try-catch-facts.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/finding-policy.js +64 -6
- package/extensions/dm-lens/dist/clients/dispatch/integration.js +298 -111
- package/extensions/dm-lens/dist/clients/dispatch/pending-runner-findings.js +4 -1
- package/extensions/dm-lens/dist/clients/dispatch/plan.js +5 -0
- package/extensions/dm-lens/dist/clients/dispatch/pre-edit-seed.js +28 -7
- package/extensions/dm-lens/dist/clients/dispatch/rule-id-normalize.js +67 -0
- package/extensions/dm-lens/dist/clients/dispatch/rule-ignores.js +4 -4
- package/extensions/dm-lens/dist/clients/dispatch/rule-policy.js +147 -33
- package/extensions/dm-lens/dist/clients/dispatch/rules/async-noise.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/async-unnecessary-wrapper.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/cors-wildcard.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/error-obscuring.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/error-swallowing.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-complexity.js +5 -4
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-fan-out.js +3 -2
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-import-coupling.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/missing-error-propagation.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/no-commented-credentials.js +7 -2
- package/extensions/dm-lens/dist/clients/dispatch/rules/pass-through-wrappers.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/placeholder-comments.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/rules/unsafe-boundary.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/runner-context.js +4 -8
- package/extensions/dm-lens/dist/clients/dispatch/runners/actionlint.js +6 -10
- package/extensions/dm-lens/dist/clients/dispatch/runners/ast-grep-napi.js +4 -3
- package/extensions/dm-lens/dist/clients/dispatch/runners/biome-check.js +7 -4
- package/extensions/dm-lens/dist/clients/dispatch/runners/cpp-check.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/runners/credo.js +263 -14
- package/extensions/dm-lens/dist/clients/dispatch/runners/cue-vet.js +8 -3
- package/extensions/dm-lens/dist/clients/dispatch/runners/dart-analyze.js +4 -2
- package/extensions/dm-lens/dist/clients/dispatch/runners/detekt.js +137 -37
- package/extensions/dm-lens/dist/clients/dispatch/runners/dotnet-build.js +5 -3
- package/extensions/dm-lens/dist/clients/dispatch/runners/elixir-check.js +8 -7
- package/extensions/dm-lens/dist/clients/dispatch/runners/eslint.js +29 -18
- package/extensions/dm-lens/dist/clients/dispatch/runners/fish-indent.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/runners/gleam-check.js +8 -5
- package/extensions/dm-lens/dist/clients/dispatch/runners/go-vet.js +6 -5
- package/extensions/dm-lens/dist/clients/dispatch/runners/golangci-lint.js +14 -12
- package/extensions/dm-lens/dist/clients/dispatch/runners/hadolint.js +8 -11
- package/extensions/dm-lens/dist/clients/dispatch/runners/helm-lint.js +15 -14
- package/extensions/dm-lens/dist/clients/dispatch/runners/helm-render.js +23 -22
- package/extensions/dm-lens/dist/clients/dispatch/runners/htmlhint.js +8 -11
- package/extensions/dm-lens/dist/clients/dispatch/runners/javac.js +8 -5
- package/extensions/dm-lens/dist/clients/dispatch/runners/ktlint.js +6 -10
- package/extensions/dm-lens/dist/clients/dispatch/runners/lsp.js +33 -15
- package/extensions/dm-lens/dist/clients/dispatch/runners/markdownlint.js +12 -30
- package/extensions/dm-lens/dist/clients/dispatch/runners/mypy.js +11 -13
- package/extensions/dm-lens/dist/clients/dispatch/runners/oxlint.js +25 -18
- package/extensions/dm-lens/dist/clients/dispatch/runners/php-lint.js +2 -1
- package/extensions/dm-lens/dist/clients/dispatch/runners/phpstan.js +212 -8
- package/extensions/dm-lens/dist/clients/dispatch/runners/prisma-validate.js +10 -7
- package/extensions/dm-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +25 -12
- package/extensions/dm-lens/dist/clients/dispatch/runners/pyright.js +13 -7
- package/extensions/dm-lens/dist/clients/dispatch/runners/rubocop.js +9 -12
- package/extensions/dm-lens/dist/clients/dispatch/runners/ruff.js +26 -11
- package/extensions/dm-lens/dist/clients/dispatch/runners/rust-clippy.js +14 -4
- package/extensions/dm-lens/dist/clients/dispatch/runners/shellcheck.js +11 -60
- package/extensions/dm-lens/dist/clients/dispatch/runners/shfmt.js +7 -8
- package/extensions/dm-lens/dist/clients/dispatch/runners/spellcheck.js +14 -11
- package/extensions/dm-lens/dist/clients/dispatch/runners/spotbugs.js +9 -9
- package/extensions/dm-lens/dist/clients/dispatch/runners/sqlfluff.js +9 -14
- package/extensions/dm-lens/dist/clients/dispatch/runners/stylelint.js +11 -13
- package/extensions/dm-lens/dist/clients/dispatch/runners/swiftlint.js +15 -22
- package/extensions/dm-lens/dist/clients/dispatch/runners/taplo.js +28 -23
- package/extensions/dm-lens/dist/clients/dispatch/runners/terragrunt.js +12 -10
- package/extensions/dm-lens/dist/clients/dispatch/runners/tflint.js +8 -12
- package/extensions/dm-lens/dist/clients/dispatch/runners/tree-sitter.js +3 -2
- package/extensions/dm-lens/dist/clients/dispatch/runners/trivy-config.js +13 -14
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/availability-policy.js +18 -0
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +8 -4
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/ignore-anchor.js +105 -0
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/lazy-installer.js +10 -0
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/markdownlint-api.js +52 -0
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +257 -391
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/spawn-outcome.js +8 -3
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/tool-failure.js +44 -17
- package/extensions/dm-lens/dist/clients/dispatch/runners/vale.js +24 -30
- package/extensions/dm-lens/dist/clients/dispatch/runners/yamllint.js +14 -17
- package/extensions/dm-lens/dist/clients/dispatch/runners/zig-check.js +4 -2
- package/extensions/dm-lens/dist/clients/dispatch/types.js +119 -2
- package/extensions/dm-lens/dist/clients/dispatch/utils/lsp-diagnostics.js +2 -1
- package/extensions/dm-lens/dist/clients/disposition-publish.js +13 -61
- package/extensions/dm-lens/dist/clients/effective-config.js +43 -18
- package/extensions/dm-lens/dist/clients/env-utils.js +13 -0
- package/extensions/dm-lens/dist/clients/event-loop-hold.js +1 -1
- package/extensions/dm-lens/dist/clients/feature-hints.js +2 -1
- package/extensions/dm-lens/dist/clients/file-kinds.js +13 -0
- package/extensions/dm-lens/dist/clients/file-role.js +3 -4
- package/extensions/dm-lens/dist/clients/file-time.js +1 -16
- package/extensions/dm-lens/dist/clients/file-utils.js +59 -49
- package/extensions/dm-lens/dist/clients/finding-delivery-gate.js +2 -1
- package/extensions/dm-lens/dist/clients/finding-identity.js +12 -2
- package/extensions/dm-lens/dist/clients/fix-run-restore.js +3 -6
- package/extensions/dm-lens/dist/clients/fix-worklog.js +0 -22
- package/extensions/dm-lens/dist/clients/format-events-publish.js +84 -266
- package/extensions/dm-lens/dist/clients/format-service.js +3 -10
- package/extensions/dm-lens/dist/clients/formatters.js +146 -109
- package/extensions/dm-lens/dist/clients/generation-lock.js +2 -11
- package/extensions/dm-lens/dist/clients/git-guard.js +518 -161
- package/extensions/dm-lens/dist/clients/gitleaks-client.js +53 -79
- package/extensions/dm-lens/dist/clients/govulncheck-client.js +9 -0
- package/extensions/dm-lens/dist/clients/gradle-ktfmt-style.js +10 -11
- package/extensions/dm-lens/dist/clients/grammar-source.js +10 -3
- package/extensions/dm-lens/dist/clients/inline-blocker-dispositions.js +22 -30
- package/extensions/dm-lens/dist/clients/inline-blocker-fields.js +36 -3
- package/extensions/dm-lens/dist/clients/install-diagnostics.js +1 -1
- package/extensions/dm-lens/dist/clients/installer/index.js +176 -100
- package/extensions/dm-lens/dist/clients/installer/managed-tool-refresh.js +12 -18
- package/extensions/dm-lens/dist/clients/instance-reaper.js +10 -14
- package/extensions/dm-lens/dist/clients/instance-registry.js +1 -7
- package/extensions/dm-lens/dist/clients/issues-status.js +19 -0
- package/extensions/dm-lens/dist/clients/jscpd-client.js +105 -130
- package/extensions/dm-lens/dist/clients/knip-client.js +5 -6
- package/extensions/dm-lens/dist/clients/language-policy.js +2 -0
- package/extensions/dm-lens/dist/clients/language-registry.js +42 -2
- package/extensions/dm-lens/dist/clients/lens-config.js +24 -10
- package/extensions/dm-lens/dist/clients/lens-engine.js +109 -24
- package/extensions/dm-lens/dist/clients/lens-events.js +15 -43
- package/extensions/dm-lens/dist/clients/lens-flag-registry.js +52 -4
- package/extensions/dm-lens/dist/clients/live-bus-emitter.js +134 -3
- package/extensions/dm-lens/dist/clients/lsp/client-registry.js +75 -39
- package/extensions/dm-lens/dist/clients/lsp/client.js +326 -79
- package/extensions/dm-lens/dist/clients/lsp/config.js +150 -43
- package/extensions/dm-lens/dist/clients/lsp/content-limits.js +21 -4
- package/extensions/dm-lens/dist/clients/lsp/diagnostic-binding.js +23 -2
- package/extensions/dm-lens/dist/clients/lsp/document-drift.js +2 -4
- package/extensions/dm-lens/dist/clients/lsp/edits.js +35 -27
- package/extensions/dm-lens/dist/clients/lsp/environment-gap.js +11 -14
- package/extensions/dm-lens/dist/clients/lsp/grouping.js +5 -1
- package/extensions/dm-lens/dist/clients/lsp/index.js +243 -164
- package/extensions/dm-lens/dist/clients/lsp/inferred-project.js +2 -11
- package/extensions/dm-lens/dist/clients/lsp/jvm-runtime.js +3 -85
- package/extensions/dm-lens/dist/clients/lsp/launch.js +14 -14
- package/extensions/dm-lens/dist/clients/lsp/request-timeout-error.js +18 -0
- package/extensions/dm-lens/dist/clients/lsp/resolved-config.js +2 -1
- package/extensions/dm-lens/dist/clients/lsp/server-config-files.js +8 -1
- package/extensions/dm-lens/dist/clients/lsp/server.js +272 -140
- package/extensions/dm-lens/dist/clients/lsp/session-roots.js +1 -6
- package/extensions/dm-lens/dist/clients/lsp/wait-policy/strategies.js +7 -14
- package/extensions/dm-lens/dist/clients/lsp/workspace-diagnostics-cache.js +3 -10
- package/extensions/dm-lens/dist/clients/lsp/workspace-sweep-hold.js +1 -1
- package/extensions/dm-lens/dist/clients/lsp-document-symbols.js +11 -11
- package/extensions/dm-lens/dist/clients/lsp-mutation.js +111 -82
- package/extensions/dm-lens/dist/clients/mcp/analyze.js +7 -4
- package/extensions/dm-lens/dist/clients/mcp/ipc.js +28 -9
- package/extensions/dm-lens/dist/clients/mcp/review.js +2 -1
- package/extensions/dm-lens/dist/clients/mcp/session.js +15 -10
- package/extensions/dm-lens/dist/clients/memory-sampler.js +11 -10
- package/extensions/dm-lens/dist/clients/metrics/complexity-baseline.js +276 -0
- package/extensions/dm-lens/dist/clients/metrics/function-metrics.js +386 -0
- package/extensions/dm-lens/dist/clients/metrics-history.js +5 -4
- package/extensions/dm-lens/dist/clients/module-report-lsp.js +7 -6
- package/extensions/dm-lens/dist/clients/module-report.js +285 -116
- package/extensions/dm-lens/dist/clients/mutating-tool.js +11 -5
- package/extensions/dm-lens/dist/clients/mutation-bridge.js +40 -9
- package/extensions/dm-lens/dist/clients/observed-mutation.js +3 -2
- package/extensions/dm-lens/dist/clients/opaque-mutation-scan.js +80 -12
- package/extensions/dm-lens/dist/clients/opengrep-client.js +64 -77
- package/extensions/dm-lens/dist/clients/out-of-band-changes.js +105 -24
- package/extensions/dm-lens/dist/clients/package-manager.js +31 -16
- package/extensions/dm-lens/dist/clients/package-root.js +2 -2
- package/extensions/dm-lens/dist/clients/partial-edit-apply.js +3 -224
- package/extensions/dm-lens/dist/clients/path-globs.js +87 -0
- package/extensions/dm-lens/dist/clients/path-utils.js +42 -29
- package/extensions/dm-lens/dist/clients/performance-report.js +5 -3
- package/extensions/dm-lens/dist/clients/persistent-reverify.js +26 -15
- package/extensions/dm-lens/dist/clients/pid-liveness.js +21 -0
- package/extensions/dm-lens/dist/clients/pipeline.js +93 -76
- package/extensions/dm-lens/dist/clients/post-autofix-notice.js +1 -0
- package/extensions/dm-lens/dist/clients/pre-edit-capture.js +67 -0
- package/extensions/dm-lens/dist/clients/probe-home-state.js +3 -14
- package/extensions/dm-lens/dist/clients/project-diagnostics/fresh-fetch.js +8 -16
- package/extensions/dm-lens/dist/clients/project-diagnostics/scanner.js +2 -10
- package/extensions/dm-lens/dist/clients/project-lens-config.js +163 -76
- package/extensions/dm-lens/dist/clients/project-report.js +138 -47
- package/extensions/dm-lens/dist/clients/project-snapshot.js +12 -4
- package/extensions/dm-lens/dist/clients/project-trust.js +36 -1
- package/extensions/dm-lens/dist/clients/python-environment.js +13 -8
- package/extensions/dm-lens/dist/clients/quiet-window.js +3 -13
- package/extensions/dm-lens/dist/clients/read-expansion.js +16 -7
- package/extensions/dm-lens/dist/clients/read-guard-logger.js +1 -2
- package/extensions/dm-lens/dist/clients/read-guard-tool-lines.js +18 -96
- package/extensions/dm-lens/dist/clients/read-guard.js +4 -1
- package/extensions/dm-lens/dist/clients/recent-touches.js +42 -26
- package/extensions/dm-lens/dist/clients/report-scan.js +92 -0
- package/extensions/dm-lens/dist/clients/resource-sampler.js +6 -1
- package/extensions/dm-lens/dist/clients/review-graph/builder.js +38 -23
- package/extensions/dm-lens/dist/clients/review-graph/git-identity.js +5 -12
- package/extensions/dm-lens/dist/clients/review-graph/import-resolvers.js +13 -18
- package/extensions/dm-lens/dist/clients/review-graph/query.js +9 -1
- package/extensions/dm-lens/dist/clients/review-graph/types.js +1 -1
- package/extensions/dm-lens/dist/clients/review-graph/workspace-modules.js +8 -11
- package/extensions/dm-lens/dist/clients/ruff-client.js +23 -17
- package/extensions/dm-lens/dist/clients/rules-scanner.js +2 -1
- package/extensions/dm-lens/dist/clients/runtime-agent-end.js +82 -83
- package/extensions/dm-lens/dist/clients/runtime-config.js +1 -0
- package/extensions/dm-lens/dist/clients/runtime-context.js +75 -12
- package/extensions/dm-lens/dist/clients/runtime-coordinator.js +256 -86
- package/extensions/dm-lens/dist/clients/runtime-session.js +99 -152
- package/extensions/dm-lens/dist/clients/runtime-tool-call.js +193 -221
- package/extensions/dm-lens/dist/clients/runtime-tool-result.js +372 -83
- package/extensions/dm-lens/dist/clients/runtime-turn.js +356 -101
- package/extensions/dm-lens/dist/clients/safe-spawn.js +40 -27
- package/extensions/dm-lens/dist/clients/scratch-tree-policy.js +29 -10
- package/extensions/dm-lens/dist/clients/secret-findings.js +8 -5
- package/extensions/dm-lens/dist/clients/security-scan-client.js +16 -0
- package/extensions/dm-lens/dist/clients/session-lifecycle.js +13 -1
- package/extensions/dm-lens/dist/clients/session-scope.js +41 -0
- package/extensions/dm-lens/dist/clients/sg-runner.js +84 -30
- package/extensions/dm-lens/dist/clients/sgconfig.js +2 -2
- package/extensions/dm-lens/dist/clients/shell-dialect.js +62 -0
- package/extensions/dm-lens/dist/clients/single-flight.js +4 -2
- package/extensions/dm-lens/dist/clients/source-filter.js +3 -2
- package/extensions/dm-lens/dist/clients/spawn-abort-scope.js +10 -0
- package/extensions/dm-lens/dist/clients/spawn-timeout-cooldown.js +2 -1
- package/extensions/dm-lens/dist/clients/staged-delta.js +452 -0
- package/extensions/dm-lens/dist/clients/startup-scan.js +3 -2
- package/extensions/dm-lens/dist/clients/startup-timing.js +2 -2
- package/extensions/dm-lens/dist/clients/test-runner-client.js +47 -17
- package/extensions/dm-lens/dist/clients/test-runner-delivery.js +31 -4
- package/extensions/dm-lens/dist/clients/tool-agreement.js +25 -27
- package/extensions/dm-lens/dist/clients/tool-config-presence.js +476 -0
- package/extensions/dm-lens/dist/clients/tool-config.js +2 -2
- package/extensions/dm-lens/dist/clients/tool-cwd.js +28 -10
- package/extensions/dm-lens/dist/clients/tool-policy.js +185 -629
- package/extensions/dm-lens/dist/clients/tool-probe.js +1 -1
- package/extensions/dm-lens/dist/clients/tool-set-policy.js +5 -1
- package/extensions/dm-lens/dist/clients/tree-sitter-client.js +83 -10
- package/extensions/dm-lens/dist/clients/tree-sitter-query-loader.js +3 -2
- package/extensions/dm-lens/dist/clients/tree-sitter-symbol-extractor.js +177 -3
- package/extensions/dm-lens/dist/clients/trivy-client.js +63 -83
- package/extensions/dm-lens/dist/clients/turn-end/delivery-holds.js +7 -3
- package/extensions/dm-lens/dist/clients/turn-end/lanes/govulncheck.js +13 -1
- package/extensions/dm-lens/dist/clients/turn-end/lanes/secrets.js +11 -9
- package/extensions/dm-lens/dist/clients/warm-attach.js +7 -6
- package/extensions/dm-lens/dist/clients/widget-state.js +221 -48
- package/extensions/dm-lens/dist/clients/word-index.js +32 -19
- package/extensions/dm-lens/dist/clients/write-source-file.js +30 -0
- package/extensions/dm-lens/dist/clients/writers.js +529 -0
- package/extensions/dm-lens/dist/clients/zizmor-config.js +3 -3
- package/extensions/dm-lens/dist/index.js +159 -51
- package/extensions/dm-lens/dist/mcp/analyze-cli.js +7 -9
- package/extensions/dm-lens/dist/mcp/build-staleness.js +16 -0
- package/extensions/dm-lens/dist/mcp/input-schema.js +23 -0
- package/extensions/dm-lens/dist/mcp/server.js +146 -306
- package/extensions/dm-lens/dist/mcp/tool-arguments.js +15 -2
- package/extensions/dm-lens/dist/scripts/lib/latency-log-phases.mjs +81 -0
- package/extensions/dm-lens/dist/scripts/lib/process-scan.mjs +1 -1
- package/extensions/dm-lens/dist/tools/activate-tools.js +2 -0
- package/extensions/dm-lens/dist/tools/ast-grep-outline.js +45 -28
- package/extensions/dm-lens/dist/tools/ast-grep-replace.js +68 -10
- package/extensions/dm-lens/dist/tools/ast-grep-search.js +15 -19
- package/extensions/dm-lens/dist/tools/effective-config.js +19 -5
- package/extensions/dm-lens/dist/tools/lens-diagnostic-mark.js +80 -66
- package/extensions/dm-lens/dist/tools/lens-diagnostics.js +229 -82
- package/extensions/dm-lens/dist/tools/lsp-diagnostics.js +109 -66
- package/extensions/dm-lens/dist/tools/lsp-navigation-text.js +438 -0
- package/extensions/dm-lens/dist/tools/lsp-navigation.js +141 -57
- package/extensions/dm-lens/dist/tools/lsp-structured-output.js +37 -32
- package/extensions/dm-lens/dist/tools/module-report.js +16 -16
- package/extensions/dm-lens/dist/tools/project-report.js +12 -10
- package/extensions/dm-lens/dist/tools/render-compact.js +40 -0
- package/extensions/dm-lens/dist/tools/shared.js +123 -6
- package/extensions/dm-lens/dist/tools/symbol-search.js +26 -55
- package/extensions/dm-lens/index.js +176 -49
- package/extensions/dm-lens/mcp/analyze-cli.js +7 -9
- package/extensions/dm-lens/mcp/build-staleness.js +16 -0
- package/extensions/dm-lens/mcp/input-schema.js +23 -0
- package/extensions/dm-lens/mcp/server.js +159 -313
- package/extensions/dm-lens/mcp/tool-arguments.js +15 -2
- package/extensions/dm-lens/package.json +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rule-schema.json +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/array-callback-return-js-test.yml +23 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/array-callback-return-test.yml +23 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-accumulating-spread-js-test.yml +37 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-js-test.yml +8 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-negation-in-equality-check-test.yml +8 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/ts-redundant-filter-map-test.yml +12 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-js-test.yml +16 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/unchecked-throwing-call-test.yml +16 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-js-test.yml +12 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests-disabled/filter-then-map-test.yml +25 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/array-callback-return-js.yml +8 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/array-callback-return.yml +8 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
- package/extensions/dm-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
- package/extensions/dm-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
- package/extensions/dm-lens/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-accumulating-spread-js.yml +49 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check-js.yml +17 -5
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-negation-in-equality-check.yml +17 -5
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +1 -2
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +1 -2
- package/extensions/dm-lens/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
- package/extensions/dm-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
- package/extensions/dm-lens/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
- package/extensions/dm-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
- package/extensions/dm-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
- package/extensions/dm-lens/rules/ast-grep-rules/rules/ts-redundant-filter-map.yml +9 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/unchecked-throwing-call-js.yml +8 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules/unchecked-throwing-call.yml +8 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rules-disabled/filter-then-map-js.yml +17 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules-disabled/filter-then-map.yml +36 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
- package/extensions/dm-lens/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
- package/extensions/dm-lens/rules/ast-grep-rules/self-scan-baseline.json +1 -1
- package/extensions/dm-lens/rules/tree-sitter-queries/typescript/ts-react-antipatterns.yml +8 -0
- package/extensions/dm-lens/scripts/lib/latency-log-phases.mjs +81 -0
- package/extensions/dm-lens/scripts/lib/process-scan.mjs +1 -1
- package/extensions/dm-lens/skills/dm-lens-lsp-navigation/SKILL.md +5 -1
- package/extensions/dm-lens/tools/activate-tools.js +2 -0
- package/extensions/dm-lens/tools/ast-grep-outline.js +50 -28
- package/extensions/dm-lens/tools/ast-grep-replace.js +73 -10
- package/extensions/dm-lens/tools/ast-grep-search.js +21 -22
- package/extensions/dm-lens/tools/effective-config.js +19 -5
- package/extensions/dm-lens/tools/lens-diagnostic-mark.js +83 -66
- package/extensions/dm-lens/tools/lens-diagnostics.js +241 -80
- package/extensions/dm-lens/tools/lsp-diagnostics.js +117 -61
- package/extensions/dm-lens/tools/lsp-navigation-text.js +441 -0
- package/extensions/dm-lens/tools/lsp-navigation.js +153 -57
- package/extensions/dm-lens/tools/lsp-structured-output.js +37 -32
- package/extensions/dm-lens/tools/module-report.js +21 -16
- package/extensions/dm-lens/tools/project-report.js +13 -9
- package/extensions/dm-lens/tools/render-compact.js +40 -0
- package/extensions/dm-lens/tools/shared.js +127 -6
- package/extensions/dm-lens/tools/symbol-search.js +26 -54
- package/extensions/dm-lens/vendor/grammars/tree-sitter-groovy.wasm +0 -0
- package/extensions/dm-mcp-adapter/THIRD_PARTY_NOTICES.md +1 -1
- package/extensions/dm-mcp-adapter/app-bridge.bundle.js +7082 -5121
- package/extensions/dm-mcp-adapter/cli.js +3 -4
- package/extensions/dm-mcp-adapter/commands.js +3 -6
- package/extensions/dm-mcp-adapter/deferred-tool-surface.js +2 -6
- package/extensions/dm-mcp-adapter/direct-tools.js +2 -2
- package/extensions/dm-mcp-adapter/dist/elicitation-handler.js +12 -2
- package/extensions/dm-mcp-adapter/dist/json-schema-validator.js +3 -2
- package/extensions/dm-mcp-adapter/dist/mcp-auth-flow.js +0 -13
- package/extensions/dm-mcp-adapter/dist/sampling-handler.js +2 -0
- package/extensions/dm-mcp-adapter/dist/server-log.js +2 -1
- package/extensions/dm-mcp-adapter/dist/server-manager.js +5 -4
- package/extensions/dm-mcp-adapter/dist/session-recovery.js +1 -1
- package/extensions/dm-mcp-adapter/dist/task-jobs.js +50 -19
- package/extensions/dm-mcp-adapter/dist/types.js +34 -20
- package/extensions/dm-mcp-adapter/dist/utils.js +14 -0
- package/extensions/dm-mcp-adapter/elicitation-handler.js +12 -2
- package/extensions/dm-mcp-adapter/index.js +29 -1
- package/extensions/dm-mcp-adapter/init.js +69 -27
- package/extensions/dm-mcp-adapter/json-schema-validator.js +3 -2
- package/extensions/dm-mcp-adapter/mcp-auth-flow.js +0 -13
- package/extensions/dm-mcp-adapter/mcp-references.js +3 -2
- package/extensions/dm-mcp-adapter/package.json +1 -1
- package/extensions/dm-mcp-adapter/pi-signin-import.js +1 -2
- package/extensions/dm-mcp-adapter/prompts.js +4 -6
- package/extensions/dm-mcp-adapter/proxy-modes.js +19 -11
- package/extensions/dm-mcp-adapter/sampling-handler.js +2 -0
- package/extensions/dm-mcp-adapter/server-log.js +2 -1
- package/extensions/dm-mcp-adapter/server-manager.js +6 -4
- package/extensions/dm-mcp-adapter/session-recovery.js +1 -1
- package/extensions/dm-mcp-adapter/task-jobs.js +50 -19
- package/extensions/dm-mcp-adapter/types.js +34 -20
- package/extensions/dm-mcp-adapter/utils.js +14 -0
- package/extensions/dm-ponytail/hooks/band/metrics.js +4 -9
- package/extensions/dm-ponytail/hooks/band/register.js +33 -38
- package/extensions/dm-ponytail/package.json +1 -1
- package/extensions/dm-subagents/package.json +1 -1
- package/extensions/dm-subagents/skills/dm-subagents/SKILL.md +15 -6
- package/extensions/dm-subagents/skills/dm-subagents/references/prompting-and-roles.md +1 -0
- package/extensions/dm-subagents/src/agents/agent-management.js +41 -17
- package/extensions/dm-subagents/src/agents/agent-serializer.js +1 -1
- package/extensions/dm-subagents/src/agents/agents.js +44 -16
- package/extensions/dm-subagents/src/agents/global-npm-root.js +10 -2
- package/extensions/dm-subagents/src/api/preflight.js +4 -2
- package/extensions/dm-subagents/src/extension/config.js +9 -1
- package/extensions/dm-subagents/src/extension/herdr-dm-bridge.js +83 -24
- package/extensions/dm-subagents/src/extension/index.js +89 -43
- package/extensions/dm-subagents/src/extension/public-execution.js +4 -0
- package/extensions/dm-subagents/src/extension/reply-workflow-script.js +24 -4
- package/extensions/dm-subagents/src/extension/schemas.js +8 -1
- package/extensions/dm-subagents/src/extension/session-switch.js +130 -0
- package/extensions/dm-subagents/src/extension/subagent-launch-tool.js +81 -0
- package/extensions/dm-subagents/src/extension/subagent-options.js +4 -0
- package/extensions/dm-subagents/src/extension/tool-activation.js +37 -15
- package/extensions/dm-subagents/src/extension/tool-description.js +14 -8
- package/extensions/dm-subagents/src/integrations/herdr-status.js +3 -8
- package/extensions/dm-subagents/src/intercom/native-supervisor-channel.js +62 -9
- package/extensions/dm-subagents/src/intercom/result-intercom.js +3 -2
- package/extensions/dm-subagents/src/runs/background/async-execution.js +70 -18
- package/extensions/dm-subagents/src/runs/background/async-job-tracker.js +11 -0
- package/extensions/dm-subagents/src/runs/background/async-resume.js +74 -34
- package/extensions/dm-subagents/src/runs/background/async-retention.js +26 -16
- package/extensions/dm-subagents/src/runs/background/async-status.js +4 -0
- package/extensions/dm-subagents/src/runs/background/auto-drain.js +2 -1
- package/extensions/dm-subagents/src/runs/background/fleet-view.js +2 -1
- package/extensions/dm-subagents/src/runs/background/notify.js +7 -2
- package/extensions/dm-subagents/src/runs/background/result-watcher.js +54 -29
- package/extensions/dm-subagents/src/runs/background/resume-guidance.js +4 -2
- package/extensions/dm-subagents/src/runs/background/retained-children.js +2 -1
- package/extensions/dm-subagents/src/runs/background/run-child-session.js +9 -8
- package/extensions/dm-subagents/src/runs/background/run-status.js +12 -9
- package/extensions/dm-subagents/src/runs/background/runner-aliases.js +11 -0
- package/extensions/dm-subagents/src/runs/background/runner-child-launch.js +1 -0
- package/extensions/dm-subagents/src/runs/background/scheduled-runs.js +8 -3
- package/extensions/dm-subagents/src/runs/background/stale-run-reconciler.js +11 -8
- package/extensions/dm-subagents/src/runs/background/steering.js +11 -6
- package/extensions/dm-subagents/src/runs/background/subagent-runner.js +87 -72
- package/extensions/dm-subagents/src/runs/background/subagent-wait.js +11 -10
- package/extensions/dm-subagents/src/runs/background/wait-config.js +17 -4
- package/extensions/dm-subagents/src/runs/background/wait-subscriptions.js +104 -13
- package/extensions/dm-subagents/src/runs/background/wait-tool.js +4 -2
- package/extensions/dm-subagents/src/runs/foreground/async-steering-action.js +23 -8
- package/extensions/dm-subagents/src/runs/foreground/async-stop-action.js +9 -1
- package/extensions/dm-subagents/src/runs/foreground/execution.js +94 -30
- package/extensions/dm-subagents/src/runs/foreground/prompt-audit.js +1 -0
- package/extensions/dm-subagents/src/runs/foreground/subagent-executor.js +195 -61
- package/extensions/dm-subagents/src/runs/shared/acceptance.js +57 -22
- package/extensions/dm-subagents/src/runs/shared/async-status-projection.js +11 -1
- package/extensions/dm-subagents/src/runs/shared/child-commands.js +13 -2
- package/extensions/dm-subagents/src/runs/shared/child-hooks.js +10 -5
- package/extensions/dm-subagents/src/runs/shared/child-launch.js +12 -6
- package/extensions/dm-subagents/src/runs/shared/child-session.js +98 -59
- package/extensions/dm-subagents/src/runs/shared/claude-code-adapter.js +6 -0
- package/extensions/dm-subagents/src/runs/shared/external-cli-contract.js +15 -13
- package/extensions/dm-subagents/src/runs/shared/external-cli-runner.js +22 -6
- package/extensions/dm-subagents/src/runs/shared/herdr-connection.js +10 -2
- package/extensions/dm-subagents/src/runs/shared/herdr-dm-protocol.js +3 -2
- package/extensions/dm-subagents/src/runs/shared/herdr-machine.js +42 -21
- package/extensions/dm-subagents/src/runs/shared/herdr-pane-host.js +40 -21
- package/extensions/dm-subagents/src/runs/shared/herdr-placed-run.js +48 -25
- package/extensions/dm-subagents/src/runs/shared/kept-branch-text.js +22 -0
- package/extensions/dm-subagents/src/runs/shared/local-machine-access.js +2 -2
- package/extensions/dm-subagents/src/runs/shared/mcp-config-sources.js +1 -1
- package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-allowlist.js +27 -19
- package/extensions/dm-subagents/src/runs/shared/mcp-direct-tool-grant.js +7 -1
- package/extensions/dm-subagents/src/runs/shared/model-resolution-diagnostic.js +19 -0
- package/extensions/dm-subagents/src/runs/shared/model-resolution.js +46 -42
- package/extensions/dm-subagents/src/runs/shared/mutation-evidence.js +68 -7
- package/extensions/dm-subagents/src/runs/shared/nested-events.js +1 -1
- package/extensions/dm-subagents/src/runs/shared/parallel-handoff.js +18 -7
- package/extensions/dm-subagents/src/runs/shared/permissions.js +5 -3
- package/extensions/dm-subagents/src/runs/shared/placed-run-owner.js +13 -8
- package/extensions/dm-subagents/src/runs/shared/rex-machine.js +10 -7
- package/extensions/dm-subagents/src/runs/shared/rex-pane-host.js +7 -24
- package/extensions/dm-subagents/src/runs/shared/run-launch-folder.js +11 -0
- package/extensions/dm-subagents/src/runs/shared/runner-launcher.js +12 -0
- package/extensions/dm-subagents/src/runs/shared/single-output.js +4 -2
- package/extensions/dm-subagents/src/runs/shared/structured-output.js +35 -5
- package/extensions/dm-subagents/src/runs/shared/subagent-prompt-runtime.js +16 -1
- package/extensions/dm-subagents/src/runs/shared/supervisor-wait-timer.js +59 -0
- package/extensions/dm-subagents/src/runs/shared/tool-timeout.js +2 -1
- package/extensions/dm-subagents/src/runs/shared/worktree-cleanup-plan.js +2 -2
- package/extensions/dm-subagents/src/runs/shared/worktree.js +61 -8
- package/extensions/dm-subagents/src/shared/artifacts.js +108 -18
- package/extensions/dm-subagents/src/shared/compaction-interruption.js +39 -0
- package/extensions/dm-subagents/src/shared/fleet-transcript-reader.js +317 -0
- package/extensions/dm-subagents/src/shared/parent-wake.js +14 -5
- package/extensions/dm-subagents/src/shared/pruned-fork.js +2 -2
- package/extensions/dm-subagents/src/shared/reported-progress.js +12 -0
- package/extensions/dm-subagents/src/shared/required-child-extensions.js +24 -0
- package/extensions/dm-subagents/src/shared/session-succession.js +28 -1
- package/extensions/dm-subagents/src/shared/session-warnings.js +21 -0
- package/extensions/dm-subagents/src/shared/status-format.js +1 -1
- package/extensions/dm-subagents/src/shared/utils.js +4 -0
- package/extensions/dm-subagents/src/shared/wait-tool-name.js +8 -0
- package/extensions/dm-subagents/src/slash/slash-commands.js +2 -1
- package/extensions/dm-subagents/src/slash/subagent-cost.js +15 -1
- package/extensions/dm-subagents/src/tui/fleet-status.js +4 -20
- package/extensions/dm-subagents/src/tui/fleet-transcript.js +1 -316
- package/extensions/dm-subagents/src/tui/fleet.js +22 -4
- package/extensions/dm-subagents/src/tui/render.js +174 -57
- package/extensions/dm-subagents/src/tui/subagent-messages.js +3 -2
- package/extensions/dm-subagents/src/watchdog/model-selection.js +2 -2
- package/extensions/dm-subagents/src/watchdog/permission-arbiter.js +1 -0
- package/extensions/dm-subagents/src/watchdog/review.js +4 -3
- package/extensions/dm-subagents/src/watchdog/turn-delta.js +2 -1
- package/extensions/dm-subagents/src/workflows/scripted-workflow.js +307 -1135
- package/extensions/dm-subagents/src/workflows/structured-workflow-scripts.js +28 -10
- package/extensions/dm-subagents/src/workflows/workflow-launch-record.js +29 -12
- package/extensions/dm-subagents/src/workflows/workflow-receipt.js +37 -48
- package/extensions/dm-subagents/src/workflows/workflow-resources.js +4 -4
- package/extensions/dm-subagents/src/workflows/workflow-resume-claim.js +3 -3
- package/extensions/dm-subagents/src/workflows/workflow-resume.js +11 -8
- package/extensions/dm-subagents/src/workflows/workflow-script-worker.js +76 -0
- package/extensions/dm-subagents/workflow-script-process.cjs +38 -0
- package/extensions/dm-subagents/workflow-script-worker.cjs +1389 -0
- package/extensions/dm-web-access/anysearch.js +6 -3
- package/extensions/dm-web-access/autom.js +181 -0
- package/extensions/dm-web-access/cloro.js +217 -0
- package/extensions/dm-web-access/cloudflare-search.js +205 -0
- package/extensions/dm-web-access/curator-page.js +22 -1
- package/extensions/dm-web-access/curator-server.js +16 -0
- package/extensions/dm-web-access/domain-filter-normalization.js +31 -0
- package/extensions/dm-web-access/duckduckgo-rate-limit.js +113 -25
- package/extensions/dm-web-access/duckduckgo.js +8 -2
- package/extensions/dm-web-access/exa.js +72 -9
- package/extensions/dm-web-access/extract.js +105 -13
- package/extensions/dm-web-access/gemini-search.js +64 -8
- package/extensions/dm-web-access/github-api.js +2 -2
- package/extensions/dm-web-access/github-extract.js +4 -3
- package/extensions/dm-web-access/index.js +21 -4
- package/extensions/dm-web-access/mcp-tool-definitions.js +44 -33
- package/extensions/dm-web-access/openai-search.js +4 -3
- package/extensions/dm-web-access/outcrawl.js +185 -0
- package/extensions/dm-web-access/package.json +1 -1
- package/extensions/dm-web-access/page-query.js +16 -3
- package/extensions/dm-web-access/pdf-extract.js +0 -2
- package/extensions/dm-web-access/searchapi.js +183 -0
- package/extensions/dm-web-access/sofya.js +182 -0
- package/extensions/dm-web-access/source-check.js +3 -1
- package/extensions/dm-web-access/specstream.js +235 -0
- package/extensions/dm-web-access/ssrf-protection.js +19 -1
- package/extensions/dm-web-access/summary-review.js +19 -9
- package/extensions/dm-web-access/tabstack.js +222 -0
- package/extensions/dm-web-access/tool-activation.js +18 -4
- package/extensions/dm-web-access/utils.js +61 -21
- package/extensions/dm-web-access/video-extract.js +3 -1
- package/extensions/dm-web-access/web-tool-core.js +10 -4
- package/extensions/dm-web-access/xai-search.js +4 -3
- package/extensions/dm-web-access/youtube-extract.js +3 -1
- package/package.json +4 -4
- package/extensions/dm-lens/clients/bus-events-logger.js +0 -48
- package/extensions/dm-lens/clients/metrics-client.js +0 -80
|
@@ -1,61 +1,43 @@
|
|
|
1
1
|
import * as nodeFs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { requestBootstrapClients } from "./bootstrap.js";
|
|
4
4
|
import { resolveSessionConfigRoot } from "./analysis-root.js";
|
|
5
5
|
import { recordDegradationOnce } from "./degradation-ledger.js";
|
|
6
|
-
import { detectFileKind } from "./file-kinds.js";
|
|
6
|
+
import { CODE_KINDS, detectFileKind } from "./file-kinds.js";
|
|
7
7
|
import { isPathIgnoredByProject } from "./file-utils.js";
|
|
8
8
|
import { evaluateGitGuard, isGitCommitOrPushAttempt } from "./git-guard.js";
|
|
9
|
+
import { gateStagedDelta } from "./staged-delta.js";
|
|
9
10
|
import { dropHashlineAnchorMemo } from "./hashline-anchor.js";
|
|
10
11
|
import { evaluateSharedCheckoutGuard } from "./shared-checkout-guard.js";
|
|
11
12
|
import { logLatency } from "./latency-logger.js";
|
|
12
13
|
import { captureFileStats, captureGitDirtyPaths, getOpaqueBaselineStore, headRecordKey, isGitWorktree, opaqueBaselineSlot, opaquePrescanRoot, recordOpaqueCaptureRefused, recordOpaqueRootRefusals, resolveOpaqueRecoveryRoots, shouldRunOpaqueRecovery } from "./opaque-mutation-scan.js";
|
|
13
14
|
import { bounded } from "./deadline-utils.js";
|
|
15
|
+
import { nonNegativeIntEnv } from "./env-utils.js";
|
|
14
16
|
import { HOOK_WALL_BUDGET_MS } from "./hook-budgets.js";
|
|
15
17
|
import { normalizeForGuardMatch } from "./host-edit-normalize.js";
|
|
16
18
|
import { retargetReplacementIndentation } from "./indent-retarget.js";
|
|
17
19
|
import { expectationFromToolInput, noteAgentCallEnd, noteAgentCallStart } from "./fix-run-restore.js";
|
|
18
20
|
import { LANGUAGE_POLICY } from "./language-policy.js";
|
|
19
|
-
import { isComplexitySupportedFile } from "./tree-sitter-shared.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
21
|
+
import { getSharedTreeSitterClient, isComplexitySupportedFile, resolveTreeSitterLanguage } from "./tree-sitter-shared.js";
|
|
22
|
+
import { captureComplexityBaseline, complexityBaselineKey } from "./metrics/complexity-baseline.js";
|
|
23
|
+
import { classifyMutatingTool, isProviderReplayCall, readMutationPathField } from "./mutating-tool.js";
|
|
24
|
+
import { isProvisionalLearnedAttribution, shouldArmObservationForTool } from "./mutation-attribution.js";
|
|
22
25
|
import { armObservedMutation } from "./observed-mutation.js";
|
|
23
26
|
import { extractWrittenPathsFromCommand } from "./bash-file-access.js";
|
|
24
27
|
import { getLSPService } from "./lsp/capabilities.js";
|
|
25
28
|
import { findDocumentSymbolAtLine, getOpenDocumentSymbols, lspSymbolKindName, qualifiedLspSymbolName } from "./lsp-document-symbols.js";
|
|
29
|
+
import { isLspRequestTimeoutError } from "./lsp/request-timeout-error.js";
|
|
26
30
|
import { computeTrailingWhitespaceOldTextPatch, findUniqueMatchLineRange } from "./oldtext-autopatch.js";
|
|
27
|
-
import { applyPartiallyApplicableEdits } from "./partial-edit-apply.js";
|
|
28
31
|
import { isExternalOrVendorFile, resolveToolCallFilePath, toPosix } from "./path-utils.js";
|
|
29
32
|
import { EXPANSION_BUDGET_MS, EXPANSION_LIMIT_LINES, tryExpandRead } from "./read-expansion.js";
|
|
30
33
|
import { scanFileLines } from "./read-guard.js";
|
|
31
|
-
import { boundedIndexesForCount, createReadGuardEditBatchSummary, getReadGuardCorrelationId, logReadGuardEvent } from "./read-guard-logger.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
+
import { boundedEditIndexes, boundedIndexesForCount, createReadGuardEditBatchSummary, formatBoundedEditIndexes, getReadGuardCorrelationId, logReadGuardEvent } from "./read-guard-logger.js";
|
|
35
|
+
import { getTouchedLinesForGuard, relocateEditRange, tryCorrectIndentationMismatch, tryCorrectIndentationMismatchFromContent } from "./read-guard-tool-lines.js";
|
|
36
|
+
import { resyncHeadMove } from "./runtime-tool-result.js";
|
|
34
37
|
import { resolveReadEvidenceCorrelationId, resolveToolCallCorrelationId } from "./tool-event.js";
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
const LSP_TOOLCALL_NAV_TOUCH_BUDGET_MS = Math.max(0, Number.parseInt(process.env.DM_LENS_TOOLCALL_NAV_TOUCH_MS ?? process.env.DM_LENS_LSP_NAV_CLIENT_WAIT_MS ?? "1500", 10) || 1500);
|
|
38
|
+
import { captureWriterSeeds } from "./pre-edit-capture.js";
|
|
39
|
+
export const LSP_TOOLCALL_NAV_TOUCH_BUDGET_MS = nonNegativeIntEnv(process.env.DM_LENS_TOOLCALL_NAV_TOUCH_MS === undefined ? "DM_LENS_LSP_NAV_CLIENT_WAIT_MS" : "DM_LENS_TOOLCALL_NAV_TOUCH_MS", 1500) || 1500;
|
|
38
40
|
const LSP_TOOLCALL_TOUCH_BUDGET_MS = Math.max(0, Number.parseInt(process.env.DM_LENS_TOOLCALL_TOUCH_MS ?? "750", 10) || 750);
|
|
39
|
-
function composePartialApplyReason(args) {
|
|
40
|
-
const parts = [];
|
|
41
|
-
const editSuffix = args.appliedCount === 1 ? "" : "s";
|
|
42
|
-
parts.push(args.postEditStatus === "failed" ? `⚠️ PARTIAL APPLY — ${args.appliedCount} edit${editSuffix} committed (${args.appliedIndices}). Post-edit analysis failed after the commit; the committed bytes stand and were not reverted. Do NOT resubmit the applied edits.` : `⚠️ PARTIAL APPLY — ${args.appliedCount} edit${editSuffix} committed (${args.appliedIndices}). Do NOT resubmit the applied edits.`);
|
|
43
|
-
if (args.preflightDetails && args.preflightDetails.length > 0) {
|
|
44
|
-
parts.push(args.preflightDetails.join(`
|
|
45
|
-
|
|
46
|
-
`));
|
|
47
|
-
}
|
|
48
|
-
const alreadyNotes = formatAlreadyAppliedNotes(args.alreadyAppliedEdits);
|
|
49
|
-
if (alreadyNotes)
|
|
50
|
-
parts.push(alreadyNotes.trimStart());
|
|
51
|
-
if (args.postEditOutput && args.postEditStatus === "succeeded") {
|
|
52
|
-
parts.push(`Post-apply analysis:
|
|
53
|
-
${args.postEditOutput}`);
|
|
54
|
-
}
|
|
55
|
-
return parts.join(`
|
|
56
|
-
|
|
57
|
-
`);
|
|
58
|
-
}
|
|
59
41
|
function getToolCallRawFilePath(toolName, event) {
|
|
60
42
|
const inputObj = event.input ?? {};
|
|
61
43
|
const mutation = classifyMutatingTool({ ...event, toolName });
|
|
@@ -71,11 +53,13 @@ function getToolCallRawFilePath(toolName, event) {
|
|
|
71
53
|
if (toolName === "lsp_navigation") {
|
|
72
54
|
if (typeof inputObj.path === "string")
|
|
73
55
|
return inputObj.path;
|
|
56
|
+
if (typeof inputObj.file === "string")
|
|
57
|
+
return inputObj.file;
|
|
74
58
|
return typeof inputObj.filePath === "string" ? inputObj.filePath : undefined;
|
|
75
59
|
}
|
|
76
60
|
return;
|
|
77
61
|
}
|
|
78
|
-
function retireAstGrepApplyTargets(toolName, event, runtime, ctx) {
|
|
62
|
+
function retireAstGrepApplyTargets(toolName, event, runtime, ctx, sessionId) {
|
|
79
63
|
const input = event.input ?? {};
|
|
80
64
|
if (toolName !== "ast_grep_replace" || input.apply !== true)
|
|
81
65
|
return;
|
|
@@ -88,10 +72,10 @@ function retireAstGrepApplyTargets(toolName, event, runtime, ctx) {
|
|
|
88
72
|
const resolved = resolveToolCallFilePath(rawPath, ctx.cwd, runtime.projectRoot)?.path;
|
|
89
73
|
if (!resolved)
|
|
90
74
|
continue;
|
|
91
|
-
runtime.
|
|
75
|
+
runtime.readGuardFor(sessionId).retireChangedAuthorship?.(resolved);
|
|
92
76
|
checked.push(resolved);
|
|
93
77
|
}
|
|
94
|
-
runtime.
|
|
78
|
+
runtime.readGuardFor(sessionId).noteCheckedPaths?.(resolveToolCallCorrelationId(event), checked);
|
|
95
79
|
}
|
|
96
80
|
function getReadToolInput(toolName, input) {
|
|
97
81
|
if (toolName !== "read")
|
|
@@ -169,14 +153,15 @@ function getNewContentFromToolCall(event) {
|
|
|
169
153
|
}
|
|
170
154
|
return;
|
|
171
155
|
}
|
|
172
|
-
async function captureOpaqueBaseline(root, sessionRoot, startedAt, toolName) {
|
|
156
|
+
async function captureOpaqueBaseline(root, sessionRoot, startedAt, projectSeq, toolName) {
|
|
173
157
|
if (!sessionRoot)
|
|
174
|
-
return { state: { startedAt, strategy: "git" }, note: "git" };
|
|
158
|
+
return { state: { startedAt, projectSeq, strategy: "git" }, note: "git" };
|
|
175
159
|
if (await isGitWorktree(root)) {
|
|
176
160
|
const dirtyPaths = await captureGitDirtyPaths(root);
|
|
177
161
|
return {
|
|
178
162
|
state: {
|
|
179
163
|
startedAt,
|
|
164
|
+
projectSeq,
|
|
180
165
|
strategy: "git",
|
|
181
166
|
...dirtyPaths === undefined ? {} : { dirtyPaths }
|
|
182
167
|
},
|
|
@@ -187,8 +172,14 @@ async function captureOpaqueBaseline(root, sessionRoot, startedAt, toolName) {
|
|
|
187
172
|
if (outcome.unknownReason === "home-root")
|
|
188
173
|
recordOpaqueCaptureRefused("home-root", toolName);
|
|
189
174
|
return {
|
|
190
|
-
state: outcome.snapshot ? {
|
|
175
|
+
state: outcome.snapshot ? {
|
|
191
176
|
startedAt,
|
|
177
|
+
projectSeq,
|
|
178
|
+
strategy: "stat-diff",
|
|
179
|
+
stats: outcome.snapshot
|
|
180
|
+
} : {
|
|
181
|
+
startedAt,
|
|
182
|
+
projectSeq,
|
|
192
183
|
strategy: "stat-diff",
|
|
193
184
|
statsUnknownReason: outcome.unknownReason ?? "walk-failed"
|
|
194
185
|
},
|
|
@@ -236,7 +227,9 @@ export async function handleToolCall(deps) {
|
|
|
236
227
|
}
|
|
237
228
|
}
|
|
238
229
|
async function handleToolCallImpl(deps) {
|
|
239
|
-
const { event, ctx, lensEnabled, getFlag, dbg, runtime, cacheManager, ensureLSPConfigInitialized, updateLspStatus,
|
|
230
|
+
const { event, ctx, lensEnabled, getFlag, dbg, runtime, cacheManager, ensureLSPConfigInitialized, updateLspStatus, getTreeSitterClient = getSharedTreeSitterClient } = deps;
|
|
231
|
+
const callSessionId = deps.sessionId ?? runtime.telemetrySessionId;
|
|
232
|
+
const callSession = runtime.captureSessionGeneration();
|
|
240
233
|
dropHashlineAnchorMemo();
|
|
241
234
|
const readGuardCorrelationId = getReadGuardCorrelationId(event);
|
|
242
235
|
let filePath;
|
|
@@ -280,11 +273,14 @@ async function handleToolCallImpl(deps) {
|
|
|
280
273
|
hook: "tool_call",
|
|
281
274
|
label: "head-move-resync"
|
|
282
275
|
});
|
|
276
|
+
const writerPaths = isProviderReplayCall(event) ? [] : namedWriterPaths(deps, toolName);
|
|
277
|
+
if (writerPaths.length > 0)
|
|
278
|
+
await captureWriterSeeds(namedWriterTargets(writerPaths, runtime.projectRoot), writerSeedDeps(deps), true, "disk");
|
|
283
279
|
const commandInput = event.input;
|
|
284
280
|
if (toolName === "bash") {
|
|
285
281
|
if (typeof commandInput?.command === "string" && !getFlag("no-read-guard"))
|
|
286
282
|
for (const target of extractWrittenPathsFromCommand(commandInput.command, runtime.projectRoot || process.cwd()))
|
|
287
|
-
runtime.
|
|
283
|
+
runtime.readGuardFor(deps.sessionId).retireChangedAuthorship?.(target);
|
|
288
284
|
}
|
|
289
285
|
const scanRoot = opaquePrescanRoot(ctx.cwd, runtime.projectRoot);
|
|
290
286
|
const callId = resolveToolCallCorrelationId(event);
|
|
@@ -292,9 +288,10 @@ async function handleToolCallImpl(deps) {
|
|
|
292
288
|
if (otherOpaqueTool && callId === undefined)
|
|
293
289
|
recordOpaqueCaptureRefused("no-tool-call-id", toolName);
|
|
294
290
|
const opaqueCommand = toolName === "bash" ? typeof commandInput?.command === "string" && commandInput.command ? commandInput.command : undefined : otherOpaqueTool && callId !== undefined ? "" : undefined;
|
|
295
|
-
if (opaqueCommand !== undefined) {
|
|
291
|
+
if (opaqueCommand !== undefined && !isProviderReplayCall(event)) {
|
|
296
292
|
if (scanRoot && shouldRunOpaqueRecovery(toolName, scanRoot)) {
|
|
297
293
|
const started = Date.now();
|
|
294
|
+
const seqAtStart = runtime.projectSeq;
|
|
298
295
|
const scopes = resolveOpaqueRecoveryRoots(opaqueCommand, scanRoot);
|
|
299
296
|
recordOpaqueRootRefusals(scopes);
|
|
300
297
|
const turn = {
|
|
@@ -303,7 +300,7 @@ async function handleToolCallImpl(deps) {
|
|
|
303
300
|
};
|
|
304
301
|
let resultNote = "";
|
|
305
302
|
for (const [index, root] of scopes.roots.entries()) {
|
|
306
|
-
const baseline = await captureOpaqueBaseline(root, index === 0, started, toolName);
|
|
303
|
+
const baseline = await captureOpaqueBaseline(root, index === 0, started, seqAtStart, toolName);
|
|
307
304
|
if (index === 0)
|
|
308
305
|
resultNote = baseline.note;
|
|
309
306
|
getOpaqueBaselineStore().record(opaqueBaselineSlot(root, runtime.sessionGeneration), callId, baseline.state, turn);
|
|
@@ -321,16 +318,16 @@ async function handleToolCallImpl(deps) {
|
|
|
321
318
|
});
|
|
322
319
|
}
|
|
323
320
|
}
|
|
324
|
-
if ((mutation === undefined || isProvisionalLearnedAttribution(toolName)) && toolName !== "bash" && !getFlag("no-read-guard")) {
|
|
321
|
+
if ((mutation === undefined || isProvisionalLearnedAttribution(toolName)) && toolName !== "bash" && !isProviderReplayCall(event) && !getFlag("no-read-guard")) {
|
|
325
322
|
const observedRawPath = readMutationPathField(event);
|
|
326
323
|
const observedPath = observedRawPath ? resolveToolCallFilePath(observedRawPath, ctx.cwd, runtime.projectRoot)?.path : undefined;
|
|
327
324
|
if (observedPath) {
|
|
328
325
|
const observedCallId = resolveToolCallCorrelationId(event);
|
|
329
326
|
const retire = (target) => {
|
|
330
|
-
runtime.
|
|
327
|
+
runtime.readGuardFor(deps.sessionId).retireChangedAuthorship?.(target);
|
|
331
328
|
};
|
|
332
329
|
retire(observedPath);
|
|
333
|
-
runtime.
|
|
330
|
+
runtime.readGuardFor(deps.sessionId).noteCheckedPaths?.(observedCallId, [observedPath]);
|
|
334
331
|
await armObservedMutation({
|
|
335
332
|
toolCallId: observedCallId,
|
|
336
333
|
toolName,
|
|
@@ -341,22 +338,30 @@ async function handleToolCallImpl(deps) {
|
|
|
341
338
|
isLiveTurn: (key) => runtime.isLiveTurnKey(key),
|
|
342
339
|
onUniverse: (paths) => {
|
|
343
340
|
paths.forEach(retire);
|
|
344
|
-
runtime.
|
|
341
|
+
runtime.readGuardFor(deps.sessionId).noteCheckedPaths?.(observedCallId, paths);
|
|
345
342
|
},
|
|
346
343
|
signal: ctx.signal,
|
|
347
344
|
dbg
|
|
348
345
|
});
|
|
349
346
|
}
|
|
350
347
|
}
|
|
351
|
-
retireAstGrepApplyTargets(toolName, event, runtime, ctx);
|
|
348
|
+
retireAstGrepApplyTargets(toolName, event, runtime, ctx, deps.sessionId);
|
|
352
349
|
if (getFlag("lens-guard") && isGitCommitOrPushAttempt(toolName, event.input)) {
|
|
353
|
-
const guard = evaluateGitGuard(runtime, cacheManager, ctx.cwd ?? runtime.projectRoot, ctx.host ?? "pi", deps.sessionId);
|
|
350
|
+
const guard = evaluateGitGuard(runtime, cacheManager, ctx.cwd ?? runtime.projectRoot, ctx.host ?? "pi", deps.sessionId, { toolName, input: event.input });
|
|
354
351
|
if (guard.block) {
|
|
355
352
|
return {
|
|
356
353
|
block: true,
|
|
357
354
|
reason: guard.reason
|
|
358
355
|
};
|
|
359
356
|
}
|
|
357
|
+
const gateCwd = ctx.cwd ?? runtime.projectRoot;
|
|
358
|
+
const stagedGuard = await gateStagedDelta(toolName, event.input, { cwd: gateCwd, projectRoot: runtime.projectRoot || gateCwd, getFlag }, ctx.signal);
|
|
359
|
+
if (stagedGuard.block) {
|
|
360
|
+
return {
|
|
361
|
+
block: true,
|
|
362
|
+
...stagedGuard.reason === undefined ? {} : { reason: stagedGuard.reason }
|
|
363
|
+
};
|
|
364
|
+
}
|
|
360
365
|
}
|
|
361
366
|
if (getFlag("lens-checkout-guard")) {
|
|
362
367
|
const sharedCheckout = await evaluateSharedCheckoutGuard(toolName, event.input, ctx.cwd ?? runtime.projectRoot ?? process.cwd());
|
|
@@ -484,7 +489,7 @@ async function handleToolCallImpl(deps) {
|
|
|
484
489
|
let enclosingSymbol;
|
|
485
490
|
if (toolName === "read" && toolCallId !== undefined)
|
|
486
491
|
runtime.takeReadWidening(toolCallId);
|
|
487
|
-
const readExpansionClient = toolName === "read" && !getFlag("no-lsp") && !getFlag("no-read-guard") && !isExternalOrVendor && filePath && readInput && requestedReadLimit != null && requestedReadLimit <= EXPANSION_LIMIT_LINES ? getTreeSitterClient() : null;
|
|
492
|
+
const readExpansionClient = toolName === "read" && !getFlag("no-lsp") && !getFlag("no-read-guard") && !getFlag("no-read-expansion") && !isExternalOrVendor && filePath && readInput && requestedReadLimit != null && requestedReadLimit <= EXPANSION_LIMIT_LINES ? getTreeSitterClient() : null;
|
|
488
493
|
if (readExpansionClient && filePath && readInput && requestedReadLimit != null) {
|
|
489
494
|
try {
|
|
490
495
|
const expansion = await tryExpandRead(filePath, requestedReadOffset, requestedReadLimit, readTotalLines, readExpansionClient);
|
|
@@ -494,8 +499,29 @@ async function handleToolCallImpl(deps) {
|
|
|
494
499
|
effectiveReadOffset = expansion.newOffset;
|
|
495
500
|
effectiveReadLimit = expansion.newLimit;
|
|
496
501
|
let enriched = false;
|
|
502
|
+
let lspSymbolTimedOut = false;
|
|
497
503
|
let enrichedAncestry = expansion.ancestry;
|
|
498
|
-
|
|
504
|
+
let lspSymbols;
|
|
505
|
+
let lspSymbolOutcome;
|
|
506
|
+
let lspSymbolError;
|
|
507
|
+
try {
|
|
508
|
+
const result = await bounded(() => getOpenDocumentSymbols(filePath).then((symbols) => ({ symbols })), {
|
|
509
|
+
ms: EXPANSION_BUDGET_MS,
|
|
510
|
+
signal: deps.ctx.signal,
|
|
511
|
+
hook: "tool_call",
|
|
512
|
+
label: "read-lsp-document-symbols"
|
|
513
|
+
});
|
|
514
|
+
lspSymbols = result?.symbols;
|
|
515
|
+
if (result === undefined)
|
|
516
|
+
lspSymbolOutcome = deps.ctx.signal?.aborted ? "caller-abort" : "outer-deadline";
|
|
517
|
+
} catch (err) {
|
|
518
|
+
if (isLspRequestTimeoutError(err))
|
|
519
|
+
lspSymbolTimedOut = true;
|
|
520
|
+
else {
|
|
521
|
+
lspSymbolOutcome = "failed";
|
|
522
|
+
lspSymbolError = String(err instanceof Error ? err.message : err).slice(0, 512);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
499
525
|
const located = lspSymbols ? findDocumentSymbolAtLine(lspSymbols, expansion.enclosingSymbol.startLine) : undefined;
|
|
500
526
|
if (located) {
|
|
501
527
|
enclosingSymbol = {
|
|
@@ -529,7 +555,7 @@ async function handleToolCallImpl(deps) {
|
|
|
529
555
|
}
|
|
530
556
|
logToolReadGuardEvent({
|
|
531
557
|
event: "ts_range_expanded",
|
|
532
|
-
sessionId:
|
|
558
|
+
sessionId: callSessionId,
|
|
533
559
|
filePath,
|
|
534
560
|
requestedOffset: requestedReadOffset,
|
|
535
561
|
requestedLimit: requestedReadLimit,
|
|
@@ -541,6 +567,9 @@ async function handleToolCallImpl(deps) {
|
|
|
541
567
|
symbolEndLine: expansion.enclosingSymbol.endLine,
|
|
542
568
|
metadata: {
|
|
543
569
|
enriched,
|
|
570
|
+
...lspSymbolTimedOut && { lspSymbolTimeout: true },
|
|
571
|
+
...lspSymbolOutcome && { lspSymbolOutcome },
|
|
572
|
+
...lspSymbolError !== undefined && { lspSymbolError },
|
|
544
573
|
durationMs: expansion.durationMs,
|
|
545
574
|
budgetMs: EXPANSION_BUDGET_MS
|
|
546
575
|
}
|
|
@@ -560,7 +589,7 @@ async function handleToolCallImpl(deps) {
|
|
|
560
589
|
const lineHashes = readScan?.hashes(effectiveReadOffset, deliveredLimit);
|
|
561
590
|
logToolReadGuardEvent({
|
|
562
591
|
event: "read_pattern",
|
|
563
|
-
sessionId:
|
|
592
|
+
sessionId: callSessionId,
|
|
564
593
|
filePath,
|
|
565
594
|
requestedOffset: requestedReadOffset,
|
|
566
595
|
requestedLimit: requestedReadLimit ?? deliveredLimit,
|
|
@@ -574,7 +603,7 @@ async function handleToolCallImpl(deps) {
|
|
|
574
603
|
expandedByTs: enclosingSymbol !== undefined
|
|
575
604
|
}
|
|
576
605
|
});
|
|
577
|
-
runtime.
|
|
606
|
+
runtime.readGuardFor(deps.sessionId).recordRead({
|
|
578
607
|
filePath,
|
|
579
608
|
requestedOffset: requestedReadOffset,
|
|
580
609
|
requestedLimit: requestedReadLimit ?? deliveredLimit,
|
|
@@ -592,24 +621,26 @@ async function handleToolCallImpl(deps) {
|
|
|
592
621
|
}
|
|
593
622
|
}, { captureLineHashes: false });
|
|
594
623
|
}
|
|
595
|
-
if (!getFlag("no-complexity") && !isExternalOrVendor && filePath && !runtime.complexityBaselines.has(filePath) && isComplexitySupportedFile(filePath)) {
|
|
624
|
+
if (!getFlag("no-complexity") && !isExternalOrVendor && filePath && !runtime.complexityBaselines.has(complexityBaselineKey(filePath)) && isComplexitySupportedFile(filePath)) {
|
|
596
625
|
const complexityClient = (await requestBootstrapClients({
|
|
597
626
|
reason: "tool-call-complexity-baseline",
|
|
598
627
|
hook: "tool_call",
|
|
599
628
|
signal: deps.ctx.signal
|
|
600
629
|
}))?.complexityClient;
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
runtime.complexityBaselines.
|
|
630
|
+
const analysis = complexityClient ? await complexityClient.analyzeFile(filePath) : undefined;
|
|
631
|
+
if (complexityClient) {
|
|
632
|
+
callSession.guardedWrite(filePath, () => runtime.complexityBaselines.set(complexityBaselineKey(filePath), captureComplexityBaseline(analysis?.measuredFunctions)));
|
|
633
|
+
}
|
|
634
|
+
if (analysis && callSession.isCurrent()) {
|
|
604
635
|
const { captureSnapshot } = await import("./metrics-history.js");
|
|
605
|
-
captureSnapshot(filePath, {
|
|
606
|
-
maintainabilityIndex:
|
|
607
|
-
cognitiveComplexity:
|
|
608
|
-
maxNestingDepth:
|
|
609
|
-
linesOfCode:
|
|
610
|
-
maxCyclomatic:
|
|
611
|
-
entropy:
|
|
612
|
-
});
|
|
636
|
+
callSession.guardedWrite(filePath, () => captureSnapshot(filePath, {
|
|
637
|
+
maintainabilityIndex: analysis.maintainabilityIndex,
|
|
638
|
+
cognitiveComplexity: analysis.cognitiveComplexity,
|
|
639
|
+
maxNestingDepth: analysis.maxNestingDepth,
|
|
640
|
+
linesOfCode: analysis.linesOfCode,
|
|
641
|
+
maxCyclomatic: analysis.maxCyclomaticComplexity,
|
|
642
|
+
entropy: analysis.codeEntropy
|
|
643
|
+
}));
|
|
613
644
|
}
|
|
614
645
|
} else if (getFlag("no-complexity") && filePath && isComplexitySupportedFile(filePath)) {
|
|
615
646
|
recordDegradationOnce({
|
|
@@ -617,11 +648,21 @@ async function handleToolCallImpl(deps) {
|
|
|
617
648
|
subject: "complexity",
|
|
618
649
|
reason: "skipped (disabled by config)"
|
|
619
650
|
});
|
|
651
|
+
} else if (!getFlag("no-complexity") && !isExternalOrVendor && filePath && !isComplexitySupportedFile(filePath)) {
|
|
652
|
+
const kind = detectFileKind(filePath);
|
|
653
|
+
if (kind && CODE_KINDS.has(kind)) {
|
|
654
|
+
const language = resolveTreeSitterLanguage(filePath) ?? kind;
|
|
655
|
+
recordDegradationOnce({
|
|
656
|
+
kind: "function-metrics-language-unsupported",
|
|
657
|
+
subject: language,
|
|
658
|
+
reason: `no function-metrics table for ${language}`
|
|
659
|
+
});
|
|
660
|
+
}
|
|
620
661
|
}
|
|
621
662
|
const isEditOnly = mutation?.kind === "edit";
|
|
622
663
|
const isWriteOrEdit = mutation !== undefined;
|
|
623
664
|
if (!isEditOnly && isWriteOrEdit && event.toolName !== "bash" && filePath && !getFlag("no-read-guard")) {
|
|
624
|
-
runtime.
|
|
665
|
+
runtime.readGuardFor(deps.sessionId).noteCreatedFile(filePath, runtime.turnIndex, runtime.peekWriteIndex(), resolveReadEvidenceCorrelationId(event));
|
|
625
666
|
}
|
|
626
667
|
if (isEditOnly && filePath) {
|
|
627
668
|
const editInput = event.input;
|
|
@@ -673,7 +714,7 @@ async function handleToolCallImpl(deps) {
|
|
|
673
714
|
entry.value = escaped;
|
|
674
715
|
logToolReadGuardEvent({
|
|
675
716
|
event: "oldtext_escape_autopatched",
|
|
676
|
-
sessionId:
|
|
717
|
+
sessionId: callSessionId,
|
|
677
718
|
filePath,
|
|
678
719
|
metadata: { tool: "edit", label: entry.label }
|
|
679
720
|
});
|
|
@@ -697,7 +738,7 @@ async function handleToolCallImpl(deps) {
|
|
|
697
738
|
}
|
|
698
739
|
logToolReadGuardEvent({
|
|
699
740
|
event: "oldtext_trailing_ws_autopatched",
|
|
700
|
-
sessionId:
|
|
741
|
+
sessionId: callSessionId,
|
|
701
742
|
filePath,
|
|
702
743
|
metadata: {
|
|
703
744
|
tool: "edit",
|
|
@@ -707,10 +748,10 @@ async function handleToolCallImpl(deps) {
|
|
|
707
748
|
newTextTrailingEmptyLinesPatched: newTextPatched
|
|
708
749
|
}
|
|
709
750
|
});
|
|
710
|
-
if (matchNormalizedContent !== undefined
|
|
751
|
+
if (matchNormalizedContent !== undefined) {
|
|
711
752
|
const range = findUniqueMatchLineRange(matchNormalizedContent, patch.oldText);
|
|
712
753
|
if (range) {
|
|
713
|
-
runtime.
|
|
754
|
+
runtime.readGuardFor(deps.sessionId).recordRead({
|
|
714
755
|
filePath,
|
|
715
756
|
requestedOffset: range.startLine,
|
|
716
757
|
requestedLimit: range.endLine - range.startLine + 1,
|
|
@@ -752,7 +793,7 @@ async function handleToolCallImpl(deps) {
|
|
|
752
793
|
}
|
|
753
794
|
logToolReadGuardEvent({
|
|
754
795
|
event: "oldtext_indent_autopatched",
|
|
755
|
-
sessionId:
|
|
796
|
+
sessionId: callSessionId,
|
|
756
797
|
filePath,
|
|
757
798
|
metadata: {
|
|
758
799
|
tool: "edit",
|
|
@@ -761,10 +802,10 @@ async function handleToolCallImpl(deps) {
|
|
|
761
802
|
newTextIndentationPatched: correctedNewText !== undefined
|
|
762
803
|
}
|
|
763
804
|
});
|
|
764
|
-
if (matchNormalizedContent !== undefined
|
|
805
|
+
if (matchNormalizedContent !== undefined) {
|
|
765
806
|
const range = matchedRange;
|
|
766
807
|
if (range) {
|
|
767
|
-
runtime.
|
|
808
|
+
runtime.readGuardFor(deps.sessionId).recordRead({
|
|
768
809
|
filePath,
|
|
769
810
|
requestedOffset: range.startLine,
|
|
770
811
|
requestedLimit: range.endLine - range.startLine + 1,
|
|
@@ -780,114 +821,59 @@ async function handleToolCallImpl(deps) {
|
|
|
780
821
|
}
|
|
781
822
|
}
|
|
782
823
|
}
|
|
783
|
-
if (isEditOnly && filePath && !getFlag("no-read-guard")) {
|
|
784
|
-
const readGuard = runtime.
|
|
824
|
+
if (isEditOnly && filePath && !getFlag("no-read-guard") && !isProviderReplayCall(event)) {
|
|
825
|
+
const readGuard = runtime.readGuardFor(deps.sessionId);
|
|
785
826
|
const isExistingFile = typeof readGuard?.isNewFile !== "function" || !readGuard.isNewFile(filePath);
|
|
786
827
|
if (readGuard && isExistingFile && !isExternalOrVendor) {
|
|
787
|
-
const
|
|
828
|
+
const guardArgs = [
|
|
829
|
+
filePath,
|
|
830
|
+
callSessionId,
|
|
831
|
+
readGuardCorrelationId,
|
|
832
|
+
runtime.partialApplyRecords,
|
|
833
|
+
readGuard.contentMatchesLastRead(filePath)
|
|
834
|
+
];
|
|
835
|
+
let guardLines = getTouchedLinesForGuard(event, ...guardArgs);
|
|
836
|
+
const { preflightError, preflightDetails, alreadyAppliedEdits, partiallyApplicable, editBatchSummary } = guardLines;
|
|
788
837
|
if (preflightError) {
|
|
789
|
-
if (partiallyApplicable
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
};
|
|
793
|
-
try {
|
|
794
|
-
const partial = await applyPartiallyApplicableEdits({
|
|
795
|
-
filePath,
|
|
796
|
-
edits: partiallyApplicable,
|
|
797
|
-
summary: editBatchSummary,
|
|
798
|
-
correlationId: readGuardCorrelationId,
|
|
799
|
-
recordStore: runtime.partialApplyRecords,
|
|
800
|
-
afterWrite: async () => {
|
|
801
|
-
const { biomeClient, ruffClient, metricsClient, agentBehaviorClient } = await loadBootstrapClients();
|
|
802
|
-
const result = await handleToolResult({
|
|
803
|
-
signal: deps.ctx.signal,
|
|
804
|
-
event: {
|
|
805
|
-
toolName: "write",
|
|
806
|
-
input: { path: filePath },
|
|
807
|
-
details: {
|
|
808
|
-
piLensPartialApply: true,
|
|
809
|
-
readGuardCorrelationId
|
|
810
|
-
},
|
|
811
|
-
content: []
|
|
812
|
-
},
|
|
813
|
-
getFlag: (name) => getFlag(name),
|
|
814
|
-
dbg,
|
|
815
|
-
runtime,
|
|
816
|
-
cacheManager,
|
|
817
|
-
biomeClient,
|
|
818
|
-
ruffClient,
|
|
819
|
-
metricsClient,
|
|
820
|
-
resetLSPService,
|
|
821
|
-
readGuard: runtime.readGuard,
|
|
822
|
-
sessionId: deps.sessionId,
|
|
823
|
-
_ownWriteStamp: partialStamp,
|
|
824
|
-
agentBehaviorRecord: (toolName, analyzedPath) => agentBehaviorClient.recordToolCall(toolName, analyzedPath),
|
|
825
|
-
formatBehaviorWarnings: (warnings) => agentBehaviorClient.formatWarnings(warnings)
|
|
826
|
-
});
|
|
827
|
-
if (result?.isError) {
|
|
828
|
-
throw new Error("post-edit pipeline rejected synthetic partial apply");
|
|
829
|
-
}
|
|
830
|
-
return result?.content?.map((item) => item.text).filter((text) => !!text).join(`
|
|
831
|
-
|
|
832
|
-
`);
|
|
833
|
-
}
|
|
834
|
-
});
|
|
835
|
-
if (partial.rejected) {
|
|
836
|
-
if (!editBatchSummary)
|
|
837
|
-
logBlockedEditSummary("preflight");
|
|
838
|
-
return {
|
|
839
|
-
block: true,
|
|
840
|
-
reason: `${preflightError}
|
|
841
|
-
|
|
842
|
-
\uD83D\uDED1 Batch not applied: ${partial.rejected.detail}`
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
if (partial.postEditStatus === "failed") {
|
|
846
|
-
return {
|
|
847
|
-
block: true,
|
|
848
|
-
reason: composePartialApplyReason({
|
|
849
|
-
appliedCount: partial.appliedCount,
|
|
850
|
-
appliedIndices: partial.appliedIndices,
|
|
851
|
-
postEditStatus: "failed",
|
|
852
|
-
preflightDetails,
|
|
853
|
-
alreadyAppliedEdits
|
|
854
|
-
})
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
if (partial.appliedCount > 0) {
|
|
858
|
-
logToolReadGuardEvent({
|
|
859
|
-
event: "edit_partial_apply",
|
|
860
|
-
sessionId: runtime.telemetrySessionId,
|
|
861
|
-
filePath,
|
|
862
|
-
metadata: {
|
|
863
|
-
appliedCount: partial.appliedCount,
|
|
864
|
-
appliedTotal: partial.appliedTotal,
|
|
865
|
-
appliedIndices: partial.appliedIndices,
|
|
866
|
-
editBatchSummary: partial.summary,
|
|
867
|
-
routedThroughPostEditPipeline: true
|
|
868
|
-
}
|
|
869
|
-
});
|
|
870
|
-
return {
|
|
871
|
-
block: true,
|
|
872
|
-
reason: composePartialApplyReason({
|
|
873
|
-
appliedCount: partial.appliedCount,
|
|
874
|
-
appliedIndices: partial.appliedIndices,
|
|
875
|
-
postEditStatus: "succeeded",
|
|
876
|
-
postEditOutput: partial.postEditOutput,
|
|
877
|
-
preflightDetails,
|
|
878
|
-
alreadyAppliedEdits
|
|
879
|
-
})
|
|
880
|
-
};
|
|
881
|
-
}
|
|
882
|
-
} catch {}
|
|
838
|
+
if (!partiallyApplicable) {
|
|
839
|
+
if (!editBatchSummary)
|
|
840
|
+
logBlockedEditSummary("preflight");
|
|
841
|
+
return { block: true, reason: preflightError };
|
|
883
842
|
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
843
|
+
const input = event.input;
|
|
844
|
+
runtime.markToolCallPartialApply(input, {
|
|
845
|
+
applied: partiallyApplicable.map((edit) => ({
|
|
846
|
+
oldText: edit.oldText,
|
|
847
|
+
newText: edit.newText,
|
|
848
|
+
originalIndex: edit.originalIndex
|
|
849
|
+
})),
|
|
850
|
+
preflightError,
|
|
851
|
+
...preflightDetails && { preflightDetails },
|
|
852
|
+
...alreadyAppliedEdits && { alreadyAppliedEdits },
|
|
853
|
+
...editBatchSummary && { summary: editBatchSummary }
|
|
854
|
+
});
|
|
855
|
+
input.edits = partiallyApplicable.map((edit) => ({
|
|
856
|
+
oldText: edit.appliedSpanText,
|
|
857
|
+
newText: edit.newText ?? ""
|
|
858
|
+
}));
|
|
859
|
+
guardLines = getTouchedLinesForGuard(event, ...guardArgs);
|
|
860
|
+
noteAgentCallStart(toolCallId, filePath, expectationFromToolInput(input, "edit"));
|
|
861
|
+
logToolReadGuardEvent({
|
|
862
|
+
event: "edit_partial_apply",
|
|
863
|
+
sessionId: callSessionId,
|
|
864
|
+
filePath,
|
|
865
|
+
metadata: {
|
|
866
|
+
appliedCount: partiallyApplicable.length,
|
|
867
|
+
appliedIndices: formatBoundedEditIndexes(boundedEditIndexes(partiallyApplicable.map((edit) => edit.originalIndex))),
|
|
868
|
+
requestedTotal: requestedEditTotal,
|
|
869
|
+
rewrittenForHostEdit: true
|
|
870
|
+
}
|
|
871
|
+
});
|
|
887
872
|
}
|
|
873
|
+
const { touchedLines, editRanges, contentMatchValidated } = guardLines;
|
|
888
874
|
logToolReadGuardEvent({
|
|
889
875
|
event: "edit_check_started",
|
|
890
|
-
sessionId:
|
|
876
|
+
sessionId: callSessionId,
|
|
891
877
|
filePath,
|
|
892
878
|
metadata: {
|
|
893
879
|
tool: mutation?.kind ?? "edit",
|
|
@@ -906,7 +892,7 @@ async function handleToolCallImpl(deps) {
|
|
|
906
892
|
const relocated = relocateEditRange(event.input, verdict.relocation.from, verdict.relocation.to);
|
|
907
893
|
if (relocated) {
|
|
908
894
|
const [toStart, toEnd] = verdict.relocation.to;
|
|
909
|
-
runtime.
|
|
895
|
+
runtime.readGuardFor(deps.sessionId).recordRead({
|
|
910
896
|
filePath,
|
|
911
897
|
requestedOffset: toStart,
|
|
912
898
|
requestedLimit: toEnd - toStart + 1,
|
|
@@ -919,7 +905,7 @@ async function handleToolCallImpl(deps) {
|
|
|
919
905
|
});
|
|
920
906
|
logToolReadGuardEvent({
|
|
921
907
|
event: "edit_range_relocated",
|
|
922
|
-
sessionId:
|
|
908
|
+
sessionId: callSessionId,
|
|
923
909
|
filePath,
|
|
924
910
|
metadata: {
|
|
925
911
|
tool: "edit",
|
|
@@ -974,53 +960,39 @@ async function handleToolCallImpl(deps) {
|
|
|
974
960
|
}
|
|
975
961
|
}
|
|
976
962
|
}
|
|
977
|
-
if (isWriteOrEdit && !isExternalOrVendor)
|
|
978
|
-
|
|
979
|
-
const controller = new AbortController;
|
|
980
|
-
const signal = deps.ctx.signal ? AbortSignal.any([deps.ctx.signal, controller.signal]) : controller.signal;
|
|
981
|
-
const outcome = await bounded(capturePreEditSeed(filePath, deps, signal), {
|
|
982
|
-
ms: PRE_EDIT_CAPTURE_BUDGET_MS,
|
|
983
|
-
signal: deps.ctx.signal,
|
|
984
|
-
hook: "tool_call",
|
|
985
|
-
label: "pre-edit-linter-capture"
|
|
986
|
-
});
|
|
987
|
-
controller.abort();
|
|
988
|
-
if (!outcome || outcome.outcome === "failed")
|
|
989
|
-
recordDegradationOnce({
|
|
990
|
-
kind: "pre-edit-capture-incomplete",
|
|
991
|
-
subject: "pre-edit",
|
|
992
|
-
reason: outcome?.outcome ?? "abandoned"
|
|
993
|
-
});
|
|
994
|
-
recordPreEditCapture(filePath, outcome, Date.now() - started);
|
|
995
|
-
}
|
|
963
|
+
if (isWriteOrEdit && !isExternalOrVendor)
|
|
964
|
+
await captureWriterSeeds([filePath], writerSeedDeps(deps), mutation.provenance === "learned", "disk");
|
|
996
965
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
});
|
|
966
|
+
function writerSeedDeps(deps) {
|
|
967
|
+
return {
|
|
968
|
+
projectRoot: deps.runtime.projectRoot,
|
|
969
|
+
session: deps.runtime.captureSessionGeneration(),
|
|
970
|
+
getFlag: deps.getFlag,
|
|
971
|
+
signal: deps.ctx.signal,
|
|
972
|
+
hook: "tool_call"
|
|
973
|
+
};
|
|
1006
974
|
}
|
|
1007
|
-
function
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
975
|
+
function namedWriterPaths(deps, toolName) {
|
|
976
|
+
const { event, ctx, runtime } = deps;
|
|
977
|
+
const input = event.input ?? {};
|
|
978
|
+
const resolve = (raw) => {
|
|
979
|
+
const resolved = typeof raw === "string" ? resolveToolCallFilePath(raw, ctx.cwd, runtime.projectRoot)?.path : undefined;
|
|
980
|
+
return resolved === undefined ? [] : [resolved];
|
|
981
|
+
};
|
|
982
|
+
if (toolName === "bash")
|
|
983
|
+
return typeof input.command === "string" ? extractWrittenPathsFromCommand(input.command, runtime.projectRoot || process.cwd()) : [];
|
|
984
|
+
if (toolName === "ast_grep_replace")
|
|
985
|
+
return input.apply === true && Array.isArray(input.paths) ? input.paths.flatMap(resolve) : [];
|
|
986
|
+
if (toolName === "lsp_navigation")
|
|
987
|
+
return input.operation === "rename" && input.apply === true ? resolve(getToolCallRawFilePath(toolName, event)) : [];
|
|
988
|
+
return shouldRunOpaqueRecovery(toolName, opaquePrescanRoot(ctx.cwd, runtime.projectRoot)) && shouldArmObservationForTool(toolName) ? resolve(readMutationPathField(event)) : [];
|
|
989
|
+
}
|
|
990
|
+
function namedWriterTargets(filePaths, projectRoot) {
|
|
991
|
+
return [...new Set(filePaths)].filter((candidate) => {
|
|
992
|
+
try {
|
|
993
|
+
return nodeFs.statSync(candidate).isFile() && !isExternalOrVendorFile(candidate, projectRoot) && !isPathIgnoredByProject(candidate, projectRoot, false);
|
|
994
|
+
} catch {
|
|
995
|
+
return false;
|
|
1024
996
|
}
|
|
1025
997
|
});
|
|
1026
998
|
}
|