@duckmind/dm-darwin-x64 0.67.4 → 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
|
@@ -5,6 +5,7 @@ import { performance } from "node:perf_hooks";
|
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { installRunnerHttpDispatcher } from "./runner-http-dispatcher.js";
|
|
7
7
|
import { writeAtomicJson } from "../../shared/atomic-json.js";
|
|
8
|
+
import { extractReportedProgress } from "../../shared/reported-progress.js";
|
|
8
9
|
import { withResultRunLease, writeAsyncResultFile, writePendingAsyncResultFile } from "./result-files.js";
|
|
9
10
|
import { createFileCoalescer } from "../../shared/file-coalescer.js";
|
|
10
11
|
import { createCapacityResilientJsonWriter } from "../../shared/capacity-resilient-json.js";
|
|
@@ -48,6 +49,7 @@ import { buildRunnerChildLaunch } from "./runner-child-launch.js";
|
|
|
48
49
|
import { normalizeExtensionBindings } from "../shared/extension-bindings.js";
|
|
49
50
|
import { dmRetryDelay, implementationMutationError, implementationToolsError } from "../../shared/dm-safeguards.js";
|
|
50
51
|
import { runChildSession } from "./run-child-session.js";
|
|
52
|
+
import { isBlockingSupervisorTool, pauseForSupervisorWait, startPausableTimer } from "../shared/supervisor-wait-timer.js";
|
|
51
53
|
import { loadRunnerChildSessionFactory } from "./runner-child-sessions.js";
|
|
52
54
|
import { SUBAGENT_CHILD_ENV, SUBAGENT_RUNNER_PID_ENV } from "../shared/child-runtime-config.js";
|
|
53
55
|
import { deriveChildSessionName } from "../../shared/child-session-name.js";
|
|
@@ -56,7 +58,7 @@ import { outputEntryFromAsyncResult, resolveOutputReferences } from "../shared/c
|
|
|
56
58
|
import { clearStructuredOutputCaptures, createStructuredOutputFileCapture, createStructuredOutputRuntime, formatStructuredOutputRejectionError, MISSING_STRUCTURED_OUTPUT_CALL_ERROR, readStructuredOutput, readStructuredOutputAcceptanceReport } from "../shared/structured-output.js";
|
|
57
59
|
import { formatMidToolExitError, isOrdinaryToolForMidToolExit, isUnexplainedProcessSignal } from "../shared/process-signal.js";
|
|
58
60
|
import { formatChildToolDiagnostic } from "../shared/tool-availability.js";
|
|
59
|
-
import { buildTimeoutRecoverySummary, collectTrackedMutationEvidence, snapshotTrackedMutations } from "../shared/mutation-evidence.js";
|
|
61
|
+
import { buildTimeoutRecoverySummary, collectTrackedMutationEvidence, remoteMutationEvidence, remoteMutationSnapshot, snapshotTrackedMutations } from "../shared/mutation-evidence.js";
|
|
60
62
|
import { collectDynamicResults, DynamicFanoutError, materializeDynamicParallelStep, validateDynamicCollection } from "../shared/dynamic-fanout.js";
|
|
61
63
|
import { claimRunFanoutBatch, getRunFanoutBudgetSnapshot } from "../shared/run-fanout-budget.js";
|
|
62
64
|
import { nestedSummaryFromAsyncStatus, projectNestedEvents, resolveNestedAsyncDir, writeNestedEvent } from "../shared/nested-events.js";
|
|
@@ -65,7 +67,7 @@ import { processTerminalPath, writeProcessTerminalCandidate } from "./process-te
|
|
|
65
67
|
import { persistRunnerStartupFailure } from "./runner-startup-failure.js";
|
|
66
68
|
import { currentRecordedPid } from "./boot-id.js";
|
|
67
69
|
import { createSteeringStatus, recordSteeringRequest, steeringStatus, terminalSteeringNoticeState, unconsumedSteerReason, updateSteeringTarget } from "./steering.js";
|
|
68
|
-
import { PROMPT_REDACTED, SUBAGENT_STOPPED_MESSAGE, SUBAGENT_TIMED_OUT_MESSAGE, detectSubagentError, extractTextFromContent, extractToolArgsPreview, formatEmptyTerminalAssistantResponseError, getAgentDir, hasEmptyTerminalAssistantResponse, readStatus } from "../../shared/utils.js";
|
|
70
|
+
import { PROMPT_REDACTED, SUBAGENT_STOPPED_MESSAGE, SUBAGENT_TIMED_OUT_MESSAGE, TRUNCATED_RESPONSE_ERROR, detectSubagentError, extractTextFromContent, extractToolArgsPreview, formatEmptyTerminalAssistantResponseError, getAgentDir, getTerminalAssistantStopReason, hasEmptyTerminalAssistantResponse, readStatus } from "../../shared/utils.js";
|
|
69
71
|
import { planBackgroundRunHistory, recordRun } from "../shared/run-history.js";
|
|
70
72
|
import { planAbortRecovery } from "../shared/abort-recovery.js";
|
|
71
73
|
import {
|
|
@@ -112,10 +114,11 @@ import { resolveCodexExecLaunch } from "../shared/codex-exec-adapter.js";
|
|
|
112
114
|
import { resolveCursorAgentLaunch } from "../shared/cursor-agent-adapter.js";
|
|
113
115
|
import { resolveExternalCliRunnerStatus } from "../shared/external-cli-contract.js";
|
|
114
116
|
import { formatHerdrMachineHint, prepareHerdrMachineExternalCliRun } from "../shared/herdr-machine.js";
|
|
115
|
-
import {
|
|
117
|
+
import { editsLocalDisk } from "../shared/rex-machine.js";
|
|
116
118
|
import { HerdrExternalNeedsAttentionError, createHerdrExternalAdapter, prepareInternalHerdrExternalAdapter } from "../shared/herdr-external-adapters.js";
|
|
117
119
|
import { runExternalJob } from "../shared/external-job-runner.js";
|
|
118
120
|
import { createOrcaProgressTab } from "../shared/orca-progress-tabs.js";
|
|
121
|
+
import { setWaitToolName } from "../../shared/wait-tool-name.js";
|
|
119
122
|
import {
|
|
120
123
|
acceptChildWatchdogEvent,
|
|
121
124
|
applyChildWatchdogMessage,
|
|
@@ -207,15 +210,6 @@ function appendDiagnosticJsonl(filePath, line, droppedEventType) {
|
|
|
207
210
|
}
|
|
208
211
|
state.diagnosticsTruncated = true;
|
|
209
212
|
}
|
|
210
|
-
function isBlockingSupervisorTool(toolName, args) {
|
|
211
|
-
if (!args || typeof args !== "object" || Array.isArray(args))
|
|
212
|
-
return false;
|
|
213
|
-
if (toolName === "contact_supervisor") {
|
|
214
|
-
const reason = args.reason;
|
|
215
|
-
return reason === "need_decision" || reason === "interview_request";
|
|
216
|
-
}
|
|
217
|
-
return toolName === "intercom" && args.action === "ask";
|
|
218
|
-
}
|
|
219
213
|
function findLatestSessionFile(sessionDir) {
|
|
220
214
|
try {
|
|
221
215
|
const files = fs.readdirSync(sessionDir).filter((f) => f.endsWith(".jsonl")).map((f) => path.join(sessionDir, f));
|
|
@@ -624,6 +618,8 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
624
618
|
if (step.machine) {
|
|
625
619
|
if (step.machine.provider !== "herdr")
|
|
626
620
|
throw new Error("Rex supports native DM children only.");
|
|
621
|
+
if (!("target" in step.machine))
|
|
622
|
+
throw new Error("Machine 'local' runs native DM children only.");
|
|
627
623
|
const runner = resolveExternalCliRunnerStatus({ ...step.runner, machine: step.machine });
|
|
628
624
|
const outputSnapshot = captureSingleOutputSnapshot(step.outputPath);
|
|
629
625
|
const placedRunId = `${ctx.id}-${ctx.flatIndex}`;
|
|
@@ -778,7 +774,7 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
778
774
|
});
|
|
779
775
|
}
|
|
780
776
|
const effectiveCwd = step.cwd ?? ctx.cwd;
|
|
781
|
-
const cwdError = preflightLaunchCwd(step.requestedCwd ?? effectiveCwd, effectiveCwd);
|
|
777
|
+
const cwdError = step.machine && !editsLocalDisk(step.machine) ? undefined : preflightLaunchCwd(step.requestedCwd ?? effectiveCwd, effectiveCwd);
|
|
782
778
|
if (cwdError)
|
|
783
779
|
return { agent: step.agent, output: cwdError, error: cwdError, exitCode: 1, context: step.context };
|
|
784
780
|
if (step.context === "fork" && step.sessionFile && fs.existsSync(step.sessionFile)) {
|
|
@@ -799,8 +795,8 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
799
795
|
let toolBudget = step.toolBudget ? initialToolBudgetState(step.toolBudget) : undefined;
|
|
800
796
|
let toolBudgetBlocked = false;
|
|
801
797
|
let actualLaunchContractDigest = step.launchContractDigest;
|
|
802
|
-
const mutationSnapshot = step.machine && !
|
|
803
|
-
let finalMutationEvidence = collectTrackedMutationEvidence(mutationSnapshot, step.cwd ?? ctx.cwd);
|
|
798
|
+
const mutationSnapshot = step.machine && !editsLocalDisk(step.machine) ? remoteMutationSnapshot(step.cwd ?? ctx.cwd) : snapshotTrackedMutations(step.cwd ?? ctx.cwd);
|
|
799
|
+
let finalMutationEvidence = await collectTrackedMutationEvidence(mutationSnapshot, step.cwd ?? ctx.cwd);
|
|
804
800
|
let contextOverflow = false;
|
|
805
801
|
let launchWarningsEmitted = false;
|
|
806
802
|
const aggregateUsage = emptyUsage();
|
|
@@ -941,11 +937,11 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
941
937
|
onContextWindow: (contextLimit) => ctx.onAttemptStart?.({ ...attemptModel, contextLimit }),
|
|
942
938
|
transcriptWriter,
|
|
943
939
|
toolTimeoutMs: ctx.toolTimeoutMs,
|
|
944
|
-
runDeadlineAt: ctx.deadlineAt,
|
|
945
940
|
expectedModelForVerification,
|
|
946
941
|
modelVerificationRegistry: step.modelVerificationRegistry,
|
|
947
942
|
modelResponseAliases: step.modelResponseAliases,
|
|
948
|
-
mutationTools: step.mutationTools
|
|
943
|
+
mutationTools: step.mutationTools,
|
|
944
|
+
parentExtensionProvider: step.parentExtensionProvider
|
|
949
945
|
}));
|
|
950
946
|
launched = true;
|
|
951
947
|
aggregateUsage.input += run.usage.input;
|
|
@@ -989,8 +985,8 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
989
985
|
const hiddenError = terminalDiagnosticsEligible && run.exitCode === 0 && !run.error && !toolAvailabilityError && !structuredError && !midToolExitError ? detectSubagentError(errorMessages) : null;
|
|
990
986
|
const terminalEmptyAfterUsefulWork = !validatedStructuredOutput && hasEmptyTerminalAssistantResponse(run.messages) && (run.toolCount > 0 || Boolean(run.finalOutput.trim()));
|
|
991
987
|
const emptyOutputError = terminalDiagnosticsEligible && run.exitCode === 0 && !run.error && !toolAvailabilityError && !structuredError && !validatedStructuredOutput && (!run.finalOutput.trim() || terminalEmptyAfterUsefulWork) && (!hiddenError?.hasError || hasEmptyTerminalAssistantResponse(run.messages)) ? formatEmptyTerminalAssistantResponseError(run.messages) : undefined;
|
|
992
|
-
const
|
|
993
|
-
const mutationEvidence = run.nativeMachine && !
|
|
988
|
+
const truncatedResponseError = hiddenError && !hiddenError.hasError && !validatedStructuredOutput && getTerminalAssistantStopReason(run.messages) === "length" ? TRUNCATED_RESPONSE_ERROR : undefined;
|
|
989
|
+
const mutationEvidence = run.nativeMachine && !editsLocalDisk(step.machine) ? remoteMutationEvidence(run.nativeMachine) : await collectTrackedMutationEvidence(mutationSnapshot, step.cwd ?? ctx.cwd);
|
|
994
990
|
finalMutationEvidence = mutationEvidence;
|
|
995
991
|
const mutationAttemptObserved = run.observedMutationAttempt === true || mutationEvidence.attemptedMutation === true;
|
|
996
992
|
const finalOutputHasPersistableFileContent = run.exitCode === 0 && !run.error && !emptyOutputError && (Boolean(stripAcceptanceReport(run.finalOutput).trim()) || validatedStructuredOutput);
|
|
@@ -998,8 +994,8 @@ ${resolvedOutput.saveError}` : resolvedOutput.saveError : external.error;
|
|
|
998
994
|
finalRequiredOutputMissing = requiredOutput?.missing;
|
|
999
995
|
const missingRequiredOutputError = terminalDiagnosticsEligible ? formatRequiredOutputError(requiredOutput) : undefined;
|
|
1000
996
|
const missingRequiredOutputAfterMutation = Boolean(missingRequiredOutputError) && (mutationAttemptObserved || Boolean(mutationEvidence.changedFiles.length));
|
|
1001
|
-
const effectiveExitCode = toolAvailabilityError || midToolExitError || structuredError || emptyOutputError || missingRequiredOutputError ? 1 : hiddenError?.hasError ? hiddenError.exitCode ?? 1 : run.error && run.exitCode === 0 ? 1 : run.exitCode;
|
|
1002
|
-
const underlyingError = toolAvailabilityError ?? midToolExitError ?? structuredError ?? run.error ?? emptyOutputError ?? (missingRequiredOutputAfterMutation ? missingRequiredOutputError : undefined) ?? (hiddenError?.hasError ? hiddenError.details ? `${hiddenError.errorType} failed (exit ${effectiveExitCode}): ${hiddenError.details}` : `${hiddenError.errorType} failed with exit code ${effectiveExitCode}` : undefined);
|
|
997
|
+
const effectiveExitCode = toolAvailabilityError || midToolExitError || structuredError || truncatedResponseError || emptyOutputError || missingRequiredOutputError ? 1 : hiddenError?.hasError ? hiddenError.exitCode ?? 1 : run.error && run.exitCode === 0 ? 1 : run.exitCode;
|
|
998
|
+
const underlyingError = toolAvailabilityError ?? midToolExitError ?? structuredError ?? run.error ?? emptyOutputError ?? truncatedResponseError ?? (missingRequiredOutputAfterMutation ? missingRequiredOutputError : undefined) ?? (hiddenError?.hasError ? hiddenError.details ? `${hiddenError.errorType} failed (exit ${effectiveExitCode}): ${hiddenError.details}` : `${hiddenError.errorType} failed with exit code ${effectiveExitCode}` : undefined);
|
|
1003
999
|
const mutationGuardError = effectiveExitCode === 0 && !underlyingError && !missingRequiredOutputError && !step.runner ? implementationMutationError({
|
|
1004
1000
|
agent: step.agent,
|
|
1005
1001
|
task,
|
|
@@ -1234,9 +1230,9 @@ async function runSingleStep(step, ctx) {
|
|
|
1234
1230
|
ctx.orcaProgressTab?.section({ agent: step.agent, index: ctx.flatIndex, count: ctx.flatStepCount });
|
|
1235
1231
|
return runSingleStepInner(step, ctx);
|
|
1236
1232
|
}
|
|
1237
|
-
function externalRunnerStatus(runner) {
|
|
1233
|
+
function externalRunnerStatus(runner, machine) {
|
|
1238
1234
|
if (runner?.type === "external-cli") {
|
|
1239
|
-
return resolveExternalCliRunnerStatus(runner);
|
|
1235
|
+
return resolveExternalCliRunnerStatus(machine?.provider === "herdr" && "target" in machine ? { ...runner, machine } : runner);
|
|
1240
1236
|
}
|
|
1241
1237
|
if (runner?.type === "external-job") {
|
|
1242
1238
|
return {
|
|
@@ -1406,15 +1402,11 @@ function combinedAbortSignal(signals) {
|
|
|
1406
1402
|
}
|
|
1407
1403
|
return controller.signal;
|
|
1408
1404
|
}
|
|
1409
|
-
async function runSingleStepWithTimeout(step, ctx,
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
});
|
|
1415
|
-
const parentRemainingMs = parentDeadlineAt === undefined ? undefined : Math.max(0, parentDeadlineAt - Date.now());
|
|
1416
|
-
const timeoutMs = parentRemainingMs === undefined ? step.timeoutMs : Math.min(step.timeoutMs, parentRemainingMs);
|
|
1417
|
-
const timeoutMessage = parentRemainingMs !== undefined && parentRemainingMs <= step.timeoutMs ? ctx.timeoutMessage : `Subagent timed out after ${step.timeoutMs}ms.`;
|
|
1405
|
+
async function runSingleStepWithTimeout(step, ctx, runRemainingMs) {
|
|
1406
|
+
const runRemainingAtStart = runRemainingMs();
|
|
1407
|
+
if (step.timeoutMs === undefined || runRemainingAtStart !== undefined && runRemainingAtStart <= step.timeoutMs) {
|
|
1408
|
+
return runSingleStep(step, ctx);
|
|
1409
|
+
}
|
|
1418
1410
|
const timeoutController = new AbortController;
|
|
1419
1411
|
let timeoutAction;
|
|
1420
1412
|
let timeoutTriggered = false;
|
|
@@ -1431,23 +1423,27 @@ async function runSingleStepWithTimeout(step, ctx, parentDeadlineAt) {
|
|
|
1431
1423
|
if (action && timeoutTriggered)
|
|
1432
1424
|
action();
|
|
1433
1425
|
};
|
|
1434
|
-
const timer =
|
|
1435
|
-
timer.unref?.();
|
|
1426
|
+
const timer = startPausableTimer(step.timeoutMs, triggerTimeout);
|
|
1436
1427
|
try {
|
|
1437
1428
|
return await runSingleStep(step, {
|
|
1438
1429
|
...ctx,
|
|
1439
1430
|
registerTimeout,
|
|
1440
|
-
|
|
1431
|
+
onChildEvent: (event) => {
|
|
1432
|
+
pauseForSupervisorWait(timer, event);
|
|
1433
|
+
ctx.onChildEvent?.(event);
|
|
1434
|
+
},
|
|
1441
1435
|
timeoutSignal: combinedAbortSignal([ctx.timeoutSignal, timeoutController.signal]),
|
|
1442
|
-
timeoutMessage
|
|
1436
|
+
timeoutMessage: `Subagent timed out after ${step.timeoutMs}ms.`
|
|
1443
1437
|
});
|
|
1444
1438
|
} finally {
|
|
1445
|
-
|
|
1439
|
+
timer.clear();
|
|
1446
1440
|
ctx.registerTimeout?.(undefined);
|
|
1447
1441
|
}
|
|
1448
1442
|
}
|
|
1449
1443
|
export async function runSubagent(config, childSessions) {
|
|
1450
1444
|
const { id, steps, resultPath, cwd, placeholder, taskIndex, totalTasks, maxOutput, artifactsDir, artifactConfig } = config;
|
|
1445
|
+
if (config.waitToolName)
|
|
1446
|
+
setWaitToolName(config.waitToolName);
|
|
1451
1447
|
const globalSemaphore = new Semaphore(config.globalConcurrencyLimit ?? DEFAULT_GLOBAL_CONCURRENCY_LIMIT);
|
|
1452
1448
|
let previousOutput = "";
|
|
1453
1449
|
const outputs = {};
|
|
@@ -1474,6 +1470,12 @@ export async function runSubagent(config, childSessions) {
|
|
|
1474
1470
|
let activityTimer;
|
|
1475
1471
|
let timeoutTimer;
|
|
1476
1472
|
let checkpointTimer;
|
|
1473
|
+
const runRemainingMs = () => timeoutTimer?.remainingMs();
|
|
1474
|
+
const runDeadlineAt = () => {
|
|
1475
|
+
const remainingMs = runRemainingMs();
|
|
1476
|
+
return remainingMs === undefined ? undefined : Date.now() + remainingMs;
|
|
1477
|
+
};
|
|
1478
|
+
const runDeadlineExpired = () => runRemainingMs() === 0;
|
|
1477
1479
|
let timedOut = false;
|
|
1478
1480
|
let stopped = false;
|
|
1479
1481
|
let usageBudgetExceeded = false;
|
|
@@ -1503,7 +1505,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
1503
1505
|
agent: task.agent,
|
|
1504
1506
|
...task.lane ? { lane: task.lane } : config.lane ? { lane: config.lane } : {},
|
|
1505
1507
|
...taskSessionName ? { sessionName: taskSessionName } : {},
|
|
1506
|
-
...externalRunnerStatus(task.runner) ? { runner: externalRunnerStatus(task.runner) } : {},
|
|
1508
|
+
...externalRunnerStatus(task.runner, task.machine) ? { runner: externalRunnerStatus(task.runner, task.machine) } : {},
|
|
1507
1509
|
...statusStepDescription(task.task) ? { description: statusStepDescription(task.task) } : {},
|
|
1508
1510
|
...task.context ? { context: task.context } : {},
|
|
1509
1511
|
phase: task.phase,
|
|
@@ -1533,7 +1535,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
1533
1535
|
parallelGroups.push({ start: flatStepCount, count: 1, stepIndex });
|
|
1534
1536
|
initialStatusSteps.push(omitUndefinedProperties({
|
|
1535
1537
|
agent: `expand:${step.parallel.agent}`,
|
|
1536
|
-
...externalRunnerStatus(step.parallel.runner) ? { runner: externalRunnerStatus(step.parallel.runner) } : {},
|
|
1538
|
+
...externalRunnerStatus(step.parallel.runner, step.parallel.machine) ? { runner: externalRunnerStatus(step.parallel.runner, step.parallel.machine) } : {},
|
|
1537
1539
|
...step.parallel.context ? { context: step.parallel.context } : {},
|
|
1538
1540
|
phase: step.phase ?? step.parallel.phase,
|
|
1539
1541
|
label: step.label ?? step.parallel.label ?? `Dynamic fanout (${step.collect.as})`,
|
|
@@ -1557,7 +1559,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
1557
1559
|
agent: step.agent,
|
|
1558
1560
|
...step.lane ? { lane: step.lane } : config.lane ? { lane: config.lane } : {},
|
|
1559
1561
|
...stepSessionName ? { sessionName: stepSessionName } : {},
|
|
1560
|
-
...externalRunnerStatus(step.runner) ? { runner: externalRunnerStatus(step.runner) } : {},
|
|
1562
|
+
...externalRunnerStatus(step.runner, step.machine) ? { runner: externalRunnerStatus(step.runner, step.machine) } : {},
|
|
1561
1563
|
...statusStepDescription(step.task) ? { description: statusStepDescription(step.task) } : {},
|
|
1562
1564
|
...step.context ? { context: step.context } : {},
|
|
1563
1565
|
phase: step.phase,
|
|
@@ -2531,9 +2533,11 @@ export async function runSubagent(config, childSessions) {
|
|
|
2531
2533
|
const target = request?.targets.find((candidate) => candidate.index === index);
|
|
2532
2534
|
if (!request || !target)
|
|
2533
2535
|
return;
|
|
2534
|
-
if (target.state === "delivered" || target.state === "late"
|
|
2536
|
+
if (target.state === "delivered" || target.state === "late")
|
|
2535
2537
|
return;
|
|
2536
|
-
if (target.state === delivery.
|
|
2538
|
+
if (target.state === "failed" && !(target.failureKind === "unconsumed" && delivery.failureKind === "rejected"))
|
|
2539
|
+
return;
|
|
2540
|
+
if (target.state === delivery.state && target.failureKind === delivery.failureKind)
|
|
2537
2541
|
return;
|
|
2538
2542
|
const late = fs.existsSync(steeringMarkerPath(requestId));
|
|
2539
2543
|
const now = Date.now();
|
|
@@ -2545,7 +2549,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
2545
2549
|
emitSteeringEvent("subagent.steer.queued", { type: "steer", id: requestId, ts: now, message: delivery.message }, index, { deliveryStatus: "queued", message: delivery.message });
|
|
2546
2550
|
} else {
|
|
2547
2551
|
markSteeringAttention(index);
|
|
2548
|
-
updateSteeringLifecycleTarget(requestId, index, "failed", now, { reason: delivery.message });
|
|
2552
|
+
updateSteeringLifecycleTarget(requestId, index, "failed", now, { reason: delivery.message, failureKind: delivery.failureKind ?? "rejected" });
|
|
2549
2553
|
emitSteeringEvent("subagent.steer.failed", { type: "steer", id: requestId, ts: now, message: delivery.message }, index, { reason: delivery.message });
|
|
2550
2554
|
}
|
|
2551
2555
|
emitTerminalSteeringNotice(requestId, `Steering failed for run ${id}: ${delivery.message}`);
|
|
@@ -2585,8 +2589,17 @@ export async function runSubagent(config, childSessions) {
|
|
|
2585
2589
|
statusPayload.lastUpdate = now;
|
|
2586
2590
|
writeStatusPayload();
|
|
2587
2591
|
};
|
|
2592
|
+
const pauseRunTimers = (flatIndex) => {
|
|
2593
|
+
timeoutTimer?.pause(String(flatIndex));
|
|
2594
|
+
checkpointTimer?.pause(String(flatIndex));
|
|
2595
|
+
};
|
|
2596
|
+
const resumeRunTimers = (flatIndex) => {
|
|
2597
|
+
timeoutTimer?.resume(String(flatIndex));
|
|
2598
|
+
checkpointTimer?.resume(String(flatIndex));
|
|
2599
|
+
};
|
|
2588
2600
|
const recordStepResult = (fi, singleResult, startedAt, endedAt, recordLaunchContractDigest = false) => {
|
|
2589
2601
|
const step = requiredStatusStep(statusPayload, fi);
|
|
2602
|
+
resumeRunTimers(fi);
|
|
2590
2603
|
const childStopped = singleResult.stopped === true;
|
|
2591
2604
|
const childInterrupted = singleResult.interrupted === true;
|
|
2592
2605
|
step.status = stopped || childStopped ? "stopped" : timedOut ? "failed" : childInterrupted ? "paused" : singleResult.execution?.status === "partial" ? "partial" : singleResult.exitCode === 0 ? "complete" : "failed";
|
|
@@ -2687,7 +2700,9 @@ export async function runSubagent(config, childSessions) {
|
|
|
2687
2700
|
statusPayload.toolBudget = step.toolBudget;
|
|
2688
2701
|
}
|
|
2689
2702
|
recordActiveToolCall(flatIndex, { toolCallId: event.toolCallId, toolName: event.toolName }, { argsPreview, currentPath, blocksSupervisor, now });
|
|
2690
|
-
|
|
2703
|
+
if (blocksSupervisor)
|
|
2704
|
+
pauseRunTimers(flatIndex);
|
|
2705
|
+
const pending = omitUndefinedProperties({ tool: event.toolName, path: currentPath, mutates, startedAt: now, progressText: extractReportedProgress(event.toolName, event.args) });
|
|
2691
2706
|
pendingToolResults[flatIndex] = pending;
|
|
2692
2707
|
const startedCallId = event.toolCallId;
|
|
2693
2708
|
if (typeof startedCallId === "string" && startedCallId)
|
|
@@ -2729,6 +2744,8 @@ export async function runSubagent(config, childSessions) {
|
|
|
2729
2744
|
const supervisorPreviousActivity = supervisorAttentionSteps.get(flatIndex);
|
|
2730
2745
|
const stillBlockingSupervisor = [...activeToolCalls[flatIndex]?.values() ?? []].some((active) => active.blocksSupervisor);
|
|
2731
2746
|
const clearedSupervisorAttention = endedTool?.blocksSupervisor && !stillBlockingSupervisor ? supervisorAttentionSteps.delete(flatIndex) : false;
|
|
2747
|
+
if (!stillBlockingSupervisor)
|
|
2748
|
+
resumeRunTimers(flatIndex);
|
|
2732
2749
|
if (clearedSupervisorAttention && step.activityState === "needs_attention") {
|
|
2733
2750
|
setOptionalProperty(step, "activityState", supervisorPreviousActivity);
|
|
2734
2751
|
syncAggregateActivityState();
|
|
@@ -2745,6 +2762,10 @@ export async function runSubagent(config, childSessions) {
|
|
|
2745
2762
|
pendingToolResults[flatIndex] = undefined;
|
|
2746
2763
|
const resultText = extractTextFromContent(event.message.content);
|
|
2747
2764
|
const resultToolName = event.message.toolName;
|
|
2765
|
+
if (event.message.isError !== true && resultToolName === toolSnapshot?.tool && toolSnapshot?.progressText) {
|
|
2766
|
+
step.progressText = toolSnapshot.progressText;
|
|
2767
|
+
step.progressUpdatedAt = now;
|
|
2768
|
+
}
|
|
2748
2769
|
const blockedTool = (typeof resultToolName === "string" && resultToolName.length > 0 ? resultToolName : undefined) ?? toolSnapshot?.tool;
|
|
2749
2770
|
const configuredToolBudget = flatSteps[flatIndex]?.toolBudget;
|
|
2750
2771
|
const budgetBlocked = configuredToolBudget !== undefined && isToolBudgetBlockedMessage(configuredToolBudget, resultText, blockedTool);
|
|
@@ -3001,7 +3022,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3001
3022
|
cleanup
|
|
3002
3023
|
});
|
|
3003
3024
|
writeStatusPayload();
|
|
3004
|
-
},
|
|
3025
|
+
}, runDeadlineAt());
|
|
3005
3026
|
const interruptRunner = () => {
|
|
3006
3027
|
consumeInterruptRequest(asyncDir);
|
|
3007
3028
|
if (interrupted || statusPayload.state !== "running")
|
|
@@ -3124,20 +3145,19 @@ export async function runSubagent(config, childSessions) {
|
|
|
3124
3145
|
});
|
|
3125
3146
|
if (config.deadlineAt !== undefined) {
|
|
3126
3147
|
const remainingMs = Math.max(0, config.deadlineAt - Date.now());
|
|
3127
|
-
|
|
3128
|
-
timeoutTimer
|
|
3148
|
+
const runTimer = startPausableTimer(remainingMs, timeoutRunner);
|
|
3149
|
+
timeoutTimer = runTimer;
|
|
3129
3150
|
const checkpointBeforeDeadlineMs = config.checkpointBeforeDeadlineMs;
|
|
3130
3151
|
const checkpointDelayMs = checkpointBeforeDeadlineMs === undefined || !Number.isInteger(checkpointBeforeDeadlineMs) || checkpointBeforeDeadlineMs <= 0 ? undefined : remainingMs - checkpointBeforeDeadlineMs;
|
|
3131
3152
|
if (checkpointDelayMs !== undefined && checkpointDelayMs >= 1000) {
|
|
3132
|
-
|
|
3133
|
-
checkpointTimer = setTimeout(() => {
|
|
3153
|
+
checkpointTimer = startPausableTimer(checkpointDelayMs, () => {
|
|
3134
3154
|
checkpointTimer = undefined;
|
|
3135
3155
|
if (timedOut || stopped || interrupted)
|
|
3136
3156
|
return;
|
|
3137
3157
|
if (!statusPayload.steps.some((step) => step.status === "running"))
|
|
3138
3158
|
return;
|
|
3139
3159
|
const now = Date.now();
|
|
3140
|
-
const seconds = Math.round(
|
|
3160
|
+
const seconds = Math.round(runTimer.remainingMs() / 1000);
|
|
3141
3161
|
deliverSteerRequest({
|
|
3142
3162
|
type: "steer",
|
|
3143
3163
|
id: `deadline-checkpoint-${now}`,
|
|
@@ -3146,8 +3166,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3146
3166
|
source: "deadline-checkpoint",
|
|
3147
3167
|
message: `Deadline checkpoint from the runner: this run is killed in about ${seconds} seconds. Finish the current tool call only, then stop and reply with a handoff: changed files, build/test state, remaining work, and commit/PR state. Do not start new work.`
|
|
3148
3168
|
});
|
|
3149
|
-
}
|
|
3150
|
-
checkpointTimer.unref?.();
|
|
3169
|
+
});
|
|
3151
3170
|
}
|
|
3152
3171
|
}
|
|
3153
3172
|
appendJsonl(eventsPath, JSON.stringify({
|
|
@@ -3297,7 +3316,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3297
3316
|
const thinking = thinkingOverride ? resolveEffectiveThinking(model, thinkingOverride) : undefined;
|
|
3298
3317
|
const outputPath = step.parallel.namespaceOutputPath && step.parallel.outputPath ? path.join(path.dirname(step.parallel.outputPath), `dynamic-${stepIndex}`, `${itemIndex}-${step.parallel.agent}`, path.basename(step.parallel.outputPath)) : step.parallel.outputPath;
|
|
3299
3318
|
const taskText = task.task ?? step.parallel.task;
|
|
3300
|
-
const materializedTask = step.parallel.namespaceOutputPath ? injectSingleOutputInstruction(taskText, outputPath, step.parallel) : taskText;
|
|
3319
|
+
const materializedTask = step.parallel.namespaceOutputPath ? injectSingleOutputInstruction(taskText, outputPath, step.parallel, step.parallel.machine) : taskText;
|
|
3301
3320
|
const sessionName = deriveChildSessionName({ agent: step.parallel.agent, task: taskText, label: task.label ?? step.parallel.label });
|
|
3302
3321
|
return omitUndefinedProperties({
|
|
3303
3322
|
...step.parallel,
|
|
@@ -3330,7 +3349,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3330
3349
|
return omitUndefinedProperties({
|
|
3331
3350
|
agent: task.agent,
|
|
3332
3351
|
...task.sessionName ? { sessionName: task.sessionName } : {},
|
|
3333
|
-
...externalRunnerStatus(task.runner) ? { runner: externalRunnerStatus(task.runner) } : {},
|
|
3352
|
+
...externalRunnerStatus(task.runner, task.machine) ? { runner: externalRunnerStatus(task.runner, task.machine) } : {},
|
|
3334
3353
|
...statusStepDescription(task.task) ? { description: statusStepDescription(task.task) } : {},
|
|
3335
3354
|
...task.context ? { context: task.context } : {},
|
|
3336
3355
|
...task.phase ?? step.phase ? { phase: task.phase ?? step.phase } : {},
|
|
@@ -3496,7 +3515,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3496
3515
|
usageBudgetExhausted: continuationUsageBudgetExhausted,
|
|
3497
3516
|
usageBudget: config.usageBudget,
|
|
3498
3517
|
orcaProgressTab
|
|
3499
|
-
}),
|
|
3518
|
+
}), runRemainingMs);
|
|
3500
3519
|
const taskEndTime = Date.now();
|
|
3501
3520
|
const childInterrupted = singleResult.interrupted === true;
|
|
3502
3521
|
const childStopped = singleResult.stopped === true;
|
|
@@ -3686,7 +3705,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3686
3705
|
try {
|
|
3687
3706
|
worktreeSetup = await createWorktrees(cwd, `${id}-s${stepIndex}`, group.parallel.length, omitUndefinedProperties({
|
|
3688
3707
|
signal: setupSignal,
|
|
3689
|
-
deadlineAt:
|
|
3708
|
+
deadlineAt: runDeadlineAt(),
|
|
3690
3709
|
agents: group.parallel.map((task) => task.agent),
|
|
3691
3710
|
labels: group.parallel.map((task) => task.lane?.key ?? config.workflowKey ?? task.outputName ?? task.label),
|
|
3692
3711
|
tasks: group.parallel.map((task) => task.task),
|
|
@@ -3717,14 +3736,14 @@ export async function runSubagent(config, childSessions) {
|
|
|
3717
3736
|
writeStatusPayload();
|
|
3718
3737
|
}
|
|
3719
3738
|
}));
|
|
3720
|
-
if (
|
|
3739
|
+
if (runDeadlineExpired())
|
|
3721
3740
|
timeoutRunner();
|
|
3722
3741
|
if (setupSignal.aborted)
|
|
3723
3742
|
throw new Error(stopped ? stopMessage : timedOut ? timeoutMessage ?? SUBAGENT_TIMED_OUT_MESSAGE : "Subagent paused during worktree setup.");
|
|
3724
3743
|
} catch (error) {
|
|
3725
3744
|
if (worktreeSetup)
|
|
3726
3745
|
await cleanupRemainingWorktree(worktreeSetup, stepIndex, groupStartFlatIndex);
|
|
3727
|
-
if (
|
|
3746
|
+
if (runDeadlineExpired())
|
|
3728
3747
|
timeoutRunner();
|
|
3729
3748
|
const setupError = error instanceof Error ? error.message : String(error);
|
|
3730
3749
|
if (error instanceof WorktreeSetupError)
|
|
@@ -3892,7 +3911,7 @@ export async function runSubagent(config, childSessions) {
|
|
|
3892
3911
|
usageBudgetExhausted: continuationUsageBudgetExhausted,
|
|
3893
3912
|
usageBudget: config.usageBudget,
|
|
3894
3913
|
orcaProgressTab
|
|
3895
|
-
}),
|
|
3914
|
+
}), runRemainingMs);
|
|
3896
3915
|
if (task.sessionFile) {
|
|
3897
3916
|
latestSessionFile = task.sessionFile;
|
|
3898
3917
|
}
|
|
@@ -4106,7 +4125,7 @@ ${formatParallelHandoffError(error)}`;
|
|
|
4106
4125
|
try {
|
|
4107
4126
|
singleWorktreeSetup = await createWorktrees(cwd, `${id}-s${stepIndex}`, 1, omitUndefinedProperties({
|
|
4108
4127
|
signal: setupSignal,
|
|
4109
|
-
deadlineAt:
|
|
4128
|
+
deadlineAt: runDeadlineAt(),
|
|
4110
4129
|
agents: [seqStep.agent],
|
|
4111
4130
|
labels: [seqStep.lane?.key ?? config.workflowKey ?? seqStep.outputName ?? seqStep.label],
|
|
4112
4131
|
tasks: [seqStep.task],
|
|
@@ -4142,7 +4161,7 @@ ${formatParallelHandoffError(error)}`;
|
|
|
4142
4161
|
} catch (error) {
|
|
4143
4162
|
if (error instanceof WorktreeSetupError)
|
|
4144
4163
|
publishSetupUnknown(error.snapshot);
|
|
4145
|
-
if (
|
|
4164
|
+
if (runDeadlineExpired())
|
|
4146
4165
|
timeoutRunner();
|
|
4147
4166
|
const message = error instanceof Error ? error.message : String(error);
|
|
4148
4167
|
if (childStopRequests.has(flatIndex))
|
|
@@ -4159,7 +4178,7 @@ ${formatParallelHandoffError(error)}`;
|
|
|
4159
4178
|
break;
|
|
4160
4179
|
}
|
|
4161
4180
|
}
|
|
4162
|
-
if (singleWorktreeSetup &&
|
|
4181
|
+
if (singleWorktreeSetup && runDeadlineExpired())
|
|
4163
4182
|
timeoutRunner();
|
|
4164
4183
|
if (singleWorktreeSetup && (timedOut || stopped || interrupted || childStopRequests.has(flatIndex))) {
|
|
4165
4184
|
await cleanupRemainingWorktree(singleWorktreeSetup, stepIndex, flatIndex);
|
|
@@ -4237,7 +4256,7 @@ ${formatParallelHandoffError(error)}`;
|
|
|
4237
4256
|
usageBudgetExhausted: continuationUsageBudgetExhausted,
|
|
4238
4257
|
usageBudget: config.usageBudget,
|
|
4239
4258
|
orcaProgressTab
|
|
4240
|
-
}),
|
|
4259
|
+
}), runRemainingMs);
|
|
4241
4260
|
} catch (error) {
|
|
4242
4261
|
if (singleWorktreeSetup)
|
|
4243
4262
|
await cleanupRemainingWorktree(singleWorktreeSetup, stepIndex, flatIndex);
|
|
@@ -4493,14 +4512,10 @@ ${r.output || (r.exitCode !== 0 ? r.error : undefined) || "(no output)"}`).join(
|
|
|
4493
4512
|
clearInterval(activityTimer);
|
|
4494
4513
|
activityTimer = undefined;
|
|
4495
4514
|
}
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
if (checkpointTimer) {
|
|
4501
|
-
clearTimeout(checkpointTimer);
|
|
4502
|
-
checkpointTimer = undefined;
|
|
4503
|
-
}
|
|
4515
|
+
timeoutTimer?.clear();
|
|
4516
|
+
timeoutTimer = undefined;
|
|
4517
|
+
checkpointTimer?.clear();
|
|
4518
|
+
checkpointTimer = undefined;
|
|
4504
4519
|
if (!timedOut && !stopped && !interrupted && config.timeoutMs !== undefined && timeoutMessage !== undefined && results.some((result) => result.timedOut === true && result.error?.startsWith(timeoutMessage))) {
|
|
4505
4520
|
timedOut = true;
|
|
4506
4521
|
}
|
|
@@ -4536,7 +4551,7 @@ ${r.output || (r.exitCode !== 0 ? r.error : undefined) || "(no output)"}`).join(
|
|
|
4536
4551
|
continue;
|
|
4537
4552
|
changed = true;
|
|
4538
4553
|
const reason = target.state === "queued" ? unconsumedSteerReason() : "child terminated before steering delivery";
|
|
4539
|
-
updateSteeringLifecycleTarget(request.id, target.index, "failed", Date.now(), { reason });
|
|
4554
|
+
updateSteeringLifecycleTarget(request.id, target.index, "failed", Date.now(), { reason, failureKind: "unconsumed" });
|
|
4540
4555
|
markSteeringAttention(target.index);
|
|
4541
4556
|
emitSteeringEvent("subagent.steer.failed", { type: "steer", id: request.id, ts: request.requestedAt, message: reason }, target.index, { reason });
|
|
4542
4557
|
}
|
|
@@ -20,6 +20,7 @@ import { toAgentToolUsage } from "../../shared/utils.js";
|
|
|
20
20
|
import { collectWaitCompletions } from "./wait-completions.js";
|
|
21
21
|
import { formatResumeFirstFailedRunsNote } from "./resume-guidance.js";
|
|
22
22
|
import { formatTimeoutRecoveryLines } from "../shared/mutation-evidence.js";
|
|
23
|
+
import { waitToolName } from "../../shared/wait-tool-name.js";
|
|
23
24
|
export { WAIT_TOOL_DEFAULT_TIMEOUT_MS_ENV, WAIT_TOOL_ENABLED_ENV, resolveWaitToolConfig } from "./wait-config.js";
|
|
24
25
|
const ACTIVE_STATES = ["queued", "running"];
|
|
25
26
|
const DEFAULT_TIMEOUT_MS = 30 * 60 * 1000;
|
|
@@ -126,7 +127,7 @@ function foregroundChildrenNeedingAttention(run, indices) {
|
|
|
126
127
|
}
|
|
127
128
|
function formatForegroundAttention(run, children, elapsedMs) {
|
|
128
129
|
const childList = children.map((child) => `${child.agent}${child.index !== undefined ? `#${child.index}` : ""}`).join(", ");
|
|
129
|
-
return result(`Waited ${formatDuration(elapsedMs)} for remembered detached foreground run "${run.runId}"; attention required. ${children.length} child run(s) need attention: ${childList}. Reply to any pending supervisor request, then call
|
|
130
|
+
return result(`Waited ${formatDuration(elapsedMs)} for remembered detached foreground run "${run.runId}"; attention required. ${children.length} child run(s) need attention: ${childList}. Reply to any pending supervisor request, then call ${waitToolName()}({ id: "${run.runId}" }) again or inspect status; do not resume or launch a replacement while it remains detached.`);
|
|
130
131
|
}
|
|
131
132
|
function needsAttention(run) {
|
|
132
133
|
return run.activityState === "needs_attention" || run.steps.some((step) => step.activityState === "needs_attention");
|
|
@@ -140,7 +141,7 @@ function backgroundWorkIdentity(item) {
|
|
|
140
141
|
function backgroundWorkForSession(deps, nowMs) {
|
|
141
142
|
const sessionId = deps.state.currentSessionId;
|
|
142
143
|
if (!sessionId)
|
|
143
|
-
throw new Error(
|
|
144
|
+
throw new Error(`${waitToolName()} requires an active session identity to scope background work safely.`);
|
|
144
145
|
const runtimeId = deps.state.supervisorOwnerSessionId;
|
|
145
146
|
const sessionIds = runtimeId ? [sessionId, runtimeId] : [sessionId];
|
|
146
147
|
return deps.backgroundWork?.snapshot(sessionIds, nowMs) ?? snapshotBackgroundWork(sessionIds, nowMs);
|
|
@@ -446,7 +447,7 @@ async function waitForDetachedForegroundRun(run, signal, deps, startedAt, now, p
|
|
|
446
447
|
return result(`Wait aborted after ${formatDuration(now() - startedAt)}. Remembered foreground run "${run.runId}" remains detached. Reply to any pending supervisor request before resuming or launching a replacement.`, true);
|
|
447
448
|
}
|
|
448
449
|
if (now() - startedAt >= timeoutMs) {
|
|
449
|
-
return windowElapsedResult(`Wait window elapsed after ${formatDuration(timeoutMs)} with remembered foreground run "${run.runId}" still detached. Reply to any pending supervisor request, then call
|
|
450
|
+
return windowElapsedResult(`Wait window elapsed after ${formatDuration(timeoutMs)} with remembered foreground run "${run.runId}" still detached. Reply to any pending supervisor request, then call ${waitToolName()}({ id: "${run.runId}" }) again or inspect status; do not resume or launch a replacement while it remains detached.`, [run.runId]);
|
|
450
451
|
}
|
|
451
452
|
await waitForWake(pollIntervalMs, wake, deps);
|
|
452
453
|
}
|
|
@@ -477,10 +478,10 @@ async function waitForSessionDetachedForegroundRuns(runs, signal, deps, startedA
|
|
|
477
478
|
}
|
|
478
479
|
export async function waitForSubagents(params, signal, deps) {
|
|
479
480
|
if (deps.enabled === false) {
|
|
480
|
-
return result(
|
|
481
|
+
return result(`${waitToolName()} is disabled by config.waitTool or DM_SUBAGENT_WAIT_TOOL_ENABLED; returning immediately without blocking background work. Active work keeps going, and you can inspect subagents with subagent({ action: "status" }) or rely on completion notifications.`);
|
|
481
482
|
}
|
|
482
483
|
if (!deps.state.currentSessionId) {
|
|
483
|
-
return result(
|
|
484
|
+
return result(`${waitToolName()} requires an active session identity to scope background work safely.`, true);
|
|
484
485
|
}
|
|
485
486
|
const now = deps.now ?? Date.now;
|
|
486
487
|
const pollIntervalMs = Math.max(MIN_POLL_INTERVAL_MS, deps.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS);
|
|
@@ -532,7 +533,7 @@ ${references.join(`
|
|
|
532
533
|
}
|
|
533
534
|
if (selected && params.nonBlocking) {
|
|
534
535
|
if (!deps.subscribe) {
|
|
535
|
-
return result(
|
|
536
|
+
return result(`Non-blocking wait subscriptions require a long-lived interactive subagent runtime; this runtime can only use blocking ${waitToolName()} calls.`, true);
|
|
536
537
|
}
|
|
537
538
|
try {
|
|
538
539
|
const registration = deps.subscribe({ targetKind: selected.kind, runId: selected.id, requestedId: params.id, timeoutMs });
|
|
@@ -602,7 +603,7 @@ ${references.join(`
|
|
|
602
603
|
return result(`Wait aborted after ${formatDuration(now() - startedAt)}. Still active: ${stillActive}.`, true);
|
|
603
604
|
}
|
|
604
605
|
if (now() - startedAt >= timeoutMs) {
|
|
605
|
-
return windowElapsedResult(`Wait window elapsed after ${formatDuration(timeoutMs)} with ${activeInitialRuns.length} async run(s) and ${activeInitialProviderItems.length} provider item(s) still active: ${stillActive}. The work keeps going; call
|
|
606
|
+
return windowElapsedResult(`Wait window elapsed after ${formatDuration(timeoutMs)} with ${activeInitialRuns.length} async run(s) and ${activeInitialProviderItems.length} provider item(s) still active: ${stillActive}. The work keeps going; call ${waitToolName()} again or inspect subagent status.`, activeInitialRuns.map((run) => run.id), activeInitialProviderItems);
|
|
606
607
|
}
|
|
607
608
|
try {
|
|
608
609
|
await waitForWake(pollIntervalMs, wake, deps);
|
|
@@ -613,7 +614,7 @@ ${references.join(`
|
|
|
613
614
|
providerSnapshot = params.id ? providerSnapshot : backgroundWorkForSession(deps, now());
|
|
614
615
|
for (const provider of initialProviderNames) {
|
|
615
616
|
if (!providerSnapshot.providers.includes(provider)) {
|
|
616
|
-
return result(`Background-work provider '${provider}' disappeared while
|
|
617
|
+
return result(`Background-work provider '${provider}' disappeared while ${waitToolName()} was tracking its active work; completion cannot be confirmed.`, true);
|
|
617
618
|
}
|
|
618
619
|
}
|
|
619
620
|
providerActive = providerSnapshot.items;
|
|
@@ -645,7 +646,7 @@ ${references.join(`
|
|
|
645
646
|
}
|
|
646
647
|
const relevantAttention = attention.filter((run) => initialAsyncIds.has(run.id));
|
|
647
648
|
const supervisorAttentionHint = relevantAttention.some(hasSupervisorTool) ? ' Reply to any pending supervisor request. If subagent_supervisor({ action: "pending" }) is empty, check intercom({ action: "pending" }) because an external intercom tool may own the request.' : "";
|
|
648
|
-
const keepWaitingHint = stopOnAttention && supervisorAttentionHint === "" && (waitForAll || finishedAsyncCount + providerFinishedCount === 0) ?
|
|
649
|
+
const keepWaitingHint = stopOnAttention && supervisorAttentionHint === "" && (waitForAll || finishedAsyncCount + providerFinishedCount === 0) ? ` These runs are still running and none is waiting on a supervisor reply. To keep waiting through this kind of attention, call ${waitToolName()} again with stopOnAttention: false; supervisor requests still end that wait.` : "";
|
|
649
650
|
const attentionNote = relevantAttention.length > 0 ? ` ${relevantAttention.length} run(s) need attention: ${relevantAttention.map((run) => run.id).join(", ")} —${supervisorAttentionHint} inspect with subagent({ action: "status" }) then steer a top-level live async child, resume a paused/completed/failed child, or interrupt explicitly.${keepWaitingHint}` : "";
|
|
650
651
|
const stillRunning = active.filter((run) => initialAsyncIds.has(run.id)).length + providerActive.filter((item) => initialProviderIds.has(backgroundWorkIdentity(item))).length;
|
|
651
652
|
const elapsed = formatDuration(now() - startedAt);
|
|
@@ -669,7 +670,7 @@ ${foregroundResult.content.map((part) => part.type === "text" ? part.text : "").
|
|
|
669
670
|
}
|
|
670
671
|
const finishedCount = finishedAsyncCount + providerFinishedCount;
|
|
671
672
|
const subject = initialProviderIds.size === 0 ? "run(s)" : "item(s)";
|
|
672
|
-
const remainder = stillRunning > 0 ? ` ${stillRunning} ${subject} still in flight — call
|
|
673
|
+
const remainder = stillRunning > 0 ? ` ${stillRunning} ${subject} still in flight — call ${waitToolName()} again to catch the next one.` : relevantAttention.length > 0 ? " No other work is waitable until attention is handled." : initialProviderIds.size === 0 ? " No runs remain in flight." : " No work remains in flight.";
|
|
673
674
|
const progress = relevantAttention.length > 0 && finishedCount === 0 ? `${relevantAttention.length} of ${initialCount} ${subject} need attention` : `${finishedCount} of ${initialCount} ${subject} finished`;
|
|
674
675
|
return result(`Waited ${elapsed}; ${progress}.${outcome}${recoveryNote}${resumeGuidance}${attentionNote}${remainder} Relevant completion/control events have been observed; inspect status if a notification is not visible yet.`, deps.failOnFailedRuns === true && failedAsyncCount > 0 || deps.failOnAttention === true && relevantAttention.length > 0, completions);
|
|
675
676
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { DEFAULT_WAIT_TOOL_NAME } from "../../shared/wait-tool-name.js";
|
|
1
2
|
export const WAIT_TOOL_ENABLED_ENV = "DM_SUBAGENT_WAIT_TOOL_ENABLED";
|
|
2
3
|
export const WAIT_TOOL_DEFAULT_TIMEOUT_MS_ENV = "DM_SUBAGENT_WAIT_TOOL_DEFAULT_TIMEOUT_MS";
|
|
4
|
+
const WAIT_TOOL_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,63}$/;
|
|
5
|
+
const RESERVED_TOOL_NAMES = new Set(["subagent", "subagents_enable", "subagent_supervisor", "contact_supervisor", "intercom", "structured_output", "subagent_launch", "subagent_command", "watchdog_diff", "watchdog_ask", "watchdog_warn", "watchdog_permission_decision"]);
|
|
3
6
|
const TRUE_VALUES = new Set(["1", "true", "yes", "on", "enabled"]);
|
|
4
7
|
const FALSE_VALUES = new Set(["0", "false", "no", "off", "disabled"]);
|
|
5
8
|
function environmentValue(value) {
|
|
@@ -26,21 +29,31 @@ function configuredValue(config) {
|
|
|
26
29
|
if (typeof config === "boolean")
|
|
27
30
|
return { enabled: config };
|
|
28
31
|
if (!config || typeof config !== "object" || Array.isArray(config)) {
|
|
29
|
-
throw new Error("config.waitTool must be a boolean or an object with optional enabled and
|
|
32
|
+
throw new Error("config.waitTool must be a boolean or an object with optional enabled, defaultTimeoutMs and name values.");
|
|
30
33
|
}
|
|
31
|
-
const { enabled, defaultTimeoutMs } = config;
|
|
34
|
+
const { enabled, defaultTimeoutMs, name } = config;
|
|
32
35
|
if (enabled !== undefined && typeof enabled !== "boolean")
|
|
33
36
|
throw new Error("config.waitTool.enabled must be a boolean.");
|
|
34
37
|
if (defaultTimeoutMs !== undefined && (!Number.isInteger(defaultTimeoutMs) || defaultTimeoutMs < 1)) {
|
|
35
38
|
throw new Error("config.waitTool.defaultTimeoutMs must be a positive integer.");
|
|
36
39
|
}
|
|
37
|
-
|
|
40
|
+
if (name !== undefined && (typeof name !== "string" || !WAIT_TOOL_NAME_PATTERN.test(name))) {
|
|
41
|
+
throw new Error("config.waitTool.name must start with a letter and contain only letters, digits and underscores (at most 64 characters).");
|
|
42
|
+
}
|
|
43
|
+
if (typeof name === "string" && RESERVED_TOOL_NAMES.has(name))
|
|
44
|
+
throw new Error(`config.waitTool.name "${name}" is already a dm-subagents tool.`);
|
|
45
|
+
return {
|
|
46
|
+
enabled,
|
|
47
|
+
...defaultTimeoutMs !== undefined ? { defaultTimeoutMs } : {},
|
|
48
|
+
...name !== undefined && name !== DEFAULT_WAIT_TOOL_NAME ? { name } : {}
|
|
49
|
+
};
|
|
38
50
|
}
|
|
39
51
|
export function resolveWaitToolConfig(config, env = process.env) {
|
|
40
52
|
const configured = configuredValue(config);
|
|
41
53
|
const envDefaultTimeoutMs = environmentDefaultTimeoutMs(env[WAIT_TOOL_DEFAULT_TIMEOUT_MS_ENV]);
|
|
42
54
|
return {
|
|
43
55
|
enabled: environmentValue(env[WAIT_TOOL_ENABLED_ENV]) ?? configured.enabled ?? true,
|
|
44
|
-
...envDefaultTimeoutMs ?? configured.defaultTimeoutMs !== undefined ? { defaultTimeoutMs: envDefaultTimeoutMs ?? configured.defaultTimeoutMs } : {}
|
|
56
|
+
...envDefaultTimeoutMs ?? configured.defaultTimeoutMs !== undefined ? { defaultTimeoutMs: envDefaultTimeoutMs ?? configured.defaultTimeoutMs } : {},
|
|
57
|
+
...configured.name ? { name: configured.name } : {}
|
|
45
58
|
};
|
|
46
59
|
}
|