@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
|
@@ -1067,13 +1067,32 @@ function verifyRedactionEnv(env) {
|
|
|
1067
1067
|
return value.length >= 4 && SENSITIVE_ENV_KEY_PATTERN.test(key);
|
|
1068
1068
|
}));
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function verifySecrets(env) {
|
|
1071
|
+
return [...new Set(Object.values(verifyRedactionEnv(env)).filter(Boolean))].sort((left, right) => right.length - left.length);
|
|
1072
|
+
}
|
|
1073
|
+
function redactSecrets(value, secrets) {
|
|
1071
1074
|
let redacted = value;
|
|
1072
|
-
const secrets = [...new Set(Object.values(verifyRedactionEnv(env)).filter(Boolean))].sort((left, right) => right.length - left.length);
|
|
1073
1075
|
for (const secret of secrets)
|
|
1074
1076
|
redacted = redacted.replaceAll(secret, "[REDACTED]");
|
|
1075
1077
|
return redacted;
|
|
1076
1078
|
}
|
|
1079
|
+
function redactVerifyEnv(value, env) {
|
|
1080
|
+
return redactSecrets(value, verifySecrets(env));
|
|
1081
|
+
}
|
|
1082
|
+
function parseRedactedVerifyValue(text, secrets) {
|
|
1083
|
+
return JSON.parse(text, (_key, value, context) => {
|
|
1084
|
+
if (typeof value === "string")
|
|
1085
|
+
return redactSecrets(value, secrets);
|
|
1086
|
+
if (typeof value === "number" && secrets.length > 0) {
|
|
1087
|
+
const source = context?.source;
|
|
1088
|
+
return source !== undefined && redactSecrets(source, secrets) === source ? value : "[REDACTED]";
|
|
1089
|
+
}
|
|
1090
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
1091
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [redactSecrets(key, secrets), item]));
|
|
1092
|
+
}
|
|
1093
|
+
return value;
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1077
1096
|
function uniqueStrings(items) {
|
|
1078
1097
|
return unique(items.map((item) => item?.trim()).filter((item) => Boolean(item)));
|
|
1079
1098
|
}
|
|
@@ -1133,36 +1152,51 @@ function isCachedVerifyResult(value) {
|
|
|
1133
1152
|
return typeof result.id === "string" && typeof result.command === "string" && (typeof result.exitCode === "number" || result.exitCode === null) && (result.status === "passed" || result.status === "failed" || result.status === "timed-out" || result.status === "allowed-failure") && typeof result.durationMs === "number";
|
|
1134
1153
|
}
|
|
1135
1154
|
const TYPED_VERIFY_OUTPUT_MAX_BYTES = 12000;
|
|
1136
|
-
async function applyTypedVerifyOutput(command, run) {
|
|
1155
|
+
async function applyTypedVerifyOutput(command, run, rawStdout) {
|
|
1137
1156
|
if (run.status !== "passed")
|
|
1138
1157
|
return;
|
|
1139
|
-
const
|
|
1158
|
+
const secrets = verifySecrets(command.env);
|
|
1159
|
+
const stdout = rawStdout.trim();
|
|
1140
1160
|
const fail = (message) => {
|
|
1141
1161
|
run.status = "failed";
|
|
1142
|
-
run.structuredOutputError = message;
|
|
1162
|
+
run.structuredOutputError = redactSecrets(message, secrets);
|
|
1143
1163
|
};
|
|
1144
|
-
if (!stdout
|
|
1164
|
+
if (!stdout)
|
|
1145
1165
|
return fail('output: "json" command printed nothing on stdout.');
|
|
1146
|
-
if (stdout.
|
|
1166
|
+
if (stdout.length > TYPED_VERIFY_OUTPUT_MAX_BYTES)
|
|
1147
1167
|
return fail(`output: "json" stdout exceeded ${TYPED_VERIFY_OUTPUT_MAX_BYTES} characters and was truncated.`);
|
|
1148
1168
|
let value;
|
|
1149
1169
|
try {
|
|
1150
1170
|
value = JSON.parse(stdout);
|
|
1151
|
-
} catch
|
|
1152
|
-
|
|
1171
|
+
} catch {
|
|
1172
|
+
let reason = "parse failed";
|
|
1173
|
+
try {
|
|
1174
|
+
JSON.parse(redactSecrets(stdout, secrets));
|
|
1175
|
+
} catch (error) {
|
|
1176
|
+
reason = error instanceof Error ? error.message : String(error);
|
|
1177
|
+
}
|
|
1178
|
+
return fail(`output: "json" stdout is not valid JSON: ${reason}`);
|
|
1153
1179
|
}
|
|
1180
|
+
const redactedValue = parseRedactedVerifyValue(stdout, secrets);
|
|
1154
1181
|
if (command.schema) {
|
|
1155
1182
|
const validation = await validateStructuredOutputValue(command.schema, value);
|
|
1156
|
-
if (validation.status === "invalid")
|
|
1157
|
-
|
|
1183
|
+
if (validation.status === "invalid") {
|
|
1184
|
+
const redactedValidation = await validateStructuredOutputValue(command.schema, redactedValue);
|
|
1185
|
+
return fail(`output: "json" stdout does not match gate.schema${redactedValidation.status === "invalid" ? `: ${redactedValidation.message}` : "."}`);
|
|
1186
|
+
}
|
|
1158
1187
|
}
|
|
1159
|
-
run.structuredOutput =
|
|
1188
|
+
run.structuredOutput = redactedValue;
|
|
1160
1189
|
}
|
|
1161
1190
|
export function typedVerifyOutput(ledger) {
|
|
1162
1191
|
const run = ledger?.verifyRuns?.find((entry) => entry.structuredOutput !== undefined);
|
|
1163
1192
|
return run ? { value: run.structuredOutput } : undefined;
|
|
1164
1193
|
}
|
|
1165
1194
|
async function runMemoizedVerifyCommand(command, defaultCwd, options = {}) {
|
|
1195
|
+
if (command.output === "json") {
|
|
1196
|
+
const { run, rawStdout } = await runVerifyCommand(command, defaultCwd, options);
|
|
1197
|
+
await applyTypedVerifyOutput(command, run, rawStdout);
|
|
1198
|
+
return run;
|
|
1199
|
+
}
|
|
1166
1200
|
const cwd = command.cwd ? path.resolve(defaultCwd, command.cwd) : defaultCwd;
|
|
1167
1201
|
let workspaceState;
|
|
1168
1202
|
try {
|
|
@@ -1170,8 +1204,8 @@ async function runMemoizedVerifyCommand(command, defaultCwd, options = {}) {
|
|
|
1170
1204
|
} catch {
|
|
1171
1205
|
workspaceState = undefined;
|
|
1172
1206
|
}
|
|
1173
|
-
if (!workspaceState || !options.artifactsDir || !options.runId
|
|
1174
|
-
return runVerifyCommand(command, defaultCwd, options);
|
|
1207
|
+
if (!workspaceState || !options.artifactsDir || !options.runId) {
|
|
1208
|
+
return (await runVerifyCommand(command, defaultCwd, options)).run;
|
|
1175
1209
|
}
|
|
1176
1210
|
const envKeys = Object.keys(command.env ?? {}).sort();
|
|
1177
1211
|
const envHash = hash(JSON.stringify(Object.fromEntries(Object.entries(effectiveVerifyEnv(command.env)).sort(([left], [right]) => left.localeCompare(right)))));
|
|
@@ -1194,7 +1228,7 @@ async function runMemoizedVerifyCommand(command, defaultCwd, options = {}) {
|
|
|
1194
1228
|
return { ...cached.result, id: command.id, command: command.command, cwd, artifactPath, cacheKey, memoized: true, envKeys, envHash, workspaceState };
|
|
1195
1229
|
}
|
|
1196
1230
|
} catch {}
|
|
1197
|
-
const result = await runVerifyCommand(command, defaultCwd, options);
|
|
1231
|
+
const { run: result } = await runVerifyCommand(command, defaultCwd, options);
|
|
1198
1232
|
const evidenced = { ...result, artifactPath, cacheKey, memoized: false, envKeys, envHash, workspaceState };
|
|
1199
1233
|
try {
|
|
1200
1234
|
fs.mkdirSync(path.dirname(artifactPath), { recursive: true });
|
|
@@ -1273,11 +1307,14 @@ function runVerifyCommand(command, defaultCwd, options = {}) {
|
|
|
1273
1307
|
clearTimeout(hardKill);
|
|
1274
1308
|
options.signal?.removeEventListener("abort", abortVerification);
|
|
1275
1309
|
resolve({
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1310
|
+
run: {
|
|
1311
|
+
id: command.id,
|
|
1312
|
+
command: command.command,
|
|
1313
|
+
cwd,
|
|
1314
|
+
durationMs: Date.now() - startedAt,
|
|
1315
|
+
...result
|
|
1316
|
+
},
|
|
1317
|
+
rawStdout: stdout
|
|
1281
1318
|
});
|
|
1282
1319
|
};
|
|
1283
1320
|
const abortVerification = () => {
|
|
@@ -1403,8 +1440,6 @@ export async function evaluateAcceptance(input) {
|
|
|
1403
1440
|
artifactsDir: input.artifactsDir,
|
|
1404
1441
|
runId: input.runId
|
|
1405
1442
|
});
|
|
1406
|
-
if (command.output === "json")
|
|
1407
|
-
await applyTypedVerifyOutput(command, run);
|
|
1408
1443
|
ledger.verifyRuns.push(run);
|
|
1409
1444
|
if (input.signal?.aborted)
|
|
1410
1445
|
break;
|
|
@@ -129,6 +129,8 @@ function projectStep(step, index, depth, ctx) {
|
|
|
129
129
|
const activity = activityFor(step, ctx);
|
|
130
130
|
const { id, label } = stepIdentity(step, index, ctx);
|
|
131
131
|
const agent = publicOptionalText(step.agent, ctx.caps.maxStringLength);
|
|
132
|
+
const progressText = publicOptionalText(step.progressText, ctx.caps.maxStringLength);
|
|
133
|
+
const progressUpdatedAt = publicTime(step.progressUpdatedAt);
|
|
132
134
|
const node = {
|
|
133
135
|
id,
|
|
134
136
|
kind: "step",
|
|
@@ -137,7 +139,9 @@ function projectStep(step, index, depth, ctx) {
|
|
|
137
139
|
...startedAt !== undefined ? { startedAt } : {},
|
|
138
140
|
...updatedAt !== undefined ? { updatedAt } : {},
|
|
139
141
|
...terminalState(state) && endedAt !== undefined ? { endedAt } : {},
|
|
140
|
-
...activity ? { activity } : {}
|
|
142
|
+
...activity ? { activity } : {},
|
|
143
|
+
...progressText ? { progressText } : {},
|
|
144
|
+
...progressUpdatedAt !== undefined ? { progressUpdatedAt } : {}
|
|
141
145
|
};
|
|
142
146
|
if (agent)
|
|
143
147
|
node.agent = agent;
|
|
@@ -291,6 +295,12 @@ function projectMaterializedStep(step, index, child, depth, ctx, childrenByParen
|
|
|
291
295
|
const selfActivity = selfStep ? activityFor(selfStep, ctx) : undefined;
|
|
292
296
|
const activity = laneActivity || selfActivity || live.activity ? { ...laneActivity, ...selfActivity, ...live.activity } : undefined;
|
|
293
297
|
const node = { ...live, id, kind: "step", label };
|
|
298
|
+
const progressText = publicOptionalText(selfStep?.progressText ?? step.progressText, ctx.caps.maxStringLength);
|
|
299
|
+
const progressUpdatedAt = publicTime(selfStep?.progressUpdatedAt ?? step.progressUpdatedAt);
|
|
300
|
+
if (progressText)
|
|
301
|
+
node.progressText = progressText;
|
|
302
|
+
if (progressUpdatedAt !== undefined)
|
|
303
|
+
node.progressUpdatedAt = progressUpdatedAt;
|
|
294
304
|
const agent = publicOptionalText(selfStep?.agent || step.agent, ctx.caps.maxStringLength);
|
|
295
305
|
if (agent)
|
|
296
306
|
node.agent = agent;
|
|
@@ -136,8 +136,17 @@ Optional yieldTimeMs returns a command handle without stopping execution. Use su
|
|
|
136
136
|
persist();
|
|
137
137
|
startInbox();
|
|
138
138
|
let timer;
|
|
139
|
+
let yieldSaveError;
|
|
139
140
|
if (typeof yieldTimeMs === "number")
|
|
140
|
-
timer = setTimeout(() =>
|
|
141
|
+
timer = setTimeout(() => {
|
|
142
|
+
if (closed)
|
|
143
|
+
return;
|
|
144
|
+
try {
|
|
145
|
+
operate("yield", toolCallId);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
yieldSaveError = error;
|
|
148
|
+
}
|
|
149
|
+
}, yieldTimeMs);
|
|
141
150
|
const execution = Promise.resolve().then(() => tool.execute(toolCallId, args, commandSignal, (update) => {
|
|
142
151
|
job.snapshot.output = text(update);
|
|
143
152
|
if (job.snapshot.state === "running")
|
|
@@ -168,7 +177,9 @@ Optional yieldTimeMs returns a command handle without stopping execution. Use su
|
|
|
168
177
|
})]);
|
|
169
178
|
if (result)
|
|
170
179
|
return result.value;
|
|
171
|
-
|
|
180
|
+
const saveWarning = yieldSaveError === undefined ? "" : `
|
|
181
|
+
The command's saved state is out of date because it could not be saved: ${yieldSaveError instanceof Error ? yieldSaveError.message : String(yieldSaveError)}`;
|
|
182
|
+
return { content: [{ type: "text", text: `Command is still running (toolCallId: ${toolCallId}). This is not a successful exit. Use subagent_command({ action: "status", toolCallId: ${JSON.stringify(toolCallId)} }) to inspect or wait, or action: "cancel" to stop it.${saveWarning}
|
|
172
183
|
${job.snapshot.output}` }], details: { command: { ...job.snapshot } } };
|
|
173
184
|
}
|
|
174
185
|
};
|
|
@@ -3,6 +3,7 @@ import { ReadonlyDrainObservation } from "./readonly-drain-observation.js";
|
|
|
3
3
|
import registerFanoutChildSubagentExtension, { createChildSafeState } from "../../extension/fanout-child.js";
|
|
4
4
|
import registerSubagentFastModeExtension from "./fast-mode-extension.js";
|
|
5
5
|
import registerSubagentPromptRuntime, { registerSubagentPromptBoundary } from "./subagent-prompt-runtime.js";
|
|
6
|
+
import { structuredOutputValidatorReady } from "./structured-output.js";
|
|
6
7
|
import { projectRuntimeAcknowledgedExtensions } from "./runtime-acknowledged-extensions.js";
|
|
7
8
|
const promptProofs = new WeakMap;
|
|
8
9
|
function ownedProof(hooks) {
|
|
@@ -147,11 +148,15 @@ function childHooks(config, capture, holdFinalDrain) {
|
|
|
147
148
|
}
|
|
148
149
|
const hooks = [
|
|
149
150
|
{ name: "dm-subagents:prompt-runtime", factory: function promptRuntime(dm) {
|
|
150
|
-
if (!proof?.observeNext)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
if (!proof?.observeNext) {
|
|
152
|
+
registerSubagentPromptRuntime(dm, runtime);
|
|
153
|
+
} else {
|
|
154
|
+
proof.observation = proof.observeNext;
|
|
155
|
+
proof.observeNext = undefined;
|
|
156
|
+
registerSubagentPromptRuntime(dm, runtime, proof.observation);
|
|
157
|
+
}
|
|
158
|
+
if (runtime.structuredOutput)
|
|
159
|
+
return structuredOutputValidatorReady();
|
|
155
160
|
} }
|
|
156
161
|
];
|
|
157
162
|
if (config.fast)
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
supervisorChannelDir
|
|
15
15
|
} from "./child-tool-plan.js";
|
|
16
16
|
import { createCapturedChildHooks, withChildSessionErrorReporting } from "./child-hooks.js";
|
|
17
|
-
import { resolveRequiredChildExtensions } from "../../shared/required-child-extensions.js";
|
|
17
|
+
import { createRequiredChildExtensionIdentity, resolveRequiredChildExtensions } from "../../shared/required-child-extensions.js";
|
|
18
|
+
import { DEFAULT_WAIT_TOOL_NAME, waitToolName } from "../../shared/wait-tool-name.js";
|
|
18
19
|
export const MCP_DIRECT_TOOLS_ENV = "MCP_DIRECT_TOOLS";
|
|
19
20
|
export function inheritedChildRuntime(config) {
|
|
20
21
|
if (!config)
|
|
@@ -48,7 +49,9 @@ function childProcessEnv(input, toolPlan) {
|
|
|
48
49
|
env[MCP_DIRECT_TOOLS_ENV] = input.mcpDirectTools.join(",");
|
|
49
50
|
else if (toolPlan.capabilityCeiling && toolPlan.effectiveMcpSelections.length && !toolPlan.capabilityCeiling.denyExtensions) {
|
|
50
51
|
env[MCP_DIRECT_TOOLS_ENV] = toolPlan.effectiveMcpSelections.map((selection) => selection.selector).join(",");
|
|
51
|
-
} else
|
|
52
|
+
} else if (input.tools === undefined && !toolPlan.capabilityCeiling)
|
|
53
|
+
env[MCP_DIRECT_TOOLS_ENV] = undefined;
|
|
54
|
+
else
|
|
52
55
|
env[MCP_DIRECT_TOOLS_ENV] = "__none__";
|
|
53
56
|
return env;
|
|
54
57
|
}
|
|
@@ -66,7 +69,8 @@ function childStorage(input) {
|
|
|
66
69
|
return { kind: "default" };
|
|
67
70
|
}
|
|
68
71
|
export function buildInProcessChildLaunch(input) {
|
|
69
|
-
const
|
|
72
|
+
const resolvedRequiredExtensions = input.requiredExtensions ?? input.inherited?.requiredExtensions ?? resolveRequiredChildExtensions(input.parentSessionId);
|
|
73
|
+
const requiredExtensions = input.machine ? resolvedRequiredExtensions.filter((entry) => entry.requireForAllRunners) : resolvedRequiredExtensions;
|
|
70
74
|
const agentCapabilityCeiling = input.descendantAllowedAgents === undefined ? undefined : { version: 1, allowedAgents: [...input.descendantAllowedAgents], denyExtensions: false, sources: [`agent:${input.childAgentName}`] };
|
|
71
75
|
const inheritedCeiling = inheritedCapabilityCeiling(input.inherited);
|
|
72
76
|
const capabilityCeilingForPlanning = agentCapabilityCeiling && !input.capabilityCeiling && !inheritedCeiling ? { version: 1, denyExtensions: false, sources: [] } : input.capabilityCeiling;
|
|
@@ -91,7 +95,8 @@ export function buildInProcessChildLaunch(input) {
|
|
|
91
95
|
runtimeSnapshotHost: input.runtimeSnapshotHost
|
|
92
96
|
});
|
|
93
97
|
if (input.host === "parent" && input.runtimeSnapshotHost && toolPlan.builtinMcpTools?.length) {
|
|
94
|
-
const
|
|
98
|
+
const requiredExtensionIdentity = createRequiredChildExtensionIdentity(toolPlan.requiredExtensions.map(({ path }) => path));
|
|
99
|
+
const servers = extensionOnlyMcpServers(toolPlan.effectiveMcpSelections, input.runtimeSnapshotHost, input.cwd, input.projectTrusted !== false, (extensionPath) => requiredExtensionIdentity(extensionPath) !== undefined);
|
|
95
100
|
if (servers.length)
|
|
96
101
|
throw new Error(`Agent '${input.childAgentName}' selects MCP tools from servers that extensions registered (${servers.join(", ")}). Only background children (async: true) load those extensions; run the agent in the background or add the server to the global mcp.json or a trusted project's .dm/mcp.json.`);
|
|
97
102
|
}
|
|
@@ -153,7 +158,8 @@ export function buildInProcessChildLaunch(input) {
|
|
|
153
158
|
...input.watchdogStatus ? { watchdogStatus: input.watchdogStatus } : {},
|
|
154
159
|
waitTool: {
|
|
155
160
|
enabled: input.waitToolEnabled ?? true,
|
|
156
|
-
...input.waitToolDefaultTimeoutMs !== undefined ? { defaultTimeoutMs: input.waitToolDefaultTimeoutMs } : {}
|
|
161
|
+
...input.waitToolDefaultTimeoutMs !== undefined ? { defaultTimeoutMs: input.waitToolDefaultTimeoutMs } : {},
|
|
162
|
+
...waitToolName() !== DEFAULT_WAIT_TOOL_NAME ? { name: waitToolName() } : {}
|
|
157
163
|
},
|
|
158
164
|
...input.structuredOutput ? {
|
|
159
165
|
structuredOutput: {
|
|
@@ -190,7 +196,7 @@ ${input.systemPrompt}` : undefined;
|
|
|
190
196
|
cwd: input.cwd,
|
|
191
197
|
...input.machine ? { machine: input.machine } : {},
|
|
192
198
|
...input.projectTrusted !== undefined ? { projectTrusted: input.projectTrusted } : {},
|
|
193
|
-
...input.machine ? { remoteResources: { agent: input.childAgentName, ...input.remoteSkillNames ? { skills: input.remoteSkillNames } : {}, ...input.remoteReads !== undefined ? { reads: input.remoteReads } : {}, ...toolPlan.explicitToolAllowlist ? { toolCeiling: [...toolPlan.effectiveToolAllowlist] } : toolPlan.capabilityCeiling?.allowedTools ? { toolCeiling: [...toolPlan.capabilityCeiling.allowedTools] } : {} } } : {},
|
|
199
|
+
...input.machine ? { remoteResources: { agent: input.childAgentName, ...input.remoteSkillNames ? { skills: input.remoteSkillNames } : {}, ...input.remoteReads !== undefined ? { reads: input.remoteReads } : {}, ...toolPlan.explicitToolAllowlist ? { toolCeiling: [...toolPlan.effectiveToolAllowlist] } : toolPlan.capabilityCeiling?.allowedTools ? { toolCeiling: [...toolPlan.capabilityCeiling.allowedTools] } : {}, ...input.acceptancePrompt ? { acceptancePrompt: input.acceptancePrompt } : {} } } : {},
|
|
194
200
|
storage: childStorage(input),
|
|
195
201
|
...input.parentSessionFile ? { parentSessionFile: input.parentSessionFile } : {},
|
|
196
202
|
...input.model ? { model: input.model } : {},
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { cleanupSessionResources, registerSessionResourceCleanup } from "@duckmind/dm-ai";
|
|
4
5
|
import { CHILD_COMMAND_TOOL, createChildCommandRuntime } from "./child-commands.js";
|
|
5
6
|
import { supervisorChannelDir } from "./child-tool-plan.js";
|
|
6
7
|
import { pinChildCacheRetention } from "../../shared/child-cache-retention.js";
|
|
7
8
|
import { splitKnownThinkingSuffix } from "../../shared/model-info.js";
|
|
9
|
+
import { parseAcceptanceReport } from "./acceptance.js";
|
|
8
10
|
import { getAgentDir, DM_CODING_AGENT_PACKAGE_ROOT_ENV } from "../../shared/utils.js";
|
|
9
11
|
import { resolvePackageSubpath } from "../background/runner-aliases.js";
|
|
10
12
|
import { DM_CODING_AGENT_PACKAGE, resolveHostPiPackageRoot } from "./dm-spawn.js";
|
|
13
|
+
import { createRequiredChildExtensionIdentity } from "../../shared/required-child-extensions.js";
|
|
11
14
|
export function projectChildSessionEventForJson(event) {
|
|
12
15
|
if (event.type !== "message_update")
|
|
13
16
|
return event;
|
|
@@ -24,6 +27,12 @@ export function childSessionHasQueuedMessages(session) {
|
|
|
24
27
|
return false;
|
|
25
28
|
}
|
|
26
29
|
}
|
|
30
|
+
export function registeredProviderIds(registry) {
|
|
31
|
+
const source = registry;
|
|
32
|
+
if (typeof source.getRegisteredProviderIds === "function")
|
|
33
|
+
return source.getRegisteredProviderIds();
|
|
34
|
+
return source.registeredProviders instanceof Map ? [...source.registeredProviders.keys()] : [];
|
|
35
|
+
}
|
|
27
36
|
function childRegistry(dm, agentDir, parentProviders, model) {
|
|
28
37
|
const authStorage = parentProviders && "authStorage" in parentProviders ? parentProviders.authStorage : model?.startsWith("openai-codex/") && (process.env.auth_file || process.env.AUTHS_DIR) ? dm.createUltraAuthStorage() : dm.AuthStorage.create(path.join(agentDir, "auth.json"));
|
|
29
38
|
return dm.ModelRegistry.create(authStorage, path.join(agentDir, "models.json"));
|
|
@@ -93,30 +102,6 @@ function inheritParentProviders(modelRuntime, parentProviders, claimedProviderId
|
|
|
93
102
|
const CHILD_PROMPT_RUNTIME_EXTENSION_PATH = "<inline:dm-subagents:prompt-runtime>";
|
|
94
103
|
const CHILD_PROMPT_BOUNDARY_EXTENSION_PATH = "<inline:dm-subagents:prompt-boundary>";
|
|
95
104
|
const PI_UNICODE_SPACES = new RegExp("[\\u00A0\\u2000-\\u200A\\u202F\\u205F\\u3000]", "g");
|
|
96
|
-
function childExtensionFileIdentity(extensionPath) {
|
|
97
|
-
if (!path.isAbsolute(extensionPath))
|
|
98
|
-
return;
|
|
99
|
-
try {
|
|
100
|
-
const stat = fs.statSync(extensionPath, { bigint: true });
|
|
101
|
-
return stat.isFile() ? `${stat.dev}:${stat.ino}` : undefined;
|
|
102
|
-
} catch {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function createRequiredChildExtensionIdentity(requiredPaths) {
|
|
107
|
-
const aliases = new Map([...requiredPaths].map((extensionPath) => [extensionPath, childExtensionFileIdentity(extensionPath) ?? extensionPath]));
|
|
108
|
-
const identities = new Set(aliases.values());
|
|
109
|
-
return (extensionPath) => {
|
|
110
|
-
const known = aliases.get(extensionPath);
|
|
111
|
-
if (known !== undefined)
|
|
112
|
-
return known;
|
|
113
|
-
const identity = childExtensionFileIdentity(extensionPath);
|
|
114
|
-
if (identity === undefined || !identities.has(identity))
|
|
115
|
-
return;
|
|
116
|
-
aliases.set(extensionPath, identity);
|
|
117
|
-
return identity;
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
105
|
function orderChildPromptHooks(result, hooks = []) {
|
|
121
106
|
const isHook = (path, name) => path === `<inline:${name}>` || /^<inline:(\d+)>$/.exec(path)?.[1] !== undefined && hooks[Number(/^<inline:(\d+)>$/.exec(path)[1]) - 1]?.name === name;
|
|
122
107
|
const runtime = result.extensions.filter(({ path }) => isHook(path, "dm-subagents:prompt-runtime"));
|
|
@@ -154,6 +139,20 @@ function prioritizeChildCommandRuntime(result, hooks = [], enabled = true) {
|
|
|
154
139
|
extensions.unshift(commands);
|
|
155
140
|
return { ...result, extensions };
|
|
156
141
|
}
|
|
142
|
+
function disposeChildSession(session) {
|
|
143
|
+
let released = false;
|
|
144
|
+
const unregister = registerSessionResourceCleanup((sessionId) => {
|
|
145
|
+
if (sessionId === session.sessionId)
|
|
146
|
+
released = true;
|
|
147
|
+
});
|
|
148
|
+
try {
|
|
149
|
+
session.dispose();
|
|
150
|
+
} finally {
|
|
151
|
+
unregister();
|
|
152
|
+
if (!released)
|
|
153
|
+
cleanupSessionResources(session.sessionId);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
157
156
|
let loading = Promise.resolve();
|
|
158
157
|
function resetExtensionCacheOnReload(loader) {
|
|
159
158
|
if (!("loaded" in loader))
|
|
@@ -344,10 +343,12 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
344
343
|
const loadPiCodingAgent = options.loadPiCodingAgent ?? loadHostPiCodingAgent;
|
|
345
344
|
const shutdownTimeoutMs = options.shutdownTimeoutMs ?? 5000;
|
|
346
345
|
let runtime;
|
|
347
|
-
const live = new
|
|
346
|
+
const live = new Map;
|
|
348
347
|
const shutdowns = new Set;
|
|
349
348
|
const mcpWaits = new Map;
|
|
350
|
-
let
|
|
349
|
+
let globalDisposals = 0;
|
|
350
|
+
const parentDisposals = new Map;
|
|
351
|
+
const parentDisposalEpoch = (parent) => parentDisposals.get(parent) ?? 0;
|
|
351
352
|
const sharedRuntime = async (dm, agentDir) => {
|
|
352
353
|
runtime ??= childRuntime(dm, agentDir).catch((error) => {
|
|
353
354
|
runtime = undefined;
|
|
@@ -355,9 +356,31 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
355
356
|
});
|
|
356
357
|
return runtime;
|
|
357
358
|
};
|
|
359
|
+
const disposeMatching = async (matches) => {
|
|
360
|
+
for (const [cancel, wait] of mcpWaits)
|
|
361
|
+
if (matches(wait.parent))
|
|
362
|
+
cancel.abort();
|
|
363
|
+
const children = [...live.keys()].filter((child) => !child.detached && matches(live.get(child)));
|
|
364
|
+
for (const child of children)
|
|
365
|
+
child.shutDown = true;
|
|
366
|
+
await Promise.allSettled(children.map((child) => child.abort()));
|
|
367
|
+
for (const child of children) {
|
|
368
|
+
try {
|
|
369
|
+
child.dispose();
|
|
370
|
+
} catch {}
|
|
371
|
+
}
|
|
372
|
+
await Promise.allSettled([
|
|
373
|
+
...shutdowns,
|
|
374
|
+
...[...mcpWaits.values()].filter((wait) => matches(wait.parent)).map((wait) => wait.ready)
|
|
375
|
+
]);
|
|
376
|
+
if (live.size === 0)
|
|
377
|
+
runtime = undefined;
|
|
378
|
+
};
|
|
358
379
|
return {
|
|
359
380
|
async create(launch) {
|
|
360
|
-
const
|
|
381
|
+
const globalDisposalsAtStart = globalDisposals;
|
|
382
|
+
const parentEpochAtStart = parentDisposalEpoch(launch.parentSessionFile);
|
|
383
|
+
const disposedSinceStart = () => globalDisposals !== globalDisposalsAtStart || parentDisposalEpoch(launch.parentSessionFile) !== parentEpochAtStart;
|
|
361
384
|
const dm = await loadPiCodingAgent();
|
|
362
385
|
const builtinMcpTools = launch.builtinMcpTools ?? [];
|
|
363
386
|
let readinessTool;
|
|
@@ -421,7 +444,7 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
421
444
|
} catch (error) {
|
|
422
445
|
launch.onExtensionError?.({ extensionPath: "<session>", event: "session_shutdown", error });
|
|
423
446
|
} finally {
|
|
424
|
-
session
|
|
447
|
+
disposeChildSession(session);
|
|
425
448
|
}
|
|
426
449
|
};
|
|
427
450
|
let inheritedProviders = new Set;
|
|
@@ -483,13 +506,13 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
483
506
|
await session.bindExtensions({
|
|
484
507
|
mode: "print",
|
|
485
508
|
onError: (error) => {
|
|
486
|
-
if (binding && isRequiredSource(error.extensionPath))
|
|
509
|
+
if (binding && error.event !== "register_mcp_server" && isRequiredSource(error.extensionPath))
|
|
487
510
|
requiredStartupErrors.push(`${error.extensionPath} (${error.event}): ${error.error}`);
|
|
488
511
|
launch.onExtensionError?.({ extensionPath: error.extensionPath, event: error.event, error: error.error });
|
|
489
512
|
}
|
|
490
513
|
});
|
|
491
514
|
} catch (error) {
|
|
492
|
-
session
|
|
515
|
+
disposeChildSession(session);
|
|
493
516
|
throw error;
|
|
494
517
|
} finally {
|
|
495
518
|
binding = false;
|
|
@@ -517,12 +540,12 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
517
540
|
if (builtinMcp) {
|
|
518
541
|
const cancel = new AbortController;
|
|
519
542
|
const signal = launch.signal ? AbortSignal.any([cancel.signal, launch.signal]) : cancel.signal;
|
|
520
|
-
if (
|
|
543
|
+
if (disposedSinceStart())
|
|
521
544
|
cancel.abort();
|
|
522
545
|
const ready = (async () => {
|
|
523
546
|
try {
|
|
524
547
|
await builtinMcp.waitForTools(signal, () => loader.getExtensions().errors.find(({ path }) => path === "builtin:mcp")?.error);
|
|
525
|
-
if (
|
|
548
|
+
if (disposedSinceStart())
|
|
526
549
|
throw new Error("The child session factory was disposed while the child waited for its MCP tools.");
|
|
527
550
|
if (signal.aborted)
|
|
528
551
|
throw new Error("The child launch was cancelled while waiting for its MCP tools.");
|
|
@@ -534,21 +557,46 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
534
557
|
throw error;
|
|
535
558
|
}
|
|
536
559
|
})();
|
|
537
|
-
mcpWaits.set(cancel, ready);
|
|
560
|
+
mcpWaits.set(cancel, { ready, parent: launch.parentSessionFile });
|
|
538
561
|
try {
|
|
539
562
|
await ready;
|
|
540
563
|
} finally {
|
|
541
564
|
mcpWaits.delete(cancel);
|
|
542
565
|
}
|
|
543
566
|
}
|
|
567
|
+
let reportCompleted = false;
|
|
568
|
+
const guidanceClosed = "Child completed its acceptance report; resume it for further guidance.";
|
|
569
|
+
const assertAcceptsGuidance = () => {
|
|
570
|
+
if (reportCompleted)
|
|
571
|
+
throw new Error(guidanceClosed);
|
|
572
|
+
};
|
|
573
|
+
const rejectQueuedGuidance = () => {
|
|
574
|
+
session.clearQueue();
|
|
575
|
+
throw new Error(guidanceClosed);
|
|
576
|
+
};
|
|
544
577
|
const child = {
|
|
545
|
-
subscribe: (listener) => session.subscribe((event) =>
|
|
578
|
+
subscribe: (listener) => session.subscribe((event) => {
|
|
579
|
+
if (event.type === "message_end" && event.message.role === "assistant" && event.message.stopReason === "stop") {
|
|
580
|
+
const text = event.message.content.filter((part) => part.type === "text").map((part) => part.text).join(`
|
|
581
|
+
`);
|
|
582
|
+
const report = parseAcceptanceReport(text);
|
|
583
|
+
if (report.report || report.malformed) {
|
|
584
|
+
reportCompleted = true;
|
|
585
|
+
session.clearQueue();
|
|
586
|
+
session.agent.steer = rejectQueuedGuidance;
|
|
587
|
+
session.agent.followUp = rejectQueuedGuidance;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
listener(event);
|
|
591
|
+
}),
|
|
546
592
|
prompt: (text) => session.prompt(text),
|
|
547
593
|
...commands ? { finishCommands: () => commands.finish() } : {},
|
|
548
594
|
steer: async (text) => {
|
|
595
|
+
assertAcceptsGuidance();
|
|
549
596
|
await session.steer(text);
|
|
550
597
|
},
|
|
551
598
|
followUp: async (text) => {
|
|
599
|
+
assertAcceptsGuidance();
|
|
552
600
|
await session.followUp(text);
|
|
553
601
|
},
|
|
554
602
|
abort: () => session.abort(),
|
|
@@ -578,6 +626,9 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
578
626
|
get inheritedProvider() {
|
|
579
627
|
return session.model && inheritedProviders.has(session.model.provider) ? session.model.provider : undefined;
|
|
580
628
|
},
|
|
629
|
+
get claimedProvider() {
|
|
630
|
+
return session.model && !inheritedProviders.has(session.model.provider) && registeredProviderIds(modelRegistry ?? modelRuntime).includes(session.model.provider) ? session.model.provider : undefined;
|
|
631
|
+
},
|
|
581
632
|
get virtualModelId() {
|
|
582
633
|
return session.model?.api === "dm-virtual" ? `${session.model.provider}/${session.model.id}` : undefined;
|
|
583
634
|
},
|
|
@@ -585,25 +636,16 @@ export function createDefaultChildSessionFactory(options = {}) {
|
|
|
585
636
|
return session.model?.contextWindow;
|
|
586
637
|
}
|
|
587
638
|
};
|
|
588
|
-
live.
|
|
639
|
+
live.set(child, launch.parentSessionFile);
|
|
589
640
|
return child;
|
|
590
641
|
},
|
|
591
642
|
async dispose() {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
await Promise.allSettled(children.map((child) => child.abort()));
|
|
599
|
-
for (const child of children) {
|
|
600
|
-
try {
|
|
601
|
-
child.dispose();
|
|
602
|
-
} catch {}
|
|
603
|
-
}
|
|
604
|
-
await Promise.allSettled([...shutdowns, ...mcpWaits.values()]);
|
|
605
|
-
if (live.size === 0)
|
|
606
|
-
runtime = undefined;
|
|
643
|
+
globalDisposals += 1;
|
|
644
|
+
await disposeMatching(() => true);
|
|
645
|
+
},
|
|
646
|
+
async disposeForParent(parentSessionFile) {
|
|
647
|
+
parentDisposals.set(parentSessionFile, parentDisposalEpoch(parentSessionFile) + 1);
|
|
648
|
+
await disposeMatching((parent) => parent === parentSessionFile);
|
|
607
649
|
}
|
|
608
650
|
};
|
|
609
651
|
}
|
|
@@ -621,10 +663,10 @@ function createLazyPlacementFactory(local) {
|
|
|
621
663
|
return launch.machine ? (await factory()).create(launch) : local.create(launch);
|
|
622
664
|
},
|
|
623
665
|
async dispose() {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
666
|
+
await (placed ?? local).dispose();
|
|
667
|
+
},
|
|
668
|
+
async disposeForParent(parentSessionFile) {
|
|
669
|
+
await (placed ?? local).disposeForParent(parentSessionFile);
|
|
628
670
|
}
|
|
629
671
|
};
|
|
630
672
|
}
|
|
@@ -640,9 +682,6 @@ export function childSessionFactoryModule() {
|
|
|
640
682
|
export function setChildSessionFactoryModule(modulePath) {
|
|
641
683
|
activeFactoryModule = modulePath;
|
|
642
684
|
}
|
|
643
|
-
export async function
|
|
644
|
-
|
|
645
|
-
if (!factory)
|
|
646
|
-
return;
|
|
647
|
-
await factory.dispose();
|
|
685
|
+
export async function disposeChildSessionsForParent(parentSessionFile) {
|
|
686
|
+
await activeFactory?.disposeForParent(parentSessionFile);
|
|
648
687
|
}
|
|
@@ -154,6 +154,12 @@ export function createClaudeCodeJsonlParser() {
|
|
|
154
154
|
}
|
|
155
155
|
return { phase: terminal ? terminal.state : "streaming", eventCount };
|
|
156
156
|
},
|
|
157
|
+
skipOversizedLine(prefix) {
|
|
158
|
+
if (terminal || !/^\s*\{\s*"type"\s*:\s*"user"\s*,/.test(prefix))
|
|
159
|
+
return;
|
|
160
|
+
eventCount += 1;
|
|
161
|
+
return { phase: "streaming", eventCount };
|
|
162
|
+
},
|
|
157
163
|
finish() {
|
|
158
164
|
return terminal;
|
|
159
165
|
}
|
|
@@ -40,6 +40,14 @@ export function validateCodeOwnedProfileRunner(agent) {
|
|
|
40
40
|
}
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
+
export const EXTERNAL_CLI_ADAPTER_SAFETY = {
|
|
44
|
+
"codex-exec": { sandbox: "read-only", approvalPolicy: "never", ephemeral: true },
|
|
45
|
+
"codex-exec-writer": { access: "workspace-write", sandbox: "workspace-write", approvalPolicy: "never", ephemeral: true },
|
|
46
|
+
"claude-code": { access: "read-only", authentication: "existing-cli-required", permissionMode: "plan", tools: "none", mcp: "empty-strict", settingSources: "user", userSettingsTrust: "required", sessionPersistence: false },
|
|
47
|
+
"claude-code-writer": { access: "workspace-write", authentication: "existing-cli-required", permissionMode: "acceptEdits", tools: "Read,Write,Edit,Glob,Grep", mcp: "empty-strict", settingSources: "user", userSettingsTrust: "required", sessionPersistence: false },
|
|
48
|
+
"cursor-agent": { access: "read-only", authentication: "cursor-api-key-or-existing-login", mode: "ask", sandbox: "enabled", workspaceTrust: "existing-required", sessionReuse: false },
|
|
49
|
+
"cursor-agent-writer": { access: "workspace-write", authentication: "cursor-api-key-or-existing-login", mode: "print", sandbox: "enabled", workspaceTrust: "existing-required", sessionReuse: false }
|
|
50
|
+
};
|
|
43
51
|
export function parseExternalCliCapabilityNarrowing(value, label) {
|
|
44
52
|
if (value === undefined)
|
|
45
53
|
return;
|
|
@@ -56,13 +64,8 @@ export function parseExternalCliCapabilityNarrowing(value, label) {
|
|
|
56
64
|
return input;
|
|
57
65
|
}
|
|
58
66
|
export function resolveExternalCliRunnerStatus(input) {
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
const claudeCode = input.adapter === "claude-code";
|
|
62
|
-
const claudeCodeWriter = input.adapter === "claude-code-writer";
|
|
63
|
-
const cursorAgent = input.adapter === "cursor-agent";
|
|
64
|
-
const cursorAgentWriter = input.adapter === "cursor-agent-writer";
|
|
65
|
-
const cursor = cursorAgent || cursorAgentWriter;
|
|
67
|
+
const cursor = input.adapter === "cursor-agent" || input.adapter === "cursor-agent-writer";
|
|
68
|
+
const profileSafety = input.adapter ? EXTERNAL_CLI_ADAPTER_SAFETY[input.adapter] : undefined;
|
|
66
69
|
const unsupported = cursor ? PROMPT_FILE_UNSUPPORTED : UNSUPPORTED;
|
|
67
70
|
return {
|
|
68
71
|
type: "external-cli",
|
|
@@ -70,12 +73,10 @@ export function resolveExternalCliRunnerStatus(input) {
|
|
|
70
73
|
args: input.args ?? [],
|
|
71
74
|
promptDelivery: cursor ? "prompt-file" : input.promptDelivery ?? "stdin",
|
|
72
75
|
adapter: { id: input.adapter ?? "external-cli", version: 1, executionMode: cursor ? "one-shot-prompt-file" : "one-shot-stdin" },
|
|
73
|
-
...
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
...cursorAgent ? { safety: { access: "read-only", authentication: "cursor-api-key-or-existing-login", mode: "ask", sandbox: "enabled", workspaceTrust: "existing-required", sessionReuse: false } } : {},
|
|
78
|
-
...cursorAgentWriter ? { safety: { access: "workspace-write", authentication: "cursor-api-key-or-existing-login", mode: "print", sandbox: "enabled", workspaceTrust: "existing-required", sessionReuse: false } } : {},
|
|
76
|
+
...profileSafety ? {
|
|
77
|
+
safety: { ...profileSafety },
|
|
78
|
+
safetySource: { measured: false, ...input.machine ? {} : { command: input.command } }
|
|
79
|
+
} : {},
|
|
79
80
|
...input.machine ? { machine: input.machine } : {},
|
|
80
81
|
capabilities: {
|
|
81
82
|
stop: true,
|
|
@@ -125,6 +126,7 @@ export function externalCliReceiptMetadata(input) {
|
|
|
125
126
|
capabilities: { ...runner.capabilities },
|
|
126
127
|
...machine ? { machine: { ...machine, ...machine.remoteGit ? { remoteGit: { ...machine.remoteGit } } : {} } } : {},
|
|
127
128
|
...runner.safety ? { safety: { ...runner.safety } } : {},
|
|
129
|
+
...runner.safetySource ? { safetySource: { ...runner.safetySource } } : {},
|
|
128
130
|
...input.externalProcess ? {
|
|
129
131
|
outputArtifacts: {
|
|
130
132
|
stdoutPath: input.externalProcess.stdoutPath,
|