@duckmind/dm-darwin-x64 0.67.5 → 0.67.7
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
|
@@ -2,10 +2,10 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { discoverAgents, findBlockingAgentDiagnostic, formatAvailableAgentLines, formatUnknownAgentError, resolveAgentName, suggestAgentName, unknownAgentDiagnosticContext } from "../../agents/agents.js";
|
|
5
|
-
import { getArtifactsDir, getProjectArtifactPackagingWarning, getProjectSubagentsDir } from "../../shared/artifacts.js";
|
|
5
|
+
import { getArtifactsDir, getProjectArtifactPackagingWarning, getProjectSubagentsDir, missingForkCopyNote } from "../../shared/artifacts.js";
|
|
6
6
|
import { writeAtomicJson } from "../../shared/atomic-json.js";
|
|
7
7
|
import { createCapacityResilientJsonWriter } from "../../shared/capacity-resilient-json.js";
|
|
8
|
-
import {
|
|
8
|
+
import { reportSessionWarning } from "../../shared/session-warnings.js";
|
|
9
9
|
import { resolveEffectiveThinking, toModelInfo } from "../../shared/model-info.js";
|
|
10
10
|
import {
|
|
11
11
|
beginForegroundChild,
|
|
@@ -21,6 +21,7 @@ import { handleManagementAction } from "../../agents/agent-management.js";
|
|
|
21
21
|
import { handleRefinementAction } from "../../agents/agent-refinements.js";
|
|
22
22
|
import { buildDoctorReport } from "../../extension/doctor.js";
|
|
23
23
|
import { readSubagentGuide } from "../../extension/subagent-guide.js";
|
|
24
|
+
import { approveWorkflowChildLaunch } from "../../extension/subagent-launch-tool.js";
|
|
24
25
|
import { isWorkflowScriptPath, normalizePublicSubagentExecution, validateWorkflowCapacityOverrides } from "../../extension/public-execution.js";
|
|
25
26
|
import { readReplyWorkflowScript } from "../../extension/reply-workflow-script.js";
|
|
26
27
|
import { disabledFeatureNotice, disabledFeatureUseError, resolveDisabledFeatureSurface } from "../../shared/disabled-features.js";
|
|
@@ -29,7 +30,7 @@ import { commandAction } from "./command-action.js";
|
|
|
29
30
|
import { handleWatchdogToolAction, WATCHDOG_TOOL_ACTIONS } from "../../watchdog/tool-actions.js";
|
|
30
31
|
import { applyWatchdogLaunchRules } from "../../watchdog/rules.js";
|
|
31
32
|
import { childWatchdogProgressForModel } from "../../watchdog/child-status.js";
|
|
32
|
-
import { normalizeParentModel, resolveEffectiveSubagentModel, resolveModelOrigin, scopedModelIdsFromContext } from "../shared/model-resolution.js";
|
|
33
|
+
import { knownModelProviders, normalizeParentModel, resolveEffectiveSubagentModel, resolveModelOrigin, scopedModelIdsFromContext } from "../shared/model-resolution.js";
|
|
33
34
|
import { projectChainOutputSchemas, resolveEffectiveOutputSchema } from "../shared/child-launch-plan.js";
|
|
34
35
|
import { formatRetainedChildren, listRetainedChildren } from "../background/retained-children.js";
|
|
35
36
|
import { resolveModelScopesForAgent } from "../shared/model-scope.js";
|
|
@@ -49,12 +50,13 @@ import { isScheduledRunAction } from "../background/scheduled-runs.js";
|
|
|
49
50
|
import { encodeIndexSegment } from "../background/index-segment.js";
|
|
50
51
|
import { enqueueChainAppendRequest, readPendingChainAppendRequests, runnerStepOutputNames } from "../background/chain-append.js";
|
|
51
52
|
import { ChainOutputValidationError, validateChainOutputBindingsWithContext } from "../shared/chain-outputs.js";
|
|
52
|
-
import { acceptanceHasTypedVerify, normalizeGateAcceptance, resolveAcceptanceReportMode, TYPED_VERIFY_OUTPUT_SCHEMA_CONFLICT, validateAcceptanceInput, validateExecutionAcceptance, validateExecutionAcceptancePolicy } from "../shared/acceptance.js";
|
|
53
|
+
import { acceptanceHasTypedVerify, normalizeAcceptanceInput, normalizeGateAcceptance, resolveAcceptanceReportMode, TYPED_VERIFY_OUTPUT_SCHEMA_CONFLICT, validateAcceptanceInput, validateExecutionAcceptance, validateExecutionAcceptancePolicy } from "../shared/acceptance.js";
|
|
53
54
|
import { canPreferFork, createForkContextResolver, resolveSubagentLaunchContext } from "../../shared/fork-context.js";
|
|
54
55
|
import { createPrunedForkSessionWriter } from "../../shared/pruned-fork.js";
|
|
55
56
|
import { resolveCurrentSessionId } from "../../shared/session-identity.js";
|
|
56
57
|
import { currentCompletionOwnerId } from "../../shared/completion-owner.js";
|
|
57
58
|
import { SUBAGENT_ASYNC_COMPLETE_EVENT } from "../../shared/types.js";
|
|
59
|
+
import { resolveConfigDefaultTimeoutMs } from "../../extension/config.js";
|
|
58
60
|
import { applyIntercomBridgeToAgent, INTERCOM_BRIDGE_MARKER, resolveIntercomBridge, resolveIntercomSessionTarget, resolveSubagentIntercomTarget } from "../../intercom/intercom-bridge.js";
|
|
59
61
|
import { formatControlIntercomMessage, formatControlNoticeMessage, resolveControlConfig, shouldNotifyControlEvent } from "../shared/subagent-control.js";
|
|
60
62
|
import { formatSpawnBudget, getSpawnBudgetSnapshot, grantSpawnBudget, preflightSpawnBudget, preflightSpawnBudgetGrant, reserveSpawnBudget } from "../shared/spawn-budget.js";
|
|
@@ -107,7 +109,7 @@ import { getExternalJobProvider } from "../../api/external-job-provider.js";
|
|
|
107
109
|
import { externalJobFollowUpRequestDigest, externalJobFollowUpRequestId, externalJobFollowUpRunId, externalJobPromptDigest, externalJobStableJson } from "../shared/external-job-runner.js";
|
|
108
110
|
import { externalCliReceiptMetadata, normalizeExternalCliRunnerStatus } from "../shared/external-cli-contract.js";
|
|
109
111
|
import { formatHerdrMachineRunnerUnsupported, resolveMachinePlacement } from "../shared/herdr-machine.js";
|
|
110
|
-
import { lookupRunnerLauncher, resolveAgentRunnerLauncher } from "../shared/runner-launcher.js";
|
|
112
|
+
import { checkRequiredRunnerLauncher, lookupRunnerLauncher, REQUIRE_LAUNCHER_SHAPE_ERROR, resolveAgentRunnerLauncher } from "../shared/runner-launcher.js";
|
|
111
113
|
import { applyForceTopLevelAsyncOverride } from "../background/top-level-async.js";
|
|
112
114
|
import { handleMissionAction, MISSION_ACTIONS } from "../../missions/actions.js";
|
|
113
115
|
import { attachMissionToLaunchResult, prepareMissionLaunch, writeMissionAsyncBinding } from "../../missions/lifecycle.js";
|
|
@@ -139,7 +141,7 @@ import {
|
|
|
139
141
|
} from "../../shared/workflow-child-permit.js";
|
|
140
142
|
import { deepFreezeWorkflowArgs, normalizeWorkflowArgs, resolveStructuredWorkflowResource, resolveWorkflowResource } from "../../workflows/workflow-resources.js";
|
|
141
143
|
import { writeWorkflowLaunchRecord } from "../../workflows/workflow-launch-record.js";
|
|
142
|
-
import { stableJsonDigest } from "../../shared/launch-contract.js";
|
|
144
|
+
import { agentDefinitionDigest, stableJsonDigest } from "../../shared/launch-contract.js";
|
|
143
145
|
import {
|
|
144
146
|
cleanupWorktrees,
|
|
145
147
|
createWorktrees,
|
|
@@ -171,6 +173,7 @@ import {
|
|
|
171
173
|
} from "../../shared/types.js";
|
|
172
174
|
import { deriveChildSessionName } from "../../shared/child-session-name.js";
|
|
173
175
|
import { editDistance, hasSingleAdjacentTransposition } from "../../shared/edit-distance.js";
|
|
176
|
+
import { waitToolName } from "../../shared/wait-tool-name.js";
|
|
174
177
|
const MUTATING_MANAGEMENT_ACTIONS = new Set(["command.yield", "command.cancel", "create", "update", "delete", "eject", "disable", "enable", "reset", "grant-spawn-budget", "watchdog.configure", "mission.create", "mission.update", "mission.resolve-decision", "mission.attach-run", "mission.close", "inspector.open", "inspector.close", "project.open", "project.close", "worktree.discard", "worktree.cleanup", "lane.recordMerge", "lane.recordSupersession", "refine", "refine.rollback", "dismiss", "schedule.create", "schedule.pause", "schedule.resume", "schedule.run", "schedule.run-due", "schedule.delete"]);
|
|
175
178
|
const DESTRUCTIVE_MANAGEMENT_ACTIONS = new Set(["command.cancel", "delete", "eject", "disable", "reset", "mission.close", "worktree.discard", "refine.rollback", "inspector.close", "project.close", "stop", "interrupt", "schedule.delete"]);
|
|
176
179
|
function resolveSteerDeliveryMode(mode) {
|
|
@@ -227,6 +230,38 @@ function inheritedRunFanoutBudget(deps) {
|
|
|
227
230
|
function resolveRequestedCwd(runtimeCwd, requestedCwd) {
|
|
228
231
|
return requestedCwd ? path.resolve(runtimeCwd, requestedCwd) : runtimeCwd;
|
|
229
232
|
}
|
|
233
|
+
function workflowChildLaunchArgs(workflowRunId, key, request, scriptAgent, ctxCwd, discoverAgents) {
|
|
234
|
+
const resume = request.action === "resume" && typeof request.id === "string" ? request.id : undefined;
|
|
235
|
+
const agent = request.agent ?? scriptAgent;
|
|
236
|
+
const task = resume !== undefined ? request.message : request.task;
|
|
237
|
+
const scope = resolveExecutionAgentScope(request.agentScope);
|
|
238
|
+
const findAgent = (dir) => typeof agent === "string" ? resolveAgentName(agent, discoverAgents(dir, scope).agents).agent : undefined;
|
|
239
|
+
const ctxAgent = request.machine === undefined ? findAgent(ctxCwd) : undefined;
|
|
240
|
+
const placed = request.machine !== undefined || ctxAgent?.machine !== undefined;
|
|
241
|
+
const runCwd = resolveRequestedCwd(ctxCwd, request.cwd);
|
|
242
|
+
const cwd = resume === undefined && !placed ? runCwd : undefined;
|
|
243
|
+
const acceptanceInput = request.acceptance !== undefined || resume !== undefined ? request.acceptance : (placed || runCwd === ctxCwd ? ctxAgent ?? findAgent(ctxCwd) : findAgent(runCwd))?.defaultAcceptance;
|
|
244
|
+
const acceptance = acceptanceInput !== undefined && validateAcceptanceInput(acceptanceInput).length === 0 ? normalizeAcceptanceInput(acceptanceInput) : undefined;
|
|
245
|
+
const commands = acceptance?.level === "verified" ? (acceptance.verify ?? []).map((verify) => ({
|
|
246
|
+
command: verify.command,
|
|
247
|
+
...cwd !== undefined ? { cwd: verify.cwd ? path.resolve(cwd, verify.cwd) : cwd } : {},
|
|
248
|
+
...verify.env !== undefined ? { env: verify.env } : {}
|
|
249
|
+
})) : [];
|
|
250
|
+
const output = resolveSingleOutputPath(request.output, ctxCwd);
|
|
251
|
+
return {
|
|
252
|
+
workflowRunId,
|
|
253
|
+
key,
|
|
254
|
+
...typeof agent === "string" ? { agent } : {},
|
|
255
|
+
...typeof task === "string" ? { task } : {},
|
|
256
|
+
...cwd !== undefined ? { cwd } : {},
|
|
257
|
+
...typeof request.model === "string" ? { model: request.model } : {},
|
|
258
|
+
...typeof request.async === "boolean" ? { async: request.async } : {},
|
|
259
|
+
...typeof request.worktree === "boolean" ? { worktree: request.worktree } : {},
|
|
260
|
+
...resume !== undefined ? { resume } : {},
|
|
261
|
+
...commands.length > 0 ? { commands } : {},
|
|
262
|
+
...output !== undefined ? { output } : {}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
230
265
|
function readWorkflowScriptFile(requestedPath, requestedCwd, runtimeCwd) {
|
|
231
266
|
const scriptPath = path.resolve(resolveRequestedCwd(runtimeCwd, requestedCwd), requestedPath);
|
|
232
267
|
let script;
|
|
@@ -673,7 +708,7 @@ function resolveForegroundResumeTarget(params, state, options = {}) {
|
|
|
673
708
|
throw new Error(`Ambiguous foreground run id prefix '${requested}' matched: ${matches.map((run) => run.runId).join(", ")}. Provide a longer id.`);
|
|
674
709
|
const run = matches[0];
|
|
675
710
|
if (run.children.some((child) => child.status === "detached"))
|
|
676
|
-
throw new Error(`Foreground run '${run.runId}' is detached for intercom coordination and cannot be revived safely while any child may still be live. Reply to the supervisor request first, then wait with
|
|
711
|
+
throw new Error(`Foreground run '${run.runId}' is detached for intercom coordination and cannot be revived safely while any child may still be live. Reply to the supervisor request first, then wait with ${waitToolName()}({ id: "${run.runId}" }); use status to recover the result and do not launch a replacement while it remains detached.`);
|
|
677
712
|
if (run.children.length > 1 && params.index === undefined)
|
|
678
713
|
throw new Error(`Foreground run '${run.runId}' has ${run.children.length} children. Provide index to choose one.`);
|
|
679
714
|
const index = params.index ?? 0;
|
|
@@ -688,7 +723,7 @@ function resolveForegroundResumeTarget(params, state, options = {}) {
|
|
|
688
723
|
throw new Error(`Foreground run '${run.runId}' child ${index} session file must be a .jsonl file: ${child.sessionFile}`);
|
|
689
724
|
const sessionFile = path.resolve(child.sessionFile);
|
|
690
725
|
if (!fs.existsSync(sessionFile))
|
|
691
|
-
throw new Error(`Foreground run '${run.runId}' child ${index} session file does not exist: ${child.sessionFile}`);
|
|
726
|
+
throw new Error(`Foreground run '${run.runId}' child ${index} session file does not exist: ${child.sessionFile}${missingForkCopyNote(sessionFile)}`);
|
|
692
727
|
return {
|
|
693
728
|
runId: run.runId,
|
|
694
729
|
mode: run.mode,
|
|
@@ -844,9 +879,7 @@ function persistAsyncWorkflowControlEvent(input) {
|
|
|
844
879
|
fs.appendFileSync(path.join(input.job.asyncDir, "events.jsonl"), `${JSON.stringify(record)}
|
|
845
880
|
`, "utf-8");
|
|
846
881
|
} catch (error) {
|
|
847
|
-
|
|
848
|
-
throw error;
|
|
849
|
-
console.error("Failed to append async workflow control event while storage is full:", error);
|
|
882
|
+
reportSessionWarning(input.state, `Failed to record a control event for workflow ${input.job.asyncId}: ${error instanceof Error ? error.message : String(error)}`, "async-workflow-control-event");
|
|
850
883
|
}
|
|
851
884
|
}
|
|
852
885
|
function emitControlNotification(input) {
|
|
@@ -1061,8 +1094,10 @@ function appendStepToAsyncChain(input) {
|
|
|
1061
1094
|
parentSessionId: input.ctx.sessionManager.getSessionId() ?? undefined,
|
|
1062
1095
|
parentSessionFile: input.ctx.sessionManager.getSessionFile() ?? undefined,
|
|
1063
1096
|
currentModelProvider: parentModel?.provider,
|
|
1097
|
+
parentProviderRegistry: input.ctx.modelRegistry,
|
|
1064
1098
|
currentModel: parentModel,
|
|
1065
1099
|
scopedModelIds: scopedModelIdsFromContext(input.ctx),
|
|
1100
|
+
knownProviders: knownModelProviders(input.ctx.modelRegistry),
|
|
1066
1101
|
modelScope: discoveredForAppend.modelScope,
|
|
1067
1102
|
modelResponseAliases: input.deps.config.modelResponseAliases,
|
|
1068
1103
|
interactive: input.ctx.hasUI,
|
|
@@ -1186,7 +1221,7 @@ function validateNestedSessionFile(run, trustedSessionRoots, resolveSource, visi
|
|
|
1186
1221
|
if (!path.isAbsolute(sessionFile))
|
|
1187
1222
|
throw new Error(`Nested run '${run.id}' session file must be absolute: ${sessionFile}`);
|
|
1188
1223
|
if (!fs.existsSync(resolved))
|
|
1189
|
-
throw new Error(`Nested run '${run.id}' session file does not exist: ${sessionFile}`);
|
|
1224
|
+
throw new Error(`Nested run '${run.id}' session file does not exist: ${sessionFile}${missingForkCopyNote(resolved)}`);
|
|
1190
1225
|
const stat = fs.lstatSync(resolved);
|
|
1191
1226
|
if (!stat.isFile() || stat.isSymbolicLink())
|
|
1192
1227
|
throw new Error(`Nested run '${run.id}' session file is not a regular file: ${sessionFile}`);
|
|
@@ -1213,8 +1248,8 @@ function validateNestedSessionFile(run, trustedSessionRoots, resolveSource, visi
|
|
|
1213
1248
|
}
|
|
1214
1249
|
return realSessionFile;
|
|
1215
1250
|
}
|
|
1216
|
-
export function readNestedRecoveryDescriptor(
|
|
1217
|
-
const recoveryDescriptor = readAsyncRecoveryDescriptor(
|
|
1251
|
+
export function readNestedRecoveryDescriptor(rootRunId, runId, agent) {
|
|
1252
|
+
const recoveryDescriptor = readAsyncRecoveryDescriptor(nestedRunScope(rootRunId).asyncDirRoot, runId);
|
|
1218
1253
|
if (!recoveryDescriptor)
|
|
1219
1254
|
return;
|
|
1220
1255
|
if (recoveryDescriptor.sourceRunId !== runId)
|
|
@@ -1234,7 +1269,7 @@ function resolveNestedResumeTarget(match, trustedSessionRoots, resolveSource) {
|
|
|
1234
1269
|
throw new Error(`Could not determine child agent for nested run '${run.id}'.`);
|
|
1235
1270
|
const state = run.state === "complete" || run.state === "failed" || run.state === "paused" ? run.state : "failed";
|
|
1236
1271
|
const asyncDir = resolveNestedAsyncDir(match.match.rootRunId, run);
|
|
1237
|
-
const recoveryDescriptor = readNestedRecoveryDescriptor(
|
|
1272
|
+
const recoveryDescriptor = asyncDir ? readNestedRecoveryDescriptor(match.match.rootRunId, run.id, agent) : undefined;
|
|
1238
1273
|
return compactOptional({
|
|
1239
1274
|
kind: "revive",
|
|
1240
1275
|
source: "nested",
|
|
@@ -1515,8 +1550,10 @@ async function resumeExternalJobFollowUp(input) {
|
|
|
1515
1550
|
parentSessionId: input.ctx.sessionManager.getSessionId() ?? undefined,
|
|
1516
1551
|
parentSessionFile: input.ctx.sessionManager.getSessionFile() ?? undefined,
|
|
1517
1552
|
currentModelProvider: parentModel?.provider,
|
|
1553
|
+
parentProviderRegistry: input.ctx.modelRegistry,
|
|
1518
1554
|
currentModel: parentModel,
|
|
1519
1555
|
scopedModelIds: scopedModelIdsFromContext(input.ctx),
|
|
1556
|
+
knownProviders: knownModelProviders(input.ctx.modelRegistry),
|
|
1520
1557
|
modelScope: input.modelScope,
|
|
1521
1558
|
modelResponseAliases: input.deps.config.modelResponseAliases,
|
|
1522
1559
|
interactive: input.ctx.hasUI,
|
|
@@ -1691,6 +1728,16 @@ async function resumeAsyncRun(input) {
|
|
|
1691
1728
|
details: { mode: "management", results: [] }
|
|
1692
1729
|
};
|
|
1693
1730
|
}
|
|
1731
|
+
const requiredLauncher = recoveryDescriptor?.requiredLauncher;
|
|
1732
|
+
if (requiredLauncher) {
|
|
1733
|
+
const refuse = (text) => ({ content: [{ type: "text", text }], isError: true, details: { mode: "management", results: [] } });
|
|
1734
|
+
if (attachChain)
|
|
1735
|
+
return refuse(`Cannot attach a chain to run '${target.runId}': it was launched with requireLauncher, and appended steps would run inside its runner unchecked.`);
|
|
1736
|
+
const currentDigest = discoveredAgentConfig ? agentDefinitionDigest(discoveredAgentConfig) : undefined;
|
|
1737
|
+
const now = !discoveredAgentConfig ? "is missing" : recoveryDescriptor.launcher !== requiredLauncher.name || discoveredAgentConfig.launcher !== requiredLauncher.name ? `uses launcher '${discoveredAgentConfig.launcher ?? "none"}'` : currentDigest !== requiredLauncher.definitionDigest ? `has digest ${currentDigest}` : undefined;
|
|
1738
|
+
if (now)
|
|
1739
|
+
return refuse(`Cannot resume: run '${target.runId}' was launched requiring launcher '${requiredLauncher.name}' and agent definition ${requiredLauncher.definitionDigest}; agent '${target.agent}' now ${now}.`);
|
|
1740
|
+
}
|
|
1694
1741
|
if (target.source === "async" && target.runner?.type === "external-cli") {
|
|
1695
1742
|
const runner = normalizeExternalCliRunnerStatus(target.runner);
|
|
1696
1743
|
const message = runner ? `External adapter '${runner.adapter.id}' cannot resume: ${runner.nonResumableReason}` : "External runners do not persist DM sessions and cannot be resumed.";
|
|
@@ -1699,7 +1746,7 @@ async function resumeAsyncRun(input) {
|
|
|
1699
1746
|
if (input.params.baseRef !== undefined && "managedWorktree" in target && target.managedWorktree === true) {
|
|
1700
1747
|
return { content: [{ type: "text", text: "Cannot resume with baseRef: retained managed-worktree children continue in their existing worktree. Start a new worktree run from that base ref instead." }], isError: true, details: { mode: "management", results: [] } };
|
|
1701
1748
|
}
|
|
1702
|
-
if (target.source === "async" && target.managedWorktree && target.asyncDir) {
|
|
1749
|
+
if (target.source === "async" && target.managedWorktree && target.asyncDir && fs.existsSync(parallelHandoffPath(target.asyncDir))) {
|
|
1703
1750
|
try {
|
|
1704
1751
|
const protectedCwd = await protectRetainedWorktreeForResume(parallelHandoffPath(target.asyncDir), target.runId, target.index, input.signal);
|
|
1705
1752
|
if (path.resolve(protectedCwd) !== path.resolve(effectiveCwd))
|
|
@@ -1794,8 +1841,10 @@ async function resumeAsyncRun(input) {
|
|
|
1794
1841
|
parentSessionId: input.ctx.sessionManager.getSessionId() ?? undefined,
|
|
1795
1842
|
parentSessionFile: input.ctx.sessionManager.getSessionFile() ?? undefined,
|
|
1796
1843
|
currentModelProvider: parentModel?.provider,
|
|
1844
|
+
parentProviderRegistry: input.ctx.modelRegistry,
|
|
1797
1845
|
currentModel: parentModel,
|
|
1798
1846
|
scopedModelIds: scopedModelIdsFromContext(input.ctx),
|
|
1847
|
+
knownProviders: knownModelProviders(input.ctx.modelRegistry),
|
|
1799
1848
|
modelScope,
|
|
1800
1849
|
modelResponseAliases: input.deps.config.modelResponseAliases,
|
|
1801
1850
|
runnerLaunchers: input.deps.config.runnerLaunchers,
|
|
@@ -1865,7 +1914,7 @@ async function resumeAsyncRun(input) {
|
|
|
1865
1914
|
if (target.source === "nested" && !target.recoveryDescriptor) {
|
|
1866
1915
|
return { content: [{ type: "text", text: `Nested child '${target.runId}' is missing its required recovery identity. Start a new run instead.` }], isError: true, details: { mode: "management", results: [] } };
|
|
1867
1916
|
}
|
|
1868
|
-
const recoveryAgentConfig = recoveryDescriptor ? applySteeringRecoveryAgentConfig(baseAgentConfig, recoveryDescriptor) :
|
|
1917
|
+
const recoveryAgentConfig = recoveryDescriptor ? applySteeringRecoveryAgentConfig(baseAgentConfig, recoveryDescriptor) : baseAgentConfig;
|
|
1869
1918
|
const agentConfig = intercomBridge.active ? applyIntercomBridgeToAgent(recoveryAgentConfig, intercomBridge) : recoveryAgentConfig;
|
|
1870
1919
|
const foregroundContract = target.source === "foreground" ? target.resumeContract : undefined;
|
|
1871
1920
|
const outputSchema = Object.hasOwn(input.params, "outputSchema") ? input.params.outputSchema : Object.hasOwn(foregroundContract ?? {}, "outputSchema") ? foregroundContract?.outputSchema : recoveryDescriptor?.structuredOutputSchema;
|
|
@@ -1875,7 +1924,7 @@ async function resumeAsyncRun(input) {
|
|
|
1875
1924
|
return { content: [{ type: "text", text: `Cannot resume: ${acceptanceErrors.join(" ")}` }], isError: true, details: { mode: "management", results: [] } };
|
|
1876
1925
|
}
|
|
1877
1926
|
if (agentConfig.launcher !== undefined && !lookupRunnerLauncher(input.deps.config.runnerLaunchers, agentConfig.launcher)) {
|
|
1878
|
-
return { content: [{ type: "text", text: `Cannot resume: run '${target.runId}'
|
|
1927
|
+
return { content: [{ type: "text", text: `Cannot resume: run '${target.runId}' uses launcher '${agentConfig.launcher}', which is no longer defined in runnerLaunchers in the user subagent config.` }], isError: true, details: { mode: "management", results: [] } };
|
|
1879
1928
|
}
|
|
1880
1929
|
const runId = randomUUID();
|
|
1881
1930
|
const topLevelResume = depth === 0 && !inheritedNestedRoute(input.deps) && !input.params.workflowParentRunId;
|
|
@@ -1914,6 +1963,7 @@ async function resumeAsyncRun(input) {
|
|
|
1914
1963
|
goal: effectiveFollowUp,
|
|
1915
1964
|
agentConfig,
|
|
1916
1965
|
recoveryAgentConfig,
|
|
1966
|
+
carriedRequiredLauncher: recoveryDescriptor?.requiredLauncher,
|
|
1917
1967
|
ctx: compactOptional({
|
|
1918
1968
|
dm: input.deps.dm,
|
|
1919
1969
|
cwd: input.requestCwd,
|
|
@@ -1921,8 +1971,10 @@ async function resumeAsyncRun(input) {
|
|
|
1921
1971
|
parentSessionId: input.ctx.sessionManager.getSessionId() ?? undefined,
|
|
1922
1972
|
parentSessionFile: input.ctx.sessionManager.getSessionFile() ?? undefined,
|
|
1923
1973
|
currentModelProvider: parentModel?.provider,
|
|
1974
|
+
parentProviderRegistry: input.ctx.modelRegistry,
|
|
1924
1975
|
currentModel: parentModel,
|
|
1925
1976
|
scopedModelIds: scopedModelIdsFromContext(input.ctx),
|
|
1977
|
+
knownProviders: knownModelProviders(input.ctx.modelRegistry),
|
|
1926
1978
|
modelScope,
|
|
1927
1979
|
modelResponseAliases: recoveryDescriptor ? recoveryDescriptor.modelResponseAliases : foregroundContract?.modelResponseAliases,
|
|
1928
1980
|
runnerLaunchers: input.deps.config.runnerLaunchers,
|
|
@@ -2095,6 +2147,7 @@ function createForegroundControlNotifier(data, deps) {
|
|
|
2095
2147
|
const enriched = workflowKey && !event.workflowKey ? { ...event, workflowKey } : event;
|
|
2096
2148
|
if (asyncWorkflow) {
|
|
2097
2149
|
persistAsyncWorkflowControlEvent({
|
|
2150
|
+
state: deps.state,
|
|
2098
2151
|
job: asyncWorkflow,
|
|
2099
2152
|
event: enriched,
|
|
2100
2153
|
controlConfig: data.controlConfig,
|
|
@@ -2587,11 +2640,6 @@ const MAX_TIMER_DELAY_MS = 2147483647;
|
|
|
2587
2640
|
function timerDelayOverflowError(name, value) {
|
|
2588
2641
|
return typeof value === "number" && value > MAX_TIMER_DELAY_MS ? `${name} must be a positive integer no larger than ${MAX_TIMER_DELAY_MS}.` : undefined;
|
|
2589
2642
|
}
|
|
2590
|
-
export function resolveConfigDefaultTimeoutMs(raw) {
|
|
2591
|
-
if (typeof raw !== "number" || !Number.isInteger(raw) || raw <= 0 || raw > MAX_TIMER_DELAY_MS)
|
|
2592
|
-
return;
|
|
2593
|
-
return raw;
|
|
2594
|
-
}
|
|
2595
2643
|
export function resolveForegroundTimeout(params, defaultTimeoutMs) {
|
|
2596
2644
|
const rawTimeout = params.timeoutMs;
|
|
2597
2645
|
const rawMaxRuntime = params.maxRuntimeMs;
|
|
@@ -2734,7 +2782,7 @@ function resolveStaticLaunchSummary(input) {
|
|
|
2734
2782
|
const agentConfig = input.agents.find((agent) => agent.name === input.agent);
|
|
2735
2783
|
const externalRunner = agentConfig?.runner?.type === "external-cli" || agentConfig?.runner?.type === "external-job";
|
|
2736
2784
|
const modelScopes = resolveModelScopesForAgent(input.modelScope, input.agent, input.parentModel, input.scopedModelIds);
|
|
2737
|
-
const model = externalRunner ? undefined : resolveEffectiveSubagentModel(input.explicitModel, agentConfig?.model, input.parentModel, input.availableModels, agentConfig?.modelProvider ?? input.currentProvider,
|
|
2785
|
+
const model = externalRunner ? undefined : resolveEffectiveSubagentModel(input.explicitModel, agentConfig?.model, input.parentModel, input.availableModels, agentConfig?.modelProvider ?? input.currentProvider, { scope: modelScopes, knownProviders: input.knownProviders });
|
|
2738
2786
|
const thinkingOverride = externalRunner ? undefined : input.thinkingOverrideForTask();
|
|
2739
2787
|
const thinking = externalRunner ? undefined : resolveEffectiveThinking(model, thinkingOverride ?? agentConfig?.thinking);
|
|
2740
2788
|
return {
|
|
@@ -2752,6 +2800,7 @@ function collectStaticLaunchSummaries(input) {
|
|
|
2752
2800
|
parentModel: input.parentModel,
|
|
2753
2801
|
scopedModelIds: input.scopedModelIds,
|
|
2754
2802
|
availableModels: input.availableModels,
|
|
2803
|
+
knownProviders: input.knownProviders,
|
|
2755
2804
|
currentProvider: input.currentProvider,
|
|
2756
2805
|
modelScope: input.modelScope,
|
|
2757
2806
|
thinkingOverrideForTask: input.thinkingOverrideForTask
|
|
@@ -3036,8 +3085,10 @@ async function runAsyncPath(data, deps) {
|
|
|
3036
3085
|
parentSessionId: data.parentPiSessionId,
|
|
3037
3086
|
parentSessionFile: ctx.sessionManager.getSessionFile() ?? undefined,
|
|
3038
3087
|
currentModelProvider: parentModel?.provider,
|
|
3088
|
+
parentProviderRegistry: ctx.modelRegistry,
|
|
3039
3089
|
currentModel: parentModel,
|
|
3040
3090
|
scopedModelIds: data.scopedModelIds,
|
|
3091
|
+
knownProviders: knownModelProviders(ctx.modelRegistry),
|
|
3041
3092
|
modelScope: data.modelScope,
|
|
3042
3093
|
modelResponseAliases: deps.config.modelResponseAliases,
|
|
3043
3094
|
runnerLaunchers: deps.config.runnerLaunchers,
|
|
@@ -3078,8 +3129,9 @@ async function runAsyncPath(data, deps) {
|
|
|
3078
3129
|
parentModel
|
|
3079
3130
|
});
|
|
3080
3131
|
const modelOverride = a.runner?.type === "external-cli" || a.runner?.type === "external-job" ? params.model ?? (externalRunnerWithoutExplicitModel ? undefined : a.model) : resolveEffectiveSubagentModel(params.model, a.model, parentModel, availableModels, a.modelProvider ?? currentProvider, {
|
|
3081
|
-
|
|
3082
|
-
source: modelOrigin === "explicit" ? "explicit" : "inherited"
|
|
3132
|
+
scope: modelScopes,
|
|
3133
|
+
source: modelOrigin === "explicit" ? "explicit" : "inherited",
|
|
3134
|
+
knownProviders: asyncCtx.knownProviders
|
|
3083
3135
|
});
|
|
3084
3136
|
const modelOverrideFromParent = modelOrigin === "inherited";
|
|
3085
3137
|
const launchRuleError = applyWatchdogLaunchRules({ cwd: effectiveCwd, agent: a.name, model: modelOverride ?? (parentModel && `${parentModel.provider}/${parentModel.id}`), warn: (violation) => deps.watchdog?.displayRuleWarning(violation) });
|
|
@@ -3099,6 +3151,7 @@ async function runAsyncPath(data, deps) {
|
|
|
3099
3151
|
requestedCwd: data.requestedCwd,
|
|
3100
3152
|
machine: params.machine,
|
|
3101
3153
|
machineCwd: params.machineCwd,
|
|
3154
|
+
requireLauncher: params.requireLauncher,
|
|
3102
3155
|
maxOutput: params.maxOutput,
|
|
3103
3156
|
artifactsDir: artifactConfig.enabled ? artifactsDir : undefined,
|
|
3104
3157
|
artifactConfig,
|
|
@@ -3232,6 +3285,17 @@ function writeWorkflowAggregateOutput(outputPath, text, producedChildOutputPaths
|
|
|
3232
3285
|
${error instanceof Error ? error.message : String(error)}`;
|
|
3233
3286
|
}
|
|
3234
3287
|
}
|
|
3288
|
+
function removeEarlierWorkflowOutput(outputPath) {
|
|
3289
|
+
if (!outputPath)
|
|
3290
|
+
return;
|
|
3291
|
+
try {
|
|
3292
|
+
fs.rmSync(outputPath, { force: true });
|
|
3293
|
+
return;
|
|
3294
|
+
} catch (error) {
|
|
3295
|
+
return `Output file error: ${outputPath}
|
|
3296
|
+
${error instanceof Error ? error.message : String(error)}`;
|
|
3297
|
+
}
|
|
3298
|
+
}
|
|
3235
3299
|
function appendWorkflowOutputWarning(text, warning) {
|
|
3236
3300
|
return warning ? `${text}
|
|
3237
3301
|
|
|
@@ -3524,6 +3588,7 @@ async function runSinglePath(data, deps) {
|
|
|
3524
3588
|
const parentModel = data.parentModel;
|
|
3525
3589
|
const currentProvider = parentModel?.provider;
|
|
3526
3590
|
const availableModels = ctx.modelRegistry.getAvailable().map(toModelInfo);
|
|
3591
|
+
const knownProviders = knownModelProviders(ctx.modelRegistry);
|
|
3527
3592
|
const modelScopes = resolveModelScopesForAgent(data.modelScope, agentConfig.name, parentModel, data.scopedModelIds);
|
|
3528
3593
|
let task = typeof params.task === "string" ? params.task : "";
|
|
3529
3594
|
const modelOrigin = resolveModelOrigin({
|
|
@@ -3533,8 +3598,9 @@ async function runSinglePath(data, deps) {
|
|
|
3533
3598
|
parentModel
|
|
3534
3599
|
});
|
|
3535
3600
|
let modelOverride = resolveEffectiveSubagentModel(params.model, agentConfig.model, parentModel, availableModels, agentConfig.modelProvider ?? currentProvider, {
|
|
3536
|
-
|
|
3537
|
-
source: modelOrigin === "explicit" ? "explicit" : "inherited"
|
|
3601
|
+
scope: modelScopes,
|
|
3602
|
+
source: modelOrigin === "explicit" ? "explicit" : "inherited",
|
|
3603
|
+
knownProviders
|
|
3538
3604
|
});
|
|
3539
3605
|
const modelOverrideFromParent = modelOrigin === "inherited";
|
|
3540
3606
|
const launchRuleError = applyWatchdogLaunchRules({ cwd: effectiveCwd, agent: agentConfig.name, model: modelOverride ?? (parentModel && `${parentModel.provider}/${parentModel.id}`), warn: (violation) => deps.watchdog?.displayRuleWarning(violation) });
|
|
@@ -3622,7 +3688,7 @@ async function runSinglePath(data, deps) {
|
|
|
3622
3688
|
|
|
3623
3689
|
` : "";
|
|
3624
3690
|
task = readsInstruction + task;
|
|
3625
|
-
task = injectSingleOutputInstruction(task, outputPath, agentConfig);
|
|
3691
|
+
task = injectSingleOutputInstruction(task, outputPath, agentConfig, foregroundMachine);
|
|
3626
3692
|
let effectiveSkills;
|
|
3627
3693
|
if (skillOverride === false) {
|
|
3628
3694
|
effectiveSkills = [];
|
|
@@ -3775,6 +3841,7 @@ async function runSinglePath(data, deps) {
|
|
|
3775
3841
|
suppressUnchangedDelegationUpdates,
|
|
3776
3842
|
controlConfig,
|
|
3777
3843
|
onControlEvent,
|
|
3844
|
+
onWarning: (message, key) => reportSessionWarning(deps.state, message, key),
|
|
3778
3845
|
intercomSessionName: childIntercomTarget,
|
|
3779
3846
|
orchestratorIntercomTarget: childBridgeActive ? data.intercomBridge.orchestratorTarget : undefined,
|
|
3780
3847
|
nestedRoute: foregroundControl?.nestedRoute,
|
|
@@ -3787,6 +3854,7 @@ async function runSinglePath(data, deps) {
|
|
|
3787
3854
|
thinkingCeiling: agentConfig.maxThinking,
|
|
3788
3855
|
extensionBindings: params.extensionBindings,
|
|
3789
3856
|
availableModels,
|
|
3857
|
+
knownProviders,
|
|
3790
3858
|
modelResponseAliases,
|
|
3791
3859
|
preferredModelProvider: currentProvider,
|
|
3792
3860
|
modelScope: modelScopes,
|
|
@@ -3951,8 +4019,8 @@ async function runSinglePath(data, deps) {
|
|
|
3951
4019
|
${worktreeHandoff.suffix}` : "";
|
|
3952
4020
|
if (r.detached) {
|
|
3953
4021
|
const statusRecovery = `subagent({ action: "status", id: "${runId}" }) to recover the result; do not resume or launch a replacement while it remains detached.`;
|
|
3954
|
-
const blockingRecovery =
|
|
3955
|
-
const message = r.detachedReason === "intercom coordination" ? `Detached for intercom coordination: ${params.agent}. Reply to the supervisor request first, then wait with ${blockingRecovery}` : r.detachedReason === "user request" ? `Detached at user request: ${params.agent}. The child continues independently. Register a completion wake-up with
|
|
4022
|
+
const blockingRecovery = `${waitToolName()}({ id: "${runId}" }). Use ${statusRecovery}`;
|
|
4023
|
+
const message = r.detachedReason === "intercom coordination" ? `Detached for intercom coordination: ${params.agent}. Reply to the supervisor request first, then wait with ${blockingRecovery}` : r.detachedReason === "user request" ? `Detached at user request: ${params.agent}. The child continues independently. Register a completion wake-up with ${waitToolName()}({ id: "${runId}", nonBlocking: true }), or use ${statusRecovery}` : `Detached before task completion: ${params.agent}. Wait with ${blockingRecovery}`;
|
|
3956
4024
|
return {
|
|
3957
4025
|
content: [{ type: "text", text: `${message}${worktreeSuffix}` }],
|
|
3958
4026
|
details
|
|
@@ -4375,6 +4443,8 @@ export async function preflightWorkflowWorktrees(input) {
|
|
|
4375
4443
|
input.signal.throwIfAborted();
|
|
4376
4444
|
}
|
|
4377
4445
|
export function prepareWorkflowLaunchParams(workflowDefaults, childParams, parentWorkflowRunId, workflowKey, options = {}) {
|
|
4446
|
+
if (childParams.requireLauncher !== undefined || workflowDefaults.requireLauncher !== undefined)
|
|
4447
|
+
throw new Error(REQUIRE_LAUNCHER_SHAPE_ERROR);
|
|
4378
4448
|
const { globalConcurrencyLimit: _globalConcurrencyLimit, maxSubagentSpawnsPerRun: _maxSubagentSpawnsPerRun, ...workflowDefaultsWithoutCapacity } = workflowDefaults;
|
|
4379
4449
|
const { globalConcurrencyLimit: _childGlobalConcurrencyLimit, maxSubagentSpawnsPerRun: _childMaxSubagentSpawnsPerRun, ...childParamsWithoutCapacity } = childParams;
|
|
4380
4450
|
workflowDefaults = workflowDefaultsWithoutCapacity;
|
|
@@ -4642,10 +4712,11 @@ function savedWorkflowLaunchParams(params) {
|
|
|
4642
4712
|
const { reuseFrom: _reuseFrom, scheduleOrigin: _scheduleOrigin, resumeOrigin: _resumeOrigin, ...saved } = params;
|
|
4643
4713
|
return saved;
|
|
4644
4714
|
}
|
|
4645
|
-
function workflowLaunchRecord(launch, cwd, scriptDigest) {
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4715
|
+
function workflowLaunchRecord(launch, cwd, scriptDigest, sessionId, ceiling) {
|
|
4716
|
+
const owner = { version: 2, scriptDigest, sessionId, ...ceiling ? { admissionCapabilityCeiling: ceiling } : {} };
|
|
4717
|
+
if (launch.source === "structured" || launch.source === "internal")
|
|
4718
|
+
return { ...owner, source: launch.source };
|
|
4719
|
+
return { ...owner, source: launch.source, params: { ...launch.params, cwd } };
|
|
4649
4720
|
}
|
|
4650
4721
|
export function createSubagentExecutor(deps) {
|
|
4651
4722
|
const executorDeps = deps;
|
|
@@ -4679,7 +4750,7 @@ export function createSubagentExecutor(deps) {
|
|
|
4679
4750
|
pendingReuseClaimReleases.delete(args[1]);
|
|
4680
4751
|
releaseReuseClaim?.();
|
|
4681
4752
|
});
|
|
4682
|
-
const executeRequest = async (_id, params, signal, onUpdate, ctx, preserveActiveSession = false, parentModelOverride) => {
|
|
4753
|
+
const executeRequest = async (_id, params, signal, onUpdate, ctx, preserveActiveSession = false, parentModelOverride, approval) => {
|
|
4683
4754
|
const projectScopeError = projectScopeTrustError(params, ctx);
|
|
4684
4755
|
if (projectScopeError)
|
|
4685
4756
|
return projectScopeError;
|
|
@@ -4937,8 +5008,8 @@ export function createSubagentExecutor(deps) {
|
|
|
4937
5008
|
try {
|
|
4938
5009
|
fs.mkdirSync(asyncDir, { recursive: true });
|
|
4939
5010
|
writeRunFanoutBudgetDescriptor(asyncDir, workflowFanoutBudget);
|
|
4940
|
-
if (topLevelAsyncWorkflow
|
|
4941
|
-
writeWorkflowLaunchRecord(
|
|
5011
|
+
if (topLevelAsyncWorkflow)
|
|
5012
|
+
writeWorkflowLaunchRecord(DIRS.async, workflowRunId, workflowLaunchRecord(publicWorkflowLaunch ?? { source: "internal" }, workflowCwd, workflowScriptSourceDigest, currentSessionId, workflowCapabilityCeiling));
|
|
4942
5013
|
fs.mkdirSync(DIRS.results, { recursive: true });
|
|
4943
5014
|
} catch (error) {
|
|
4944
5015
|
return storageFailure(error);
|
|
@@ -4946,6 +5017,7 @@ export function createSubagentExecutor(deps) {
|
|
|
4946
5017
|
const controller = new AbortController;
|
|
4947
5018
|
deps.state.workflowControllers ??= new Map;
|
|
4948
5019
|
deps.state.workflowChildStops ??= new Map;
|
|
5020
|
+
deps.state.workflowDrains ??= new Map;
|
|
4949
5021
|
deps.state.workflowControllers.set(workflowRunId, controller);
|
|
4950
5022
|
workflowCapacity?.markWorkflowStarted();
|
|
4951
5023
|
if (workflowCapacity)
|
|
@@ -5311,7 +5383,15 @@ Parent action: ${STATUS_ACTION}`,
|
|
|
5311
5383
|
}
|
|
5312
5384
|
persist();
|
|
5313
5385
|
};
|
|
5314
|
-
|
|
5386
|
+
const ownsApprovalCall = approval !== undefined;
|
|
5387
|
+
const abortWorkflow = () => controller.abort(signal?.reason);
|
|
5388
|
+
if (ownsApprovalCall) {
|
|
5389
|
+
if (signal?.aborted)
|
|
5390
|
+
abortWorkflow();
|
|
5391
|
+
else
|
|
5392
|
+
signal?.addEventListener("abort", abortWorkflow, { once: true });
|
|
5393
|
+
}
|
|
5394
|
+
const workflowTask = Promise.resolve().then(async () => {
|
|
5315
5395
|
const workflowDeadlineAt = timeout === undefined ? undefined : Date.now() + timeout;
|
|
5316
5396
|
const workflowResults = [];
|
|
5317
5397
|
const workflowChildRunIds = new Map;
|
|
@@ -5490,6 +5570,7 @@ Parent action: ${STATUS_ACTION}`,
|
|
|
5490
5570
|
step.async = runId !== undefined && path.basename(runId) === runId && fs.existsSync(path.join(path.dirname(asyncDir), runId));
|
|
5491
5571
|
persist({ tolerateStatusWriteFailure: true });
|
|
5492
5572
|
};
|
|
5573
|
+
const earlierOutputWarning = workflowReuseSource ? undefined : removeEarlierWorkflowOutput(workflowAggregateOutputPath);
|
|
5493
5574
|
try {
|
|
5494
5575
|
const workflow = await runWorkflowScript({
|
|
5495
5576
|
script: workflowScript,
|
|
@@ -5512,6 +5593,32 @@ Parent action: ${STATUS_ACTION}`,
|
|
|
5512
5593
|
else
|
|
5513
5594
|
deps.state.workflowChildStops?.delete(workflowRunId);
|
|
5514
5595
|
},
|
|
5596
|
+
registerDrain: (drain) => {
|
|
5597
|
+
if (!drain)
|
|
5598
|
+
deps.state.workflowDrains?.delete(workflowRunId);
|
|
5599
|
+
else
|
|
5600
|
+
deps.state.workflowDrains?.set(workflowRunId, () => {
|
|
5601
|
+
if (workflowRunEvidence.drainRequestedAt === undefined) {
|
|
5602
|
+
const previousWorkflow = status.workflow;
|
|
5603
|
+
workflowRunEvidence.drainRequestedAt = Date.now();
|
|
5604
|
+
status.workflow = { ...previousWorkflow ?? { trace: [], emits: [], console: [] }, drainRequestedAt: workflowRunEvidence.drainRequestedAt };
|
|
5605
|
+
let saved = false;
|
|
5606
|
+
try {
|
|
5607
|
+
persist();
|
|
5608
|
+
saved = runPersistence.pendingCount() === 0;
|
|
5609
|
+
} catch (error) {
|
|
5610
|
+
console.error(`Failed to save the drain request for async workflow '${workflowRunId}':`, error);
|
|
5611
|
+
}
|
|
5612
|
+
if (!saved) {
|
|
5613
|
+
delete workflowRunEvidence.drainRequestedAt;
|
|
5614
|
+
status.workflow = previousWorkflow;
|
|
5615
|
+
persist({ tolerateStatusWriteFailure: true });
|
|
5616
|
+
return { ok: false };
|
|
5617
|
+
}
|
|
5618
|
+
}
|
|
5619
|
+
return { ok: true, started: drain(() => queueMicrotask(() => controller.abort(new Error("Workflow drained: started children finished; no new children were started.")))) };
|
|
5620
|
+
});
|
|
5621
|
+
},
|
|
5515
5622
|
...workflowState ? { state: workflowState } : {},
|
|
5516
5623
|
onTrace: updateTrace,
|
|
5517
5624
|
onChildSettled: (notification) => {
|
|
@@ -5627,9 +5734,14 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5627
5734
|
heartbeat: { status: "running", ...childPhase ? { phase: childPhase } : {} }
|
|
5628
5735
|
});
|
|
5629
5736
|
let preparedChildParams;
|
|
5630
|
-
const result = await runMissionWorkflowChild(missionBinding, workflowRunId, key, childPhase, () => {
|
|
5737
|
+
const result = await runMissionWorkflowChild(missionBinding, workflowRunId, key, childPhase, async () => {
|
|
5631
5738
|
const childRequest = bindMissionWorkflowChildAsyncLaunch({ ...prepareWorkflowChildLaunchParams({ workflowDefaults: workflowChildDefaults, childParams, parentWorkflowRunId: workflowRunId, workflowKey: key, ctxCwd: parentCwd, workflowCwd, artifactsDir: workflowArtifactsDir, aggregateOutputPath: workflowAggregateOutputPath, configuredOutputBaseDir, discoverAgents: discoverWorkflowAgents, agents: workflowAgents, workflowAgentScope: workflowChildDefaults.agentScope, outputOverride: childOutputOverrides.get(key), outputClaimPath: childOutputClaimPaths.get(key), options: { missionDetached: detachWorkflowChildMissions, awaitDetachedChild: true, runFanoutBudget: workflowFanoutBudget, parentDeadlineAt: workflowDeadlineAt, capabilityCeiling: workflowCapabilityCeiling } }), runFanoutAdmitted: admission.admitted }, missionBinding, deps.asyncByDefault, undefined, inheritedNestedRoute(deps)?.rootRunId);
|
|
5632
5739
|
preparedChildParams = childRequest;
|
|
5740
|
+
const launchApproval = await approveWorkflowChildLaunch(approval, () => workflowChildLaunchArgs(workflowRunId, key, childRequest, childParams.agent, parentCwd, discoverWorkflowAgents), workflowSignal);
|
|
5741
|
+
if ("refusal" in launchApproval)
|
|
5742
|
+
return buildRequestedModeError(childRequest, launchApproval.refusal);
|
|
5743
|
+
if (launchApproval.task !== undefined && childRequest.action !== "resume")
|
|
5744
|
+
childRequest.task = launchApproval.task;
|
|
5633
5745
|
if (workflowUsageBudget.budget)
|
|
5634
5746
|
workflowOwnedUsageBudgets.set(childRequest, workflowUsageBudget.budget);
|
|
5635
5747
|
if (workflowRequiredExtensions)
|
|
@@ -5666,6 +5778,8 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5666
5778
|
step.currentToolArgs = progress.currentToolArgs;
|
|
5667
5779
|
step.currentToolStartedAt = progress.currentToolStartedAt;
|
|
5668
5780
|
step.currentPath = progress.currentPath;
|
|
5781
|
+
step.progressText = progress.progressText;
|
|
5782
|
+
step.progressUpdatedAt = progress.progressUpdatedAt;
|
|
5669
5783
|
step.recentTools = progress.recentTools.map((tool) => ({ ...tool }));
|
|
5670
5784
|
step.recentOutput = [...progress.recentOutput];
|
|
5671
5785
|
step.turnCount = progress.turnCount;
|
|
@@ -5681,7 +5795,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5681
5795
|
status: step.status,
|
|
5682
5796
|
heartbeat: { status: step.status, ...childPhase ? { phase: childPhase } : {} }
|
|
5683
5797
|
});
|
|
5684
|
-
}, ctx, preserveActiveSession, workflowParentModel);
|
|
5798
|
+
}, ctx, preserveActiveSession, workflowParentModel, approval);
|
|
5685
5799
|
});
|
|
5686
5800
|
workflowResults.push(...result.details.results);
|
|
5687
5801
|
for (const childResult of result.details.results) {
|
|
@@ -5791,7 +5905,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5791
5905
|
}
|
|
5792
5906
|
const errorPreview = status.error && status.error.length > 1000 ? `${status.error.slice(0, 1000)}… (truncated; full error: ${statusPath} (error))` : status.error;
|
|
5793
5907
|
const terminalSummary = `${status.state === "complete" ? "Workflow completed after detached child finished." : errorPreview ?? (pauseForDetached ? "Workflow paused." : "Workflow failed.")}${stopCause ? ` ${WORKFLOW_RUNTIME_REPLACED_STOP_NOTICE}` : ""}${workflowOutputPathMappingSummary(partial.children)}${finalPreflightWarnings.length ? ` ${finalPreflightWarnings.join(" ")}` : ""}`;
|
|
5794
|
-
const outputWarning = writeWorkflowAggregateOutput(workflowAggregateOutputPath, terminalSummary, producedChildOutputPaths);
|
|
5908
|
+
const outputWarning = status.state === "complete" ? writeWorkflowAggregateOutput(workflowAggregateOutputPath, terminalSummary, producedChildOutputPaths) : earlierOutputWarning;
|
|
5795
5909
|
const resultSummary = appendWorkflowOutputWarning(terminalSummary, outputWarning);
|
|
5796
5910
|
const receiptState = status.state === "complete" ? "complete" : status.state === "paused" ? "paused" : status.state === "stopped" ? "stopped" : "failed";
|
|
5797
5911
|
const terminalOutcome = workflowFailureTerminalOutcome(error, partial.children, usageBudgetState(workflowUsageBudget.budget, sumResultsCost(workflowResults)));
|
|
@@ -5823,7 +5937,9 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5823
5937
|
deps.state.workflowChildStops?.delete(workflowRunId);
|
|
5824
5938
|
deps.state.activeAsyncCapacity = workflowCapacity?.reconcile(new Set(deps.state.workflowControllers?.keys() ?? [])) ?? deps.state.activeAsyncCapacity;
|
|
5825
5939
|
}
|
|
5826
|
-
});
|
|
5940
|
+
}).finally(() => signal?.removeEventListener("abort", abortWorkflow));
|
|
5941
|
+
if (ownsApprovalCall)
|
|
5942
|
+
await workflowTask;
|
|
5827
5943
|
return attachWorkflowMission(withRunFanoutBudget({
|
|
5828
5944
|
content: [{ type: "text", text: `${workflowPreflight ? `${formatWorkflowPreflight(workflowPreflight)}
|
|
5829
5945
|
|
|
@@ -5871,6 +5987,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5871
5987
|
const liveWorkflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "running", inventoryComplete: false, trace: liveWorkflow.trace, progress: childProgress, launches: childLaunches });
|
|
5872
5988
|
onUpdate?.(workflowProgressUpdate(foregroundWorkflowRunId, chatProgress, liveWorkflow, liveWorkflowChildren, workflowPreflight));
|
|
5873
5989
|
};
|
|
5990
|
+
const earlierOutputWarning = removeEarlierWorkflowOutput(workflowAggregateOutputPath);
|
|
5874
5991
|
try {
|
|
5875
5992
|
const workflow = await runWorkflowScript({
|
|
5876
5993
|
script: requestParams.workflowScript,
|
|
@@ -5938,9 +6055,14 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5938
6055
|
heartbeat: { status: "running", ...childPhase ? { phase: childPhase } : {} }
|
|
5939
6056
|
});
|
|
5940
6057
|
let preparedChildParams;
|
|
5941
|
-
const result = await runMissionWorkflowChild(missionBinding, foregroundWorkflowRunId, key, childPhase, () => {
|
|
6058
|
+
const result = await runMissionWorkflowChild(missionBinding, foregroundWorkflowRunId, key, childPhase, async () => {
|
|
5942
6059
|
const childRequest = bindMissionWorkflowChildAsyncLaunch({ ...prepareWorkflowChildLaunchParams({ workflowDefaults: workflowChildDefaults, childParams: delegatedWorkflowPermit ? { ...childParams, async: false } : childParams, parentWorkflowRunId: foregroundWorkflowRunId, workflowKey: key, ctxCwd: ctx.cwd, workflowCwd, artifactsDir: workflowArtifactsDir, aggregateOutputPath: workflowAggregateOutputPath, configuredOutputBaseDir, discoverAgents: discoverWorkflowAgents, agents: workflowAgents, workflowAgentScope: workflowChildDefaults.agentScope, outputOverride: childOutputOverrides.get(key), outputClaimPath: childOutputClaimPaths.get(key), options: { missionDetached: detachWorkflowChildMissions, suppressRoutineResultIntercom: chatProgress.mode === "live-card", runFanoutBudget: workflowFanoutBudget, parentDeadlineAt: workflowDeadlineAt, capabilityCeiling: workflowCapabilityCeiling } }), runFanoutAdmitted: admission.admitted }, missionBinding, deps.asyncByDefault, undefined, inheritedNestedRoute(deps)?.rootRunId);
|
|
5943
6060
|
preparedChildParams = childRequest;
|
|
6061
|
+
const launchApproval = await approveWorkflowChildLaunch(approval, () => workflowChildLaunchArgs(foregroundWorkflowRunId, key, childRequest, childParams.agent, ctx.cwd, discoverWorkflowAgents), workflowSignal);
|
|
6062
|
+
if ("refusal" in launchApproval)
|
|
6063
|
+
return buildRequestedModeError(childRequest, launchApproval.refusal);
|
|
6064
|
+
if (launchApproval.task !== undefined && childRequest.action !== "resume")
|
|
6065
|
+
childRequest.task = launchApproval.task;
|
|
5944
6066
|
if (workflowUsageBudget.budget)
|
|
5945
6067
|
workflowOwnedUsageBudgets.set(childRequest, workflowUsageBudget.budget);
|
|
5946
6068
|
if (workflowRequiredExtensions)
|
|
@@ -5993,7 +6115,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
5993
6115
|
status: progressStatus,
|
|
5994
6116
|
heartbeat: { status: progressStatus, ...childPhase ? { phase: childPhase } : {} }
|
|
5995
6117
|
});
|
|
5996
|
-
}, ctx, preserveActiveSession, workflowParentModel);
|
|
6118
|
+
}, ctx, preserveActiveSession, workflowParentModel, approval);
|
|
5997
6119
|
});
|
|
5998
6120
|
workflowResults.push(...result.details.results);
|
|
5999
6121
|
for (const childResult of result.details.results) {
|
|
@@ -6061,7 +6183,7 @@ ${workflow.console.map((entry) => `[${entry.level}] ${entry.text}`).join(`
|
|
|
6061
6183
|
const finalPreflightTrace = annotateWorkflowPreflightTrace(partial.trace, workflowPreflight);
|
|
6062
6184
|
const trace = finalPreflightTrace.map((entry) => ({ line: `- ${entry.operation} ${entry.key}: ${entry.state}${entry.runId ? ` (${entry.runId})` : ""}${entry.warning ? ` — ${entry.warning}` : ""}`, error: entry.error }));
|
|
6063
6185
|
const outputMappings = workflowOutputPathMappingSummary(partial.children).trim();
|
|
6064
|
-
const displayText = formatWorkflowResultText({
|
|
6186
|
+
const displayText = appendWorkflowOutputWarning(formatWorkflowResultText({
|
|
6065
6187
|
head: workflowPreflight ? [formatWorkflowPreflight(workflowPreflight)] : [],
|
|
6066
6188
|
script: [
|
|
6067
6189
|
`Workflow failed: ${text}`,
|
|
@@ -6078,10 +6200,10 @@ ${partial.console.map((entry) => `[${entry.level}] ${entry.text}`).join(`
|
|
|
6078
6200
|
...outputMappings ? [outputMappings] : []
|
|
6079
6201
|
],
|
|
6080
6202
|
maxOutput: requestParams.maxOutput,
|
|
6081
|
-
aggregateOutputPath:
|
|
6203
|
+
aggregateOutputPath: undefined,
|
|
6082
6204
|
fullResultPath: workflowFullResultPath,
|
|
6083
6205
|
producedChildOutputPaths
|
|
6084
|
-
});
|
|
6206
|
+
}), earlierOutputWarning);
|
|
6085
6207
|
const workflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "failed", inventoryComplete: true, trace: partial.trace, children: partial.children });
|
|
6086
6208
|
const terminalOutcome = workflowFailureTerminalOutcome(error, partial.children, usageBudgetState(workflowUsageBudget.budget, sumResultsCost(workflowResults)));
|
|
6087
6209
|
const receipt = terminalWorkflowReceipt(foregroundWorkflowRunId, "failed", partial.children, workflowChildren, terminalOutcome, [...workflowHostSteps.values()], workflowResource?.provenance, workflowArgsDigest);
|
|
@@ -6534,7 +6656,7 @@ ${item.text}` } : item)
|
|
|
6534
6656
|
if (action === "resume") {
|
|
6535
6657
|
const workflowResumeSourceId = workflowResumeTargetId(DIRS.async, paramsWithResolvedCwd);
|
|
6536
6658
|
if (workflowResumeSourceId)
|
|
6537
|
-
return resumeWorkflowById(_id, workflowResumeSourceId, signal, ctx);
|
|
6659
|
+
return resumeWorkflowById(_id, workflowResumeSourceId, signal, ctx, approval);
|
|
6538
6660
|
return resumeAsyncRun(omitUndefinedProperties({
|
|
6539
6661
|
params: paramsWithResolvedCwd,
|
|
6540
6662
|
requestCwd,
|
|
@@ -6687,6 +6809,8 @@ ${item.text}` } : item)
|
|
|
6687
6809
|
}
|
|
6688
6810
|
if (action === "stop") {
|
|
6689
6811
|
const targetRunId = paramsWithResolvedCwd.runId ?? paramsWithResolvedCwd.id;
|
|
6812
|
+
if (paramsWithResolvedCwd.drain && paramsWithResolvedCwd.childId !== undefined)
|
|
6813
|
+
return { content: [{ type: "text", text: "action='stop' drain applies to a whole workflow; omit childId." }], isError: true, details: { mode: "management", results: [] } };
|
|
6690
6814
|
const workflowRunId = targetRunId && paramsWithResolvedCwd.childId !== undefined ? resolveLiveWorkflowRunId(deps, targetRunId) : undefined;
|
|
6691
6815
|
if (workflowRunId && paramsWithResolvedCwd.childId !== undefined) {
|
|
6692
6816
|
const stopChild = deps.state.workflowChildStops?.get(workflowRunId);
|
|
@@ -6732,7 +6856,7 @@ ${item.text}` } : item)
|
|
|
6732
6856
|
if (paramsWithResolvedCwd.dir) {
|
|
6733
6857
|
try {
|
|
6734
6858
|
const location = resolveAsyncRunLocation(paramsWithResolvedCwd, DIRS.async, DIRS.results);
|
|
6735
|
-
const stopResult = stopAsyncRun(deps.state, location.resolvedId ?? targetRunId ?? path.basename(location.asyncDir ?? paramsWithResolvedCwd.dir), deps.kill, location, paramsWithResolvedCwd.childId);
|
|
6859
|
+
const stopResult = stopAsyncRun(deps.state, location.resolvedId ?? targetRunId ?? path.basename(location.asyncDir ?? paramsWithResolvedCwd.dir), deps.kill, location, paramsWithResolvedCwd.childId, paramsWithResolvedCwd.drain);
|
|
6736
6860
|
return stopResult ?? { content: [{ type: "text", text: `No running or queued async run was found for '${targetRunId ?? paramsWithResolvedCwd.dir}'.` }], isError: true, details: { mode: "management", results: [] } };
|
|
6737
6861
|
} catch (error) {
|
|
6738
6862
|
const text = error instanceof Error ? error.message : String(error);
|
|
@@ -6751,7 +6875,7 @@ ${item.text}` } : item)
|
|
|
6751
6875
|
return { content: [{ type: "text", text: "action='stop' supports current-session top-level async runs only." }], isError: true, details: { mode: "management", results: [] } };
|
|
6752
6876
|
if (resolved?.kind === "foreground")
|
|
6753
6877
|
return { content: [{ type: "text", text: "action='stop' supports async runs only. Use action='interrupt' for foreground runs." }], isError: true, details: { mode: "management", results: [] } };
|
|
6754
|
-
const stopResult = stopAsyncRun(deps.state, resolved?.kind === "async" ? resolved.id : targetRunId, deps.kill, resolved?.kind === "async" ? resolved.location : undefined, paramsWithResolvedCwd.childId);
|
|
6878
|
+
const stopResult = stopAsyncRun(deps.state, resolved?.kind === "async" ? resolved.id : targetRunId, deps.kill, resolved?.kind === "async" ? resolved.location : undefined, paramsWithResolvedCwd.childId, paramsWithResolvedCwd.drain);
|
|
6755
6879
|
if (stopResult)
|
|
6756
6880
|
return stopResult;
|
|
6757
6881
|
return {
|
|
@@ -6941,6 +7065,15 @@ ${item.text}` } : item)
|
|
|
6941
7065
|
if (launcherError)
|
|
6942
7066
|
return buildRequestedModeError(effectiveParams, launcherError);
|
|
6943
7067
|
}
|
|
7068
|
+
if (effectiveParams.requireLauncher !== undefined) {
|
|
7069
|
+
if (!effectiveParams.requireLauncher || typeof effectiveParams.requireLauncher !== "object")
|
|
7070
|
+
return buildRequestedModeError(effectiveParams, "requireLauncher must be { name, definitionDigest }.");
|
|
7071
|
+
if (!hasSingle || effectiveParams.resume !== undefined || effectiveParams.workflowParentRunId !== undefined)
|
|
7072
|
+
return buildRequestedModeError(effectiveParams, REQUIRE_LAUNCHER_SHAPE_ERROR);
|
|
7073
|
+
const required = selectedAgents[0] ? checkRequiredRunnerLauncher(selectedAgents[0], selectedAgents[0].launcher, effectiveParams.requireLauncher) : undefined;
|
|
7074
|
+
if (required?.error)
|
|
7075
|
+
return buildRequestedModeError(effectiveParams, required.error);
|
|
7076
|
+
}
|
|
6944
7077
|
if (effectiveAsync && hasSingle && effectiveParams.resume === undefined && effectiveParams.worktree === true) {
|
|
6945
7078
|
try {
|
|
6946
7079
|
await preflightWorktreeSource(effectiveCwd, { signal });
|
|
@@ -7212,6 +7345,7 @@ ${item.text}` } : item)
|
|
|
7212
7345
|
parentModel: requestParentModel,
|
|
7213
7346
|
scopedModelIds: scopedModelIdsFromContext(ctx),
|
|
7214
7347
|
availableModels: ctx.modelRegistry.getAvailable().map(toModelInfo),
|
|
7348
|
+
knownProviders: knownModelProviders(ctx.modelRegistry),
|
|
7215
7349
|
currentProvider: requestParentModel?.provider,
|
|
7216
7350
|
modelScope,
|
|
7217
7351
|
thinkingOverrideForTask,
|
|
@@ -7324,26 +7458,26 @@ ${item.text}` } : item)
|
|
|
7324
7458
|
details: { mode: "single", results: [] }
|
|
7325
7459
|
}, contextPolicy.contextSummary);
|
|
7326
7460
|
};
|
|
7327
|
-
const executeWithSingleDispatchGuard = async (id, params, signal, onUpdate, ctx) => {
|
|
7461
|
+
const executeWithSingleDispatchGuard = async (id, params, signal, onUpdate, ctx, approval) => {
|
|
7328
7462
|
const normalizedAction = typeof params.action === "string" ? params.action.trim() : params.action;
|
|
7329
7463
|
const requestParams = normalizedAction ? { ...params, action: normalizedAction } : params;
|
|
7330
7464
|
if (normalizedAction)
|
|
7331
|
-
return execute(id, requestParams, signal, onUpdate, ctx).then(withAggregatedToolUsage);
|
|
7465
|
+
return execute(id, requestParams, signal, onUpdate, ctx, false, undefined, approval).then(withAggregatedToolUsage);
|
|
7332
7466
|
const { depth } = checkSubagentDepth(deps.config.maxSubagentDepth, deps.childRuntime);
|
|
7333
7467
|
const dispatchParams = applyForceTopLevelAsyncOverride(requestParams, depth, deps.config.forceTopLevelAsync === true);
|
|
7334
7468
|
const runsForeground = dispatchParams.clarify === true || (dispatchParams.async ?? deps.asyncByDefault) !== true;
|
|
7335
7469
|
if (!runsForeground)
|
|
7336
|
-
return execute(id, requestParams, signal, onUpdate, ctx).then(withAggregatedToolUsage);
|
|
7470
|
+
return execute(id, requestParams, signal, onUpdate, ctx, false, undefined, approval).then(withAggregatedToolUsage);
|
|
7337
7471
|
if (deps.state.subagentInProgress === true)
|
|
7338
7472
|
return duplicateSubagentCallResult(requestParams);
|
|
7339
7473
|
deps.state.subagentInProgress = true;
|
|
7340
7474
|
try {
|
|
7341
|
-
return withAggregatedToolUsage(await execute(id, requestParams, signal, onUpdate, ctx));
|
|
7475
|
+
return withAggregatedToolUsage(await execute(id, requestParams, signal, onUpdate, ctx, false, undefined, approval));
|
|
7342
7476
|
} finally {
|
|
7343
7477
|
deps.state.subagentInProgress = false;
|
|
7344
7478
|
}
|
|
7345
7479
|
};
|
|
7346
|
-
const executePublic = (id, params, signal, onUpdate, ctx) => {
|
|
7480
|
+
const executePublic = (id, params, signal, onUpdate, ctx, approval) => {
|
|
7347
7481
|
const disabledFeatureError = disabledFeatureResult(params);
|
|
7348
7482
|
if (disabledFeatureError)
|
|
7349
7483
|
return Promise.resolve(disabledFeatureError);
|
|
@@ -7403,15 +7537,15 @@ ${item.text}` } : item)
|
|
|
7403
7537
|
if (workflowResumeLaunch)
|
|
7404
7538
|
workflowResumeLaunches.set(publicParams, workflowResumeLaunch);
|
|
7405
7539
|
publicExecutions.add(publicParams);
|
|
7406
|
-
return executeWithSingleDispatchGuard(id, publicParams, signal, onUpdate, ctx);
|
|
7540
|
+
return executeWithSingleDispatchGuard(id, publicParams, signal, onUpdate, ctx, approval);
|
|
7407
7541
|
};
|
|
7408
|
-
const executeWorkflowResume = async (id, prepared, signal, ctx) => {
|
|
7542
|
+
const executeWorkflowResume = async (id, prepared, signal, ctx, approval) => {
|
|
7409
7543
|
const params = { ...prepared.params };
|
|
7410
7544
|
const launch = { presetRunId: prepared.newRunId, resumeOrigin: prepared.resumeOrigin, expectedScriptDigest: prepared.expectedScriptDigest };
|
|
7411
7545
|
workflowResumeLaunches.set(params, launch);
|
|
7412
7546
|
let result;
|
|
7413
7547
|
try {
|
|
7414
|
-
result = await executePublic(id, params, signal, undefined, ctx);
|
|
7548
|
+
result = await executePublic(id, params, signal, undefined, ctx, approval);
|
|
7415
7549
|
} catch (error) {
|
|
7416
7550
|
result = { content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }], isError: true, details: { mode: "workflow", results: [] } };
|
|
7417
7551
|
}
|
|
@@ -7429,7 +7563,7 @@ ${item.text}` } : item)
|
|
|
7429
7563
|
}
|
|
7430
7564
|
return { result, launched: false, refusal };
|
|
7431
7565
|
};
|
|
7432
|
-
const resumeWorkflowById = async (id, sourceRunId, signal, ctx) => {
|
|
7566
|
+
const resumeWorkflowById = async (id, sourceRunId, signal, ctx, approval) => {
|
|
7433
7567
|
const refused = (text) => ({ content: [{ type: "text", text }], isError: true, details: { mode: "management", results: [] } });
|
|
7434
7568
|
let preparation;
|
|
7435
7569
|
try {
|
|
@@ -7439,7 +7573,7 @@ ${item.text}` } : item)
|
|
|
7439
7573
|
}
|
|
7440
7574
|
if (!preparation.ok)
|
|
7441
7575
|
return refused(manualWorkflowResumeRefusalText(sourceRunId, preparation));
|
|
7442
|
-
const outcome = await executeWorkflowResume(id, preparation.prepared, signal, ctx);
|
|
7576
|
+
const outcome = await executeWorkflowResume(id, preparation.prepared, signal, ctx, approval);
|
|
7443
7577
|
if (!outcome.launched)
|
|
7444
7578
|
return refused(manualWorkflowResumeRefusalText(sourceRunId, outcome.refusal));
|
|
7445
7579
|
const resumedLine = `Resumed workflow '${sourceRunId}' as ${preparation.prepared.newRunId}.`;
|