@duckmind/dm-darwin-x64 0.67.0 → 0.67.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dm +2 -2
- package/extensions/.dm-extensions.json +122 -605
- package/extensions/dm-lens/clients/actionable-warnings.js +12 -4
- package/extensions/dm-lens/clients/advisory-provenance.js +11 -10
- package/extensions/dm-lens/clients/agent-nudge.js +1 -1
- package/extensions/dm-lens/clients/analysis-root.js +75 -34
- package/extensions/dm-lens/clients/bash-file-access.js +550 -123
- package/extensions/dm-lens/clients/blocker-freshness.js +202 -19
- package/extensions/dm-lens/clients/blocker-past-eof.js +3 -1
- package/extensions/dm-lens/clients/bounded-telemetry.js +3 -0
- package/extensions/dm-lens/clients/cache-manager.js +22 -1
- package/extensions/dm-lens/clients/cache-observability.js +278 -17
- package/extensions/dm-lens/clients/cargo-manifest.js +8 -12
- package/extensions/dm-lens/clients/cascade-format.js +162 -19
- package/extensions/dm-lens/clients/codebase-model.js +2 -2
- package/extensions/dm-lens/clients/config-locations.js +1 -8
- package/extensions/dm-lens/clients/content-stamp.js +16 -0
- package/extensions/dm-lens/clients/context-injection-ledger.js +160 -0
- package/extensions/dm-lens/clients/deferred-runner-blockers.js +46 -6
- package/extensions/dm-lens/clients/degradation-ledger.js +21 -1
- package/extensions/dm-lens/clients/deps/ast-grep-napi.js +10 -0
- package/extensions/dm-lens/clients/diagnostic-dispositions.js +28 -12
- package/extensions/dm-lens/clients/disk-change-consumers.js +312 -0
- package/extensions/dm-lens/clients/disk-change-subscribers.js +197 -0
- package/extensions/dm-lens/clients/disk-changes.js +168 -0
- package/extensions/dm-lens/clients/dispatch/auxiliary-lsp.js +10 -6
- package/extensions/dm-lens/clients/dispatch/dispatcher.js +300 -61
- package/extensions/dm-lens/clients/dispatch/fact-store.js +2 -8
- package/extensions/dm-lens/clients/dispatch/facts/function-facts.js +87 -94
- package/extensions/dm-lens/clients/dispatch/finding-policy.js +25 -1
- package/extensions/dm-lens/clients/dispatch/indent-detect.js +1 -1
- package/extensions/dm-lens/clients/dispatch/integration.js +349 -135
- package/extensions/dm-lens/clients/dispatch/lane-copies.js +23 -0
- package/extensions/dm-lens/clients/dispatch/pending-runner-findings.js +3 -0
- package/extensions/dm-lens/clients/dispatch/pre-edit-seed.js +57 -0
- package/extensions/dm-lens/clients/dispatch/rule-id-normalize.js +6 -1
- package/extensions/dm-lens/clients/dispatch/rules/high-complexity.js +2 -17
- package/extensions/dm-lens/clients/dispatch/rules/high-fan-out.js +1 -9
- package/extensions/dm-lens/clients/dispatch/runner-context.js +9 -10
- package/extensions/dm-lens/clients/dispatch/runners/ast-grep-literal-anchors.js +58 -0
- package/extensions/dm-lens/clients/dispatch/runners/ast-grep-napi.js +59 -14
- package/extensions/dm-lens/clients/dispatch/runners/biome-check.js +9 -18
- package/extensions/dm-lens/clients/dispatch/runners/cue-vet.js +11 -21
- package/extensions/dm-lens/clients/dispatch/runners/dart-analyze.js +1 -1
- package/extensions/dm-lens/clients/dispatch/runners/detekt.js +4 -3
- package/extensions/dm-lens/clients/dispatch/runners/dotnet-build.js +15 -6
- package/extensions/dm-lens/clients/dispatch/runners/fish-indent.js +59 -5
- package/extensions/dm-lens/clients/dispatch/runners/gleam-check.js +9 -19
- package/extensions/dm-lens/clients/dispatch/runners/go-vet.js +2 -2
- package/extensions/dm-lens/clients/dispatch/runners/golangci-lint.js +17 -1
- package/extensions/dm-lens/clients/dispatch/runners/helm-lint.js +8 -5
- package/extensions/dm-lens/clients/dispatch/runners/helm-render.js +1 -1
- package/extensions/dm-lens/clients/dispatch/runners/ktlint.js +27 -5
- package/extensions/dm-lens/clients/dispatch/runners/lsp.js +91 -30
- package/extensions/dm-lens/clients/dispatch/runners/oxlint.js +9 -18
- package/extensions/dm-lens/clients/dispatch/runners/shellcheck.js +11 -20
- package/extensions/dm-lens/clients/dispatch/runners/shfmt.js +7 -0
- package/extensions/dm-lens/clients/dispatch/runners/taplo.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runners/tree-sitter.js +29 -16
- package/extensions/dm-lens/clients/dispatch/runners/utils/availability-policy.js +32 -4
- package/extensions/dm-lens/clients/dispatch/runners/utils/candidate-probe.js +8 -0
- package/extensions/dm-lens/clients/dispatch/runners/utils/diagnostic-parsers.js +2 -1
- package/extensions/dm-lens/clients/dispatch/runners/utils/runner-helpers.js +1 -1
- package/extensions/dm-lens/clients/dispatch/runners/utils/tool-failure.js +9 -18
- package/extensions/dm-lens/clients/dispatch/runners/vale.js +2 -16
- package/extensions/dm-lens/clients/dispatch/types.js +45 -0
- package/extensions/dm-lens/clients/dispatch/utils/lsp-diagnostics.js +2 -1
- package/extensions/dm-lens/clients/ephemeral-root.js +10 -20
- package/extensions/dm-lens/clients/file-kinds.js +6 -2
- package/extensions/dm-lens/clients/file-mutation-queue.js +4 -8
- package/extensions/dm-lens/clients/file-utils.js +167 -28
- package/extensions/dm-lens/clients/finding-delivery-gate.js +15 -1
- package/extensions/dm-lens/clients/finding-identity.js +56 -0
- package/extensions/dm-lens/clients/fix-run-restore.js +10 -0
- package/extensions/dm-lens/clients/format-service.js +23 -5
- package/extensions/dm-lens/clients/formatters.js +33 -25
- package/extensions/dm-lens/clients/git-guard.js +516 -85
- package/extensions/dm-lens/clients/govulncheck-client.js +8 -0
- package/extensions/dm-lens/clients/grammar-source.js +39 -5
- package/extensions/dm-lens/clients/gzip-stage-write.js +99 -18
- package/extensions/dm-lens/clients/inline-blocker-fields.js +1 -1
- package/extensions/dm-lens/clients/installer/index.js +83 -85
- package/extensions/dm-lens/clients/installer/managed-tool-refresh.js +211 -8
- package/extensions/dm-lens/clients/instance-reaper.js +19 -8
- package/extensions/dm-lens/clients/instance-registry.js +12 -0
- package/extensions/dm-lens/clients/jscpd-client.js +20 -4
- package/extensions/dm-lens/clients/language-profile.js +8 -7
- package/extensions/dm-lens/clients/language-registry.js +45 -4
- package/extensions/dm-lens/clients/latency-logger.js +10 -2
- package/extensions/dm-lens/clients/lens-config.js +14 -4
- package/extensions/dm-lens/clients/lens-engine.js +10 -2
- package/extensions/dm-lens/clients/lens-flag-registry.js +19 -3
- package/extensions/dm-lens/clients/line-alignment.js +200 -0
- package/extensions/dm-lens/clients/lsp/capabilities.js +2 -2
- package/extensions/dm-lens/clients/lsp/cascade-tier.js +148 -38
- package/extensions/dm-lens/clients/lsp/client-registry.js +906 -0
- package/extensions/dm-lens/clients/lsp/client.js +413 -108
- package/extensions/dm-lens/clients/lsp/config.js +151 -47
- package/extensions/dm-lens/clients/lsp/content-limits.js +2 -2
- package/extensions/dm-lens/clients/lsp/content-scan.js +69 -0
- package/extensions/dm-lens/clients/lsp/created-import-targets.js +134 -0
- package/extensions/dm-lens/clients/lsp/diagnostic-binding.js +34 -0
- package/extensions/dm-lens/clients/lsp/document-drift.js +63 -15
- package/extensions/dm-lens/clients/lsp/edits.js +109 -26
- package/extensions/dm-lens/clients/lsp/environment-gap.js +186 -0
- package/extensions/dm-lens/clients/lsp/file-server-match.js +26 -0
- package/extensions/dm-lens/clients/lsp/implicit-scope.js +208 -0
- package/extensions/dm-lens/clients/lsp/index.js +574 -916
- package/extensions/dm-lens/clients/lsp/inferred-project.js +37 -15
- package/extensions/dm-lens/clients/lsp/jvm-runtime.js +15 -9
- package/extensions/dm-lens/clients/lsp/language.js +8 -1
- package/extensions/dm-lens/clients/lsp/launch.js +93 -43
- package/extensions/dm-lens/clients/lsp/lombok.js +0 -13
- package/extensions/dm-lens/clients/lsp/path-utils.js +2 -0
- package/extensions/dm-lens/clients/lsp/position-encoding.js +0 -7
- package/extensions/dm-lens/clients/lsp/server-config-files.js +11 -0
- package/extensions/dm-lens/clients/lsp/server-traits.js +8 -2
- package/extensions/dm-lens/clients/lsp/server.js +273 -76
- package/extensions/dm-lens/clients/lsp/session-roots.js +38 -3
- package/extensions/dm-lens/clients/lsp/wait-policy/strategies.js +87 -5
- package/extensions/dm-lens/clients/lsp/watch-queue.js +23 -2
- package/extensions/dm-lens/clients/lsp/workspace-diagnostics-cache.js +183 -47
- package/extensions/dm-lens/clients/lsp/workspace-diagnostics-session.js +35 -0
- package/extensions/dm-lens/clients/lsp-mutation.js +1 -1
- package/extensions/dm-lens/clients/mcp/analyze.js +51 -13
- package/extensions/dm-lens/clients/mcp/ipc.js +24 -1
- package/extensions/dm-lens/clients/mcp/session.js +2 -7
- package/extensions/dm-lens/clients/memory-sampler.js +19 -1
- package/extensions/dm-lens/clients/metrics-history.js +16 -29
- package/extensions/dm-lens/clients/mutating-tool.js +4 -2
- package/extensions/dm-lens/clients/mutation-attribution.js +1 -4
- package/extensions/dm-lens/clients/observed-mutation.js +7 -1
- package/extensions/dm-lens/clients/opaque-mutation-scan.js +273 -59
- package/extensions/dm-lens/clients/opengrep-client.js +6 -1
- package/extensions/dm-lens/clients/opengrep-config.js +10 -5
- package/extensions/dm-lens/clients/opengrep-rule-pack.js +19 -0
- package/extensions/dm-lens/clients/out-of-band-changes.js +342 -0
- package/extensions/dm-lens/clients/package-manager.js +51 -62
- package/extensions/dm-lens/clients/package-root.js +8 -12
- package/extensions/dm-lens/clients/partial-edit-apply.js +8 -4
- package/extensions/dm-lens/clients/path-birth.js +58 -0
- package/extensions/dm-lens/clients/path-utils.js +145 -23
- package/extensions/dm-lens/clients/persist-worker-stats.js +8 -0
- package/extensions/dm-lens/clients/persistent-reverify.js +2 -1
- package/extensions/dm-lens/clients/pipeline.js +248 -35
- package/extensions/dm-lens/clients/probe-home-state.js +6 -0
- package/extensions/dm-lens/clients/project-changes.js +9 -3
- package/extensions/dm-lens/clients/project-diagnostics/fresh-fetch.js +1 -1
- package/extensions/dm-lens/clients/project-diagnostics/scanner.js +4 -2
- package/extensions/dm-lens/clients/project-lens-config.js +4 -6
- package/extensions/dm-lens/clients/project-root-markers.js +8 -0
- package/extensions/dm-lens/clients/project-snapshot-persist-worker.js +26 -8
- package/extensions/dm-lens/clients/project-snapshot.js +36 -10
- package/extensions/dm-lens/clients/python-environment.js +239 -12
- package/extensions/dm-lens/clients/read-guard-tool-lines.js +2 -8
- package/extensions/dm-lens/clients/read-guard.js +130 -43
- package/extensions/dm-lens/clients/review-graph/builder.js +102 -19
- package/extensions/dm-lens/clients/review-graph/git-identity.js +7 -2
- package/extensions/dm-lens/clients/review-graph/import-resolvers.js +9 -0
- package/extensions/dm-lens/clients/review-graph/tsconfig-paths.js +35 -2
- package/extensions/dm-lens/clients/ruff-client.js +0 -2
- package/extensions/dm-lens/clients/rules-scanner.js +0 -43
- package/extensions/dm-lens/clients/runtime-agent-end.js +37 -6
- package/extensions/dm-lens/clients/runtime-coordinator.js +177 -31
- package/extensions/dm-lens/clients/runtime-session.js +106 -66
- package/extensions/dm-lens/clients/runtime-tool-call.js +162 -65
- package/extensions/dm-lens/clients/runtime-tool-result.js +634 -147
- package/extensions/dm-lens/clients/runtime-turn.js +472 -150
- package/extensions/dm-lens/clients/rust-client.js +11 -13
- package/extensions/dm-lens/clients/safe-spawn.js +149 -17
- package/extensions/dm-lens/clients/sanitize.js +0 -169
- package/extensions/dm-lens/clients/search-read-registration.js +22 -4
- package/extensions/dm-lens/clients/session-lifecycle.js +44 -1
- package/extensions/dm-lens/clients/session-repository.js +119 -0
- package/extensions/dm-lens/clients/session-scope.js +1 -1
- package/extensions/dm-lens/clients/session-start-observability.js +12 -0
- package/extensions/dm-lens/clients/session-state-store.js +6 -1
- package/extensions/dm-lens/clients/sg-runner.js +5 -8
- package/extensions/dm-lens/clients/sgconfig.js +7 -14
- package/extensions/dm-lens/clients/single-flight.js +1 -0
- package/extensions/dm-lens/clients/source-filter.js +19 -16
- package/extensions/dm-lens/clients/source-walker.js +21 -3
- package/extensions/dm-lens/clients/startup-scan.js +18 -23
- package/extensions/dm-lens/clients/test-runner-client.js +21 -27
- package/extensions/dm-lens/clients/test-runner-delivery.js +2 -10
- package/extensions/dm-lens/clients/tool-config.js +24 -4
- package/extensions/dm-lens/clients/tool-cwd.js +11 -9
- package/extensions/dm-lens/clients/tool-policy.js +1 -8
- package/extensions/dm-lens/clients/tool-set-policy.js +32 -3
- package/extensions/dm-lens/clients/tree-sitter-client.js +70 -24
- package/extensions/dm-lens/clients/tree-sitter-query-loader.js +13 -1
- package/extensions/dm-lens/clients/tree-sitter-symbol-extractor.js +81 -56
- package/extensions/dm-lens/clients/warm-attach.js +33 -8
- package/extensions/dm-lens/clients/widget-state.js +48 -31
- package/extensions/dm-lens/clients/word-index-logger.js +3 -0
- package/extensions/dm-lens/clients/word-index.js +15 -2
- package/extensions/dm-lens/clients/workspace-topology.js +10 -8
- package/extensions/dm-lens/config/biome/core.jsonc +3 -3
- package/extensions/dm-lens/config/dependency-cruiser-eager-allowlist.json +1 -0
- package/extensions/dm-lens/index.js +336 -141
- package/extensions/dm-lens/mcp/analyze-cli.js +1 -1
- package/extensions/dm-lens/mcp/cli.js +1 -1
- package/extensions/dm-lens/mcp/server.js +16 -13
- package/extensions/dm-lens/mcp/worker.js +1 -1
- package/extensions/dm-lens/package.json +1 -1
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-return-value-in-generator-test.yml +17 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-js-test.yml +86 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/no-sql-in-code-execute-test.yml +86 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rule-tests/unchecked-numeric-parse-python-test.yml +15 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-return-value-in-generator.yml +9 -4
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute-js.yml +119 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/no-sql-in-code-execute.yml +119 -0
- package/extensions/dm-lens/rules/ast-grep-rules/rules/unchecked-numeric-parse-python.yml +13 -2
- package/extensions/dm-lens/rules/rule-catalog.json +25 -1
- package/extensions/dm-lens/scripts/lib/process-scan.mjs +1 -1
- package/extensions/dm-lens/skills/{pi-lens-ast-grep → dm-lens-ast-grep}/SKILL.md +1 -1
- package/extensions/dm-lens/tools/activate-tools.js +3 -2
- package/extensions/dm-lens/tools/ast-grep-outline.js +6 -4
- package/extensions/dm-lens/tools/ast-grep-replace.js +17 -10
- package/extensions/dm-lens/tools/ast-grep-search.js +27 -19
- package/extensions/dm-lens/tools/lens-diagnostic-mark.js +3 -3
- package/extensions/dm-lens/tools/lens-diagnostics.js +260 -68
- package/extensions/dm-lens/tools/lsp-diagnostics.js +303 -76
- package/extensions/dm-lens/tools/lsp-navigation.js +168 -102
- package/extensions/dm-lens/tools/module-report.js +2 -1
- package/extensions/dm-lens/tools/shared.js +16 -2
- package/extensions/dm-mcp-adapter/.github/workflows/ci.yml +82 -0
- package/extensions/dm-mcp-adapter/THIRD_PARTY_NOTICES.md +1 -1
- package/extensions/dm-mcp-adapter/VISION.md +94 -0
- package/extensions/dm-mcp-adapter/agent-dir.js +2 -2
- package/extensions/dm-mcp-adapter/bearer-command-resolver.js +5 -3
- package/extensions/dm-mcp-adapter/bench/server-memory.mjs +432 -0
- package/extensions/dm-mcp-adapter/bench/session.js +105 -0
- package/extensions/dm-mcp-adapter/bench/token-cost/data.mjs +231 -0
- package/extensions/dm-mcp-adapter/bench/token-cost/run.mjs +190 -0
- package/extensions/dm-mcp-adapter/bench/token-cost/server.mjs +109 -0
- package/extensions/dm-mcp-adapter/cli.js +55 -100
- package/extensions/dm-mcp-adapter/codemode-bridge.js +92 -0
- package/extensions/dm-mcp-adapter/commands.js +143 -26
- package/extensions/dm-mcp-adapter/config.js +303 -78
- package/extensions/dm-mcp-adapter/conformance/baseline-client.yml +22 -0
- package/extensions/dm-mcp-adapter/conformance/driver.js +200 -0
- package/extensions/dm-mcp-adapter/conformance/driver.sh +24 -0
- package/extensions/dm-mcp-adapter/conformance/run.sh +130 -0
- package/extensions/dm-mcp-adapter/deferred-tool-surface.js +69 -0
- package/extensions/dm-mcp-adapter/direct-tool-surface.js +96 -72
- package/extensions/dm-mcp-adapter/direct-tools.js +76 -53
- package/extensions/dm-mcp-adapter/dm-host-tool-context.js +0 -0
- package/extensions/dm-mcp-adapter/elicitation-handler.js +4 -0
- package/extensions/dm-mcp-adapter/error-signal.js +12 -1
- package/extensions/dm-mcp-adapter/executor-accounts.js +192 -0
- package/extensions/dm-mcp-adapter/executor-app-tools.js +61 -0
- package/extensions/dm-mcp-adapter/executor-catalog.js +157 -0
- package/extensions/dm-mcp-adapter/executor-pauses.js +105 -0
- package/extensions/dm-mcp-adapter/extraction-settings.js +43 -0
- package/extensions/dm-mcp-adapter/extraction.js +396 -0
- package/extensions/dm-mcp-adapter/host-html-template.js +1 -1
- package/extensions/dm-mcp-adapter/host-managed.js +24 -5
- package/extensions/dm-mcp-adapter/index.js +761 -76
- package/extensions/dm-mcp-adapter/init.js +235 -11
- package/extensions/dm-mcp-adapter/jev-semantic-search.js +161 -0
- package/extensions/dm-mcp-adapter/mcp-code.js +12 -11
- package/extensions/dm-mcp-adapter/mcp-keyring-helper.cjs +1 -1
- package/extensions/dm-mcp-adapter/mcp-output-guard.js +7 -0
- package/extensions/dm-mcp-adapter/mcp-panel.js +23 -21
- package/extensions/dm-mcp-adapter/mcp-probe.js +1 -1
- package/extensions/dm-mcp-adapter/mcp-status.js +2 -1
- package/extensions/dm-mcp-adapter/mcp-tasks.js +46 -7
- package/extensions/dm-mcp-adapter/metadata-cache.js +93 -5
- package/extensions/dm-mcp-adapter/namespace-tools.js +12 -4
- package/extensions/dm-mcp-adapter/output-shape.js +1 -1
- package/extensions/dm-mcp-adapter/package.json +1 -1
- package/extensions/dm-mcp-adapter/pi-mcp.mp4 +0 -0
- package/extensions/dm-mcp-adapter/pi-signin-import.js +1 -1
- package/extensions/dm-mcp-adapter/project-server-trust.js +108 -20
- package/extensions/dm-mcp-adapter/proxy-modes.js +320 -110
- package/extensions/dm-mcp-adapter/request-headers-command.js +17 -1
- package/extensions/dm-mcp-adapter/runtime-owner.js +7 -6
- package/extensions/dm-mcp-adapter/sampling-handler.js +8 -2
- package/extensions/dm-mcp-adapter/script-tool-save.js +251 -0
- package/extensions/dm-mcp-adapter/script-tool-surface.js +100 -0
- package/extensions/dm-mcp-adapter/script-tools.js +72 -0
- package/extensions/dm-mcp-adapter/semantic-search.js +176 -50
- package/extensions/dm-mcp-adapter/semantic-settings.js +51 -0
- package/extensions/dm-mcp-adapter/server-log.js +19 -0
- package/extensions/dm-mcp-adapter/server-manager.js +64 -21
- package/extensions/dm-mcp-adapter/task-entries.js +60 -0
- package/extensions/dm-mcp-adapter/task-jobs.js +263 -0
- package/extensions/dm-mcp-adapter/tool-approval.js +49 -2
- package/extensions/dm-mcp-adapter/tool-metadata.js +70 -3
- package/extensions/dm-mcp-adapter/tool-registrar.js +8 -1
- package/extensions/dm-mcp-adapter/tool-result-renderer.js +10 -6
- package/extensions/dm-mcp-adapter/types.js +7 -0
- package/extensions/dm-mcp-adapter/ui-server.js +24 -18
- package/extensions/dm-mcp-adapter/ui-session.js +3 -3
- package/extensions/dm-mcp-adapter/upgrade-notice.js +42 -0
- package/extensions/dm-mcp-adapter/utils.js +33 -7
- package/extensions/dm-ponytail/extensions/ponytail.mjs +11 -3
- package/extensions/dm-ponytail/hooks/band/board.js +524 -0
- package/extensions/dm-ponytail/hooks/band/logo.js +2 -0
- package/extensions/dm-ponytail/hooks/band/metrics.js +238 -0
- package/extensions/dm-ponytail/hooks/band/register.js +532 -0
- package/extensions/dm-ponytail/hooks/claude-band.json +6 -0
- package/extensions/dm-ponytail/hooks/claude-codex-hooks.json +6 -6
- package/extensions/dm-ponytail/hooks/copilot-hooks.json +6 -6
- package/extensions/dm-ponytail/hooks/cursor-hooks.json +2 -2
- package/extensions/dm-ponytail/hooks/ponytail-activate.js +105 -70
- package/extensions/dm-ponytail/hooks/ponytail-band-import.js +308 -0
- package/extensions/dm-ponytail/hooks/ponytail-config.js +4 -0
- package/extensions/dm-ponytail/hooks/ponytail-instructions.js +1 -1
- package/extensions/dm-ponytail/hooks/ponytail-map.js +7 -3
- package/extensions/dm-ponytail/hooks/ponytail-mode-tracker.js +41 -4
- package/extensions/dm-ponytail/hooks/ponytail-runtime.js +11 -8
- package/extensions/dm-ponytail/pi-extension/index.js +11 -3
- package/extensions/dm-ponytail/skills/ponytail/SKILL.md +1 -1
- package/extensions/dm-ponytail/skills/ponytail-debt/SKILL.md +4 -5
- package/extensions/dm-ponytail/skills/ponytail-gain/SKILL.md +0 -1
- package/extensions/dm-ponytail/skills/ponytail-help/SKILL.md +6 -0
- package/extensions/dm-skills-manager/package.json +1 -1
- package/extensions/dm-subagents/VISION.md +98 -0
- package/extensions/dm-subagents/agents/evidence-auditor.md +1 -0
- package/extensions/dm-subagents/agents/oracle.md +1 -0
- package/extensions/dm-subagents/agents/reviewer.md +1 -0
- package/extensions/dm-subagents/package.json +2 -1
- package/extensions/dm-subagents/scripts/build-package.mjs +128 -0
- package/extensions/dm-subagents/skills/council-mode/SKILL.md +1 -4
- package/extensions/dm-subagents/skills/dm-subagents/SKILL.md +130 -106
- package/extensions/dm-subagents/skills/dm-subagents/references/execution-controls.md +4 -3
- package/extensions/dm-subagents/skills/dm-subagents/references/orchestration.md +124 -0
- package/extensions/dm-subagents/skills/dm-subagents/references/prompting-and-roles.md +96 -295
- package/extensions/dm-subagents/src/agents/agent-management.js +14 -19
- package/extensions/dm-subagents/src/agents/agent-memory.js +2 -1
- package/extensions/dm-subagents/src/agents/agent-serializer.js +1 -2
- package/extensions/dm-subagents/src/agents/agents.js +7 -8
- package/extensions/dm-subagents/src/agents/frontmatter.js +34 -16
- package/extensions/dm-subagents/src/agents/skills.js +1 -1
- package/extensions/dm-subagents/src/api/background-work.js +8 -5
- package/extensions/dm-subagents/src/api/external-runs.js +3 -4
- package/extensions/dm-subagents/src/extension/active-runs-prompt.js +20 -0
- package/extensions/dm-subagents/src/extension/config.js +12 -0
- package/extensions/dm-subagents/src/extension/declaration-pinning.js +20 -3
- package/extensions/dm-subagents/src/extension/herdr-dm-bridge.js +24 -12
- package/extensions/dm-subagents/src/extension/index.js +125 -20
- package/extensions/dm-subagents/src/extension/public-execution.js +3 -0
- package/extensions/dm-subagents/src/extension/reply-workflow-script.js +3 -2
- package/extensions/dm-subagents/src/extension/rpc.js +5 -3
- package/extensions/dm-subagents/src/extension/schemas.js +6 -5
- package/extensions/dm-subagents/src/extension/subagent-guide.js +1 -2
- package/extensions/dm-subagents/src/extension/tool-activation.js +60 -26
- package/extensions/dm-subagents/src/extension/tool-description.js +2 -2
- package/extensions/dm-subagents/src/extension/upgrade-notice.js +5 -1
- package/extensions/dm-subagents/src/intercom/native-supervisor-channel.js +143 -15
- package/extensions/dm-subagents/src/missions/actions.js +4 -1
- package/extensions/dm-subagents/src/missions/lifecycle.js +32 -8
- package/extensions/dm-subagents/src/missions/store.js +1 -0
- package/extensions/dm-subagents/src/runs/background/active-async-capacity.js +15 -9
- package/extensions/dm-subagents/src/runs/background/async-execution.js +30 -16
- package/extensions/dm-subagents/src/runs/background/async-job-tracker.js +12 -3
- package/extensions/dm-subagents/src/runs/background/async-resume.js +5 -3
- package/extensions/dm-subagents/src/runs/background/async-status-snapshot.js +4 -2
- package/extensions/dm-subagents/src/runs/background/async-status.js +32 -10
- package/extensions/dm-subagents/src/runs/background/auto-drain.js +2 -1
- package/extensions/dm-subagents/src/runs/background/await-async-run.js +2 -7
- package/extensions/dm-subagents/src/runs/background/boot-id.js +36 -0
- package/extensions/dm-subagents/src/runs/background/chain-root-attachment.js +4 -4
- package/extensions/dm-subagents/src/runs/background/index-segment.js +1 -1
- package/extensions/dm-subagents/src/runs/background/inspect-rpc.js +17 -3
- package/extensions/dm-subagents/src/runs/background/interrupted-elsewhere.js +55 -0
- package/extensions/dm-subagents/src/runs/background/notify.js +98 -10
- package/extensions/dm-subagents/src/runs/background/result-delivery-ownership.js +20 -22
- package/extensions/dm-subagents/src/runs/background/result-files.js +9 -6
- package/extensions/dm-subagents/src/runs/background/result-watcher.js +32 -17
- package/extensions/dm-subagents/src/runs/background/resume-guidance.js +2 -1
- package/extensions/dm-subagents/src/runs/background/retained-children.js +1 -1
- package/extensions/dm-subagents/src/runs/background/run-child-session.js +40 -21
- package/extensions/dm-subagents/src/runs/background/run-status.js +12 -5
- package/extensions/dm-subagents/src/runs/background/runner-aliases.js +7 -5
- package/extensions/dm-subagents/src/runs/background/runner-child-launch.js +1 -2
- package/extensions/dm-subagents/src/runs/background/stale-run-reconciler.js +89 -21
- package/extensions/dm-subagents/src/runs/background/subagent-runner-bootstrap.js +2 -0
- package/extensions/dm-subagents/src/runs/background/subagent-runner.js +190 -244
- package/extensions/dm-subagents/src/runs/background/subagent-wait.js +5 -2
- package/extensions/dm-subagents/src/runs/background/terminal-run-index.js +39 -4
- package/extensions/dm-subagents/src/runs/background/wait-subscriptions.js +5 -1
- package/extensions/dm-subagents/src/runs/background/workflow-terminal-proof.js +28 -2
- package/extensions/dm-subagents/src/runs/foreground/async-dismiss-action.js +2 -1
- package/extensions/dm-subagents/src/runs/foreground/async-steering-action.js +21 -7
- package/extensions/dm-subagents/src/runs/foreground/async-stop-action.js +10 -8
- package/extensions/dm-subagents/src/runs/foreground/command-action.js +2 -1
- package/extensions/dm-subagents/src/runs/foreground/execution.js +107 -66
- package/extensions/dm-subagents/src/runs/foreground/foreground-history.js +111 -32
- package/extensions/dm-subagents/src/runs/foreground/prompt-audit.js +2 -2
- package/extensions/dm-subagents/src/runs/foreground/subagent-executor.js +377 -126
- package/extensions/dm-subagents/src/runs/shared/async-status-projection.js +18 -1
- package/extensions/dm-subagents/src/runs/shared/child-commands.js +7 -1
- package/extensions/dm-subagents/src/runs/shared/child-runtime-config.js +1 -0
- package/extensions/dm-subagents/src/runs/shared/child-session.js +184 -65
- package/extensions/dm-subagents/src/runs/shared/child-tool-plan.js +14 -3
- package/extensions/dm-subagents/src/runs/shared/dm-spawn.js +71 -25
- package/extensions/dm-subagents/src/runs/shared/external-cli-runner.js +2 -1
- package/extensions/dm-subagents/src/runs/shared/herdr-connection.js +20 -10
- package/extensions/dm-subagents/src/runs/shared/herdr-external-adapters.js +1 -1
- package/extensions/dm-subagents/src/runs/shared/herdr-machine.js +50 -8
- package/extensions/dm-subagents/src/runs/shared/herdr-pane-host.js +212 -0
- package/extensions/dm-subagents/src/runs/shared/herdr-placed-run.js +47 -503
- package/extensions/dm-subagents/src/runs/shared/local-machine-access.js +29 -0
- package/extensions/dm-subagents/src/runs/shared/long-running-guard.js +70 -17
- package/extensions/dm-subagents/src/runs/shared/model-resolution.js +7 -1
- package/extensions/dm-subagents/src/runs/shared/nested-events.js +2 -0
- package/extensions/dm-subagents/src/runs/shared/orca-progress-tabs.js +2 -24
- package/extensions/dm-subagents/src/runs/shared/parallel-handoff.js +9 -6
- package/extensions/dm-subagents/src/runs/shared/partial-output.js +5 -0
- package/extensions/dm-subagents/src/runs/shared/placed-run-owner.js +157 -0
- package/extensions/dm-subagents/src/runs/shared/placement-host.js +166 -0
- package/extensions/dm-subagents/src/runs/shared/rex-machine.js +75 -0
- package/extensions/dm-subagents/src/runs/shared/rex-pane-host.js +306 -0
- package/extensions/dm-subagents/src/runs/shared/run-ownership.js +7 -0
- package/extensions/dm-subagents/src/runs/shared/single-output.js +29 -6
- package/extensions/dm-subagents/src/runs/shared/structured-output.js +1 -0
- package/extensions/dm-subagents/src/runs/shared/subagent-control.js +2 -1
- package/extensions/dm-subagents/src/runs/shared/subagent-prompt-runtime.js +177 -17
- package/extensions/dm-subagents/src/runs/shared/tool-budget.js +1 -1
- package/extensions/dm-subagents/src/shared/accessible-dir.js +1 -1
- package/extensions/dm-subagents/src/shared/child-transcript.js +1 -1
- package/extensions/dm-subagents/src/shared/completion-owner.js +1 -0
- package/extensions/dm-subagents/src/shared/dm-declarations.js +36 -1
- package/extensions/dm-subagents/src/shared/dm-safeguards.js +1 -1
- package/extensions/dm-subagents/src/shared/dm-settlement.js +2 -0
- package/extensions/dm-subagents/src/shared/extension-context.js +3 -0
- package/extensions/dm-subagents/src/shared/file-lease.js +4 -1
- package/extensions/dm-subagents/src/shared/fork-context.js +21 -8
- package/extensions/dm-subagents/src/shared/parent-wake.js +6 -11
- package/extensions/dm-subagents/src/shared/provider-diagnostics.js +59 -0
- package/extensions/dm-subagents/src/shared/session-identity.js +24 -0
- package/extensions/dm-subagents/src/shared/session-succession.js +18 -0
- package/extensions/dm-subagents/src/shared/types.js +5 -4
- package/extensions/dm-subagents/src/shared/utils.js +13 -0
- package/extensions/dm-subagents/src/slash/delegation-adapters.js +8 -1
- package/extensions/dm-subagents/src/slash/prompt-template-bridge.js +2 -1
- package/extensions/dm-subagents/src/slash/slash-commands.js +6 -4
- package/extensions/dm-subagents/src/slash/subagents-admin.js +3 -2
- package/extensions/dm-subagents/src/tui/dm-mouse-region.js +9 -1
- package/extensions/dm-subagents/src/tui/fleet-layout.js +19 -0
- package/extensions/dm-subagents/src/tui/fleet-status.js +20 -3
- package/extensions/dm-subagents/src/tui/fleet-viewport.js +59 -0
- package/extensions/dm-subagents/src/tui/fleet.js +92 -69
- package/extensions/dm-subagents/src/tui/render.js +45 -19
- package/extensions/dm-subagents/src/tui/subagent-messages.js +1 -0
- package/extensions/dm-subagents/src/watchdog/change-signature.js +1 -3
- package/extensions/dm-subagents/src/watchdog/diff-tool.js +7 -3
- package/extensions/dm-subagents/src/watchdog/permission-arbiter.js +15 -6
- package/extensions/dm-subagents/src/watchdog/register-main.js +10 -9
- package/extensions/dm-subagents/src/watchdog/review.js +9 -1
- package/extensions/dm-subagents/src/watchdog/runtime.js +3 -5
- package/extensions/dm-subagents/src/workflows/scripted-workflow.js +33 -6
- package/extensions/dm-subagents/src/workflows/structured-workflow-scripts.js +21 -8
- package/extensions/dm-subagents/src/workflows/workflow-auto-resume.js +81 -0
- package/extensions/dm-subagents/src/workflows/workflow-child-summary.js +18 -2
- package/extensions/dm-subagents/src/workflows/workflow-launch-record.js +45 -0
- package/extensions/dm-subagents/src/workflows/workflow-resources.js +2 -2
- package/extensions/dm-subagents/src/workflows/workflow-resume-claim.js +171 -0
- package/extensions/dm-subagents/src/workflows/workflow-resume.js +88 -0
- package/extensions/dm-subagents/src/workflows/workflow-reuse.js +72 -3
- package/extensions/dm-subagents/src/workflows/workflow-revival.js +1 -1
- package/extensions/dm-subagents/src/workflows/workflow-stop-cause.js +5 -0
- package/extensions/dm-tty/index.js +4 -2
- package/extensions/dm-tty/standalone.js +4 -1
- package/extensions/dm-web-access/.github/workflows/test.yml +28 -0
- package/extensions/dm-web-access/anysearch.js +3 -3
- package/extensions/dm-web-access/bocha.js +3 -3
- package/extensions/dm-web-access/brave-rate-limit.js +2 -2
- package/extensions/dm-web-access/brave.js +5 -10
- package/extensions/dm-web-access/brightdata-unlocker.js +2 -2
- package/extensions/dm-web-access/brightdata.js +3 -3
- package/extensions/dm-web-access/ceramic.js +2 -2
- package/extensions/dm-web-access/chrome-cookies.js +1 -1
- package/extensions/dm-web-access/claim-judge.js +147 -0
- package/extensions/dm-web-access/content-find.js +1 -1
- package/extensions/dm-web-access/credential-source.js +42 -5
- package/extensions/dm-web-access/curator-page.js +8 -2
- package/extensions/dm-web-access/curator-server.js +6 -0
- package/extensions/dm-web-access/deepseek.js +331 -0
- package/extensions/dm-web-access/duckduckgo-rate-limit.js +75 -0
- package/extensions/dm-web-access/duckduckgo.js +49 -43
- package/extensions/dm-web-access/endpoint-pdf-extract.js +30 -77
- package/extensions/dm-web-access/eval/claim-judge.mjs +96 -0
- package/extensions/dm-web-access/eval/field-extract.mjs +84 -0
- package/extensions/dm-web-access/eval/fixtures/claims-calibration.json +1026 -0
- package/extensions/dm-web-access/eval/fixtures/claims-holdout.json +896 -0
- package/extensions/dm-web-access/eval/fixtures/claims-sibling-holdout.json +226 -0
- package/extensions/dm-web-access/eval/fixtures/extract-calibration.json +12 -0
- package/extensions/dm-web-access/eval/fixtures/extract-holdout.json +172 -0
- package/extensions/dm-web-access/eval/fixtures/offtopic-calibration.json +103 -0
- package/extensions/dm-web-access/eval/fixtures/offtopic-holdout.json +307 -0
- package/extensions/dm-web-access/eval/offtopic-judge.mjs +66 -0
- package/extensions/dm-web-access/evidence/CONTRACT-EVIDENCE.md +496 -0
- package/extensions/dm-web-access/evidence/contract-probe.mjs +127 -0
- package/extensions/dm-web-access/exa.js +42 -4
- package/extensions/dm-web-access/extract.js +110 -19
- package/extensions/dm-web-access/fetch-params.js +12 -3
- package/extensions/dm-web-access/field-extract.js +324 -0
- package/extensions/dm-web-access/gemini-adc.js +47 -1
- package/extensions/dm-web-access/gemini-api.js +11 -0
- package/extensions/dm-web-access/gemini-search.js +204 -196
- package/extensions/dm-web-access/github-extract.js +1 -1
- package/extensions/dm-web-access/github-issue-pr.js +6 -6
- package/extensions/dm-web-access/index.js +159 -112
- package/extensions/dm-web-access/jina-search.js +6 -4
- package/extensions/dm-web-access/kagi.js +4 -4
- package/extensions/dm-web-access/keenable.js +2 -2
- package/extensions/dm-web-access/linkup.js +160 -0
- package/extensions/dm-web-access/mistral-search.js +4 -4
- package/extensions/dm-web-access/ninerouter.js +100 -0
- package/extensions/dm-web-access/offtopic-judge.js +56 -0
- package/extensions/dm-web-access/ollama.js +4 -4
- package/extensions/dm-web-access/openai-search.js +32 -12
- package/extensions/dm-web-access/package.json +1 -1
- package/extensions/dm-web-access/page-query.js +7 -4
- package/extensions/dm-web-access/parallel.js +6 -7
- package/extensions/dm-web-access/pdf-extract.js +1 -3
- package/extensions/dm-web-access/perplexity.js +6 -5
- package/extensions/dm-web-access/querit.js +3 -3
- package/extensions/dm-web-access/query-rewrite.js +32 -8
- package/extensions/dm-web-access/scripts/dm-extensions-dist.js +16 -0
- package/extensions/dm-web-access/scripts/publish.js +38 -0
- package/extensions/dm-web-access/search1api.js +3 -3
- package/extensions/dm-web-access/searchinfinity.js +3 -3
- package/extensions/dm-web-access/searxng.js +2 -1
- package/extensions/dm-web-access/serpapi.js +6 -5
- package/extensions/dm-web-access/serpbase.js +4 -4
- package/extensions/dm-web-access/serpdive.js +3 -3
- package/extensions/dm-web-access/serper.js +5 -4
- package/extensions/dm-web-access/serply.js +2 -2
- package/extensions/dm-web-access/source-check.js +22 -14
- package/extensions/dm-web-access/ssrf-protection.js +29 -4
- package/extensions/dm-web-access/summary-model-scope.js +11 -1
- package/extensions/dm-web-access/summary-review.js +36 -43
- package/extensions/dm-web-access/tool-activation.js +11 -2
- package/extensions/dm-web-access/upgrade-notice.js +41 -0
- package/extensions/dm-web-access/utils.js +51 -3
- package/extensions/dm-web-access/valyu.js +3 -3
- package/extensions/dm-web-access/video-extract.js +3 -2
- package/extensions/dm-web-access/web-tool-core.js +161 -51
- package/extensions/dm-web-access/xai-search.js +44 -9
- package/extensions/dm-web-access/xcrawl.js +3 -3
- package/extensions/dm-web-access/you.js +2 -2
- package/package.json +4 -4
- package/extensions/dm-lens/dist/clients/actionable-warnings-logger.js +0 -24
- package/extensions/dm-lens/dist/clients/actionable-warnings.js +0 -1062
- package/extensions/dm-lens/dist/clients/advisory-provenance.js +0 -387
- package/extensions/dm-lens/dist/clients/agent-behavior-client.js +0 -94
- package/extensions/dm-lens/dist/clients/agent-nudge.js +0 -253
- package/extensions/dm-lens/dist/clients/analysed-root.js +0 -1
- package/extensions/dm-lens/dist/clients/analysis-root.js +0 -100
- package/extensions/dm-lens/dist/clients/ast-grep-client.js +0 -587
- package/extensions/dm-lens/dist/clients/ast-grep-rule-manager.js +0 -137
- package/extensions/dm-lens/dist/clients/ast-grep-tool-logger.js +0 -85
- package/extensions/dm-lens/dist/clients/ast-grep-types.js +0 -1
- package/extensions/dm-lens/dist/clients/ast-grep-yaml-synth.js +0 -109
- package/extensions/dm-lens/dist/clients/atomic-write-staging.js +0 -66
- package/extensions/dm-lens/dist/clients/atomic-write.js +0 -37
- package/extensions/dm-lens/dist/clients/availability-probe-flight.js +0 -11
- package/extensions/dm-lens/dist/clients/bash-file-access.js +0 -830
- package/extensions/dm-lens/dist/clients/biome-client.js +0 -223
- package/extensions/dm-lens/dist/clients/blocker-freshness.js +0 -377
- package/extensions/dm-lens/dist/clients/blocker-past-eof.js +0 -49
- package/extensions/dm-lens/dist/clients/bootstrap.js +0 -246
- package/extensions/dm-lens/dist/clients/bounded-cache.js +0 -105
- package/extensions/dm-lens/dist/clients/bounded-pid-file-lock.js +0 -275
- package/extensions/dm-lens/dist/clients/bounded-telemetry.js +0 -107
- package/extensions/dm-lens/dist/clients/build-identity.js +0 -45
- package/extensions/dm-lens/dist/clients/bundled-resource-health.js +0 -41
- package/extensions/dm-lens/dist/clients/bus-events-logger.js +0 -48
- package/extensions/dm-lens/dist/clients/bus-publish.js +0 -117
- package/extensions/dm-lens/dist/clients/cache/rule-cache.js +0 -87
- package/extensions/dm-lens/dist/clients/cache-manager.js +0 -428
- package/extensions/dm-lens/dist/clients/cache-observability.js +0 -847
- package/extensions/dm-lens/dist/clients/call-graph.js +0 -628
- package/extensions/dm-lens/dist/clients/cargo-manifest.js +0 -171
- package/extensions/dm-lens/dist/clients/cascade-budget.js +0 -52
- package/extensions/dm-lens/dist/clients/cascade-format.js +0 -160
- package/extensions/dm-lens/dist/clients/cascade-logger.js +0 -22
- package/extensions/dm-lens/dist/clients/cascade-types.js +0 -1
- package/extensions/dm-lens/dist/clients/child-unref.js +0 -59
- package/extensions/dm-lens/dist/clients/code-quality-warnings.js +0 -192
- package/extensions/dm-lens/dist/clients/codebase-model.js +0 -110
- package/extensions/dm-lens/dist/clients/collateral-test-role.js +0 -8
- package/extensions/dm-lens/dist/clients/complexity-client.js +0 -398
- package/extensions/dm-lens/dist/clients/config-core/deny.js +0 -117
- package/extensions/dm-lens/dist/clients/config-core/index.js +0 -2
- package/extensions/dm-lens/dist/clients/config-core/merge.js +0 -228
- package/extensions/dm-lens/dist/clients/config-core/normalize.js +0 -226
- package/extensions/dm-lens/dist/clients/config-core/process-spec.js +0 -147
- package/extensions/dm-lens/dist/clients/config-core/provenance.js +0 -54
- package/extensions/dm-lens/dist/clients/config-core/records.js +0 -79
- package/extensions/dm-lens/dist/clients/config-core/resolve.js +0 -48
- package/extensions/dm-lens/dist/clients/config-core/safe-object.js +0 -22
- package/extensions/dm-lens/dist/clients/config-core/schema.js +0 -93
- package/extensions/dm-lens/dist/clients/config-diagnostic-codes.js +0 -90
- package/extensions/dm-lens/dist/clients/config-locations.js +0 -175
- package/extensions/dm-lens/dist/clients/config-resolve.js +0 -359
- package/extensions/dm-lens/dist/clients/config-schema.js +0 -230
- package/extensions/dm-lens/dist/clients/config-warn.js +0 -146
- package/extensions/dm-lens/dist/clients/confirmed-delete.js +0 -11
- package/extensions/dm-lens/dist/clients/console-guard-install.js +0 -4
- package/extensions/dm-lens/dist/clients/cooperative-budget.js +0 -36
- package/extensions/dm-lens/dist/clients/custom-rule-locations.js +0 -28
- package/extensions/dm-lens/dist/clients/dead-code-client.js +0 -408
- package/extensions/dm-lens/dist/clients/dead-code-logger.js +0 -18
- package/extensions/dm-lens/dist/clients/deadline-utils.js +0 -117
- package/extensions/dm-lens/dist/clients/debug-handles.js +0 -121
- package/extensions/dm-lens/dist/clients/debug-heap.js +0 -80
- package/extensions/dm-lens/dist/clients/deferred-lsp-work.js +0 -33
- package/extensions/dm-lens/dist/clients/deferred-runner-blockers.js +0 -106
- package/extensions/dm-lens/dist/clients/deferred-test-targets.js +0 -31
- package/extensions/dm-lens/dist/clients/degradation-ledger.js +0 -289
- package/extensions/dm-lens/dist/clients/demoted-finding-render.js +0 -64
- package/extensions/dm-lens/dist/clients/dependency-checker.js +0 -534
- package/extensions/dm-lens/dist/clients/deps/ast-grep-napi.js +0 -17
- package/extensions/dm-lens/dist/clients/deps/dm-host-deps.js +0 -10
- package/extensions/dm-lens/dist/clients/deps/dm-tui-compat.js +0 -58
- package/extensions/dm-lens/dist/clients/deps/js-yaml.js +0 -7
- package/extensions/dm-lens/dist/clients/deps/minimatch.js +0 -6
- package/extensions/dm-lens/dist/clients/deps/pidusage.js +0 -5
- package/extensions/dm-lens/dist/clients/deps/typebox.js +0 -5
- package/extensions/dm-lens/dist/clients/deps/vscode-jsonrpc.js +0 -8
- package/extensions/dm-lens/dist/clients/deps/web-tree-sitter.js +0 -11
- package/extensions/dm-lens/dist/clients/diagnostic-dispositions.js +0 -318
- package/extensions/dm-lens/dist/clients/diagnostic-line-freshness.js +0 -142
- package/extensions/dm-lens/dist/clients/diagnostic-logger.js +0 -60
- package/extensions/dm-lens/dist/clients/diagnostic-tracker.js +0 -89
- package/extensions/dm-lens/dist/clients/diagnostics-publish.js +0 -134
- package/extensions/dm-lens/dist/clients/dispatch/adopted-root-runners.js +0 -22
- package/extensions/dm-lens/dist/clients/dispatch/ast-grep-catalog.js +0 -16
- package/extensions/dm-lens/dist/clients/dispatch/auxiliary-lsp.js +0 -158
- package/extensions/dm-lens/dist/clients/dispatch/collect-later-tier.js +0 -25
- package/extensions/dm-lens/dist/clients/dispatch/diagnostic-taxonomy.js +0 -58
- package/extensions/dm-lens/dist/clients/dispatch/dispatcher.js +0 -1017
- package/extensions/dm-lens/dist/clients/dispatch/fact-provider-types.js +0 -1
- package/extensions/dm-lens/dist/clients/dispatch/fact-rule-runner.js +0 -17
- package/extensions/dm-lens/dist/clients/dispatch/fact-runner.js +0 -18
- package/extensions/dm-lens/dist/clients/dispatch/fact-scheduler.js +0 -52
- package/extensions/dm-lens/dist/clients/dispatch/fact-store.js +0 -199
- package/extensions/dm-lens/dist/clients/dispatch/facts/comment-facts.js +0 -23
- package/extensions/dm-lens/dist/clients/dispatch/facts/file-content.js +0 -18
- package/extensions/dm-lens/dist/clients/dispatch/facts/function-facts.js +0 -281
- package/extensions/dm-lens/dist/clients/dispatch/facts/import-facts.js +0 -169
- package/extensions/dm-lens/dist/clients/dispatch/facts/tree-sitter-facts.js +0 -19
- package/extensions/dm-lens/dist/clients/dispatch/facts/try-catch-facts.js +0 -95
- package/extensions/dm-lens/dist/clients/dispatch/finding-policy.js +0 -164
- package/extensions/dm-lens/dist/clients/dispatch/indent-detect.js +0 -227
- package/extensions/dm-lens/dist/clients/dispatch/inline-suppressions.js +0 -52
- package/extensions/dm-lens/dist/clients/dispatch/integration.js +0 -1502
- package/extensions/dm-lens/dist/clients/dispatch/known-runner-ids.js +0 -13
- package/extensions/dm-lens/dist/clients/dispatch/lazy.js +0 -8
- package/extensions/dm-lens/dist/clients/dispatch/pending-runner-findings.js +0 -130
- package/extensions/dm-lens/dist/clients/dispatch/plan.js +0 -284
- package/extensions/dm-lens/dist/clients/dispatch/priorities.js +0 -14
- package/extensions/dm-lens/dist/clients/dispatch/rule-id-normalize.js +0 -49
- package/extensions/dm-lens/dist/clients/dispatch/rule-ignores.js +0 -21
- package/extensions/dm-lens/dist/clients/dispatch/rule-policy.js +0 -102
- package/extensions/dm-lens/dist/clients/dispatch/rules/async-noise.js +0 -31
- package/extensions/dm-lens/dist/clients/dispatch/rules/async-unnecessary-wrapper.js +0 -27
- package/extensions/dm-lens/dist/clients/dispatch/rules/cors-wildcard.js +0 -35
- package/extensions/dm-lens/dist/clients/dispatch/rules/error-obscuring.js +0 -29
- package/extensions/dm-lens/dist/clients/dispatch/rules/error-swallowing.js +0 -29
- package/extensions/dm-lens/dist/clients/dispatch/rules/framework-call-noise.js +0 -31
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-complexity.js +0 -56
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-fan-out.js +0 -45
- package/extensions/dm-lens/dist/clients/dispatch/rules/high-import-coupling.js +0 -31
- package/extensions/dm-lens/dist/clients/dispatch/rules/missing-error-propagation.js +0 -45
- package/extensions/dm-lens/dist/clients/dispatch/rules/no-commented-credentials.js +0 -46
- package/extensions/dm-lens/dist/clients/dispatch/rules/pass-through-wrappers.js +0 -38
- package/extensions/dm-lens/dist/clients/dispatch/rules/placeholder-comments.js +0 -40
- package/extensions/dm-lens/dist/clients/dispatch/rules/unsafe-boundary.js +0 -101
- package/extensions/dm-lens/dist/clients/dispatch/runner-context.js +0 -46
- package/extensions/dm-lens/dist/clients/dispatch/runners/actionlint.js +0 -98
- package/extensions/dm-lens/dist/clients/dispatch/runners/ast-grep-napi.js +0 -694
- package/extensions/dm-lens/dist/clients/dispatch/runners/biome-check.js +0 -205
- package/extensions/dm-lens/dist/clients/dispatch/runners/cpp-check.js +0 -190
- package/extensions/dm-lens/dist/clients/dispatch/runners/credo.js +0 -66
- package/extensions/dm-lens/dist/clients/dispatch/runners/cue-vet.js +0 -171
- package/extensions/dm-lens/dist/clients/dispatch/runners/dart-analyze.js +0 -151
- package/extensions/dm-lens/dist/clients/dispatch/runners/detekt.js +0 -157
- package/extensions/dm-lens/dist/clients/dispatch/runners/dotnet-build.js +0 -157
- package/extensions/dm-lens/dist/clients/dispatch/runners/elixir-check.js +0 -153
- package/extensions/dm-lens/dist/clients/dispatch/runners/eslint.js +0 -99
- package/extensions/dm-lens/dist/clients/dispatch/runners/fact-rules.js +0 -20
- package/extensions/dm-lens/dist/clients/dispatch/runners/fish-indent.js +0 -66
- package/extensions/dm-lens/dist/clients/dispatch/runners/gleam-check.js +0 -110
- package/extensions/dm-lens/dist/clients/dispatch/runners/go-vet.js +0 -52
- package/extensions/dm-lens/dist/clients/dispatch/runners/golangci-lint.js +0 -89
- package/extensions/dm-lens/dist/clients/dispatch/runners/hadolint.js +0 -83
- package/extensions/dm-lens/dist/clients/dispatch/runners/helm-lint.js +0 -144
- package/extensions/dm-lens/dist/clients/dispatch/runners/helm-render.js +0 -593
- package/extensions/dm-lens/dist/clients/dispatch/runners/htmlhint.js +0 -103
- package/extensions/dm-lens/dist/clients/dispatch/runners/index.js +0 -100
- package/extensions/dm-lens/dist/clients/dispatch/runners/javac.js +0 -82
- package/extensions/dm-lens/dist/clients/dispatch/runners/ktlint.js +0 -93
- package/extensions/dm-lens/dist/clients/dispatch/runners/lsp.js +0 -226
- package/extensions/dm-lens/dist/clients/dispatch/runners/markdownlint.js +0 -129
- package/extensions/dm-lens/dist/clients/dispatch/runners/mypy.js +0 -70
- package/extensions/dm-lens/dist/clients/dispatch/runners/oxlint.js +0 -305
- package/extensions/dm-lens/dist/clients/dispatch/runners/php-lint.js +0 -66
- package/extensions/dm-lens/dist/clients/dispatch/runners/phpstan.js +0 -90
- package/extensions/dm-lens/dist/clients/dispatch/runners/prisma-validate.js +0 -66
- package/extensions/dm-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +0 -307
- package/extensions/dm-lens/dist/clients/dispatch/runners/pyright.js +0 -118
- package/extensions/dm-lens/dist/clients/dispatch/runners/rubocop.js +0 -79
- package/extensions/dm-lens/dist/clients/dispatch/runners/ruff.js +0 -69
- package/extensions/dm-lens/dist/clients/dispatch/runners/rust-clippy.js +0 -166
- package/extensions/dm-lens/dist/clients/dispatch/runners/shellcheck.js +0 -177
- package/extensions/dm-lens/dist/clients/dispatch/runners/shfmt.js +0 -85
- package/extensions/dm-lens/dist/clients/dispatch/runners/spellcheck.js +0 -74
- package/extensions/dm-lens/dist/clients/dispatch/runners/spotbugs.js +0 -208
- package/extensions/dm-lens/dist/clients/dispatch/runners/sqlfluff.js +0 -136
- package/extensions/dm-lens/dist/clients/dispatch/runners/stylelint.js +0 -118
- package/extensions/dm-lens/dist/clients/dispatch/runners/swiftlint.js +0 -143
- package/extensions/dm-lens/dist/clients/dispatch/runners/taplo.js +0 -108
- package/extensions/dm-lens/dist/clients/dispatch/runners/terragrunt.js +0 -110
- package/extensions/dm-lens/dist/clients/dispatch/runners/tflint.js +0 -104
- package/extensions/dm-lens/dist/clients/dispatch/runners/tree-sitter.js +0 -521
- package/extensions/dm-lens/dist/clients/dispatch/runners/trivy-config.js +0 -155
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/availability-policy.js +0 -285
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/candidate-probe.js +0 -61
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +0 -61
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/lazy-installer.js +0 -130
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +0 -1143
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/spawn-outcome.js +0 -40
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/tool-failure.js +0 -120
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +0 -88
- package/extensions/dm-lens/dist/clients/dispatch/runners/utils.js +0 -8
- package/extensions/dm-lens/dist/clients/dispatch/runners/vale.js +0 -106
- package/extensions/dm-lens/dist/clients/dispatch/runners/yaml-rule-parser.js +0 -170
- package/extensions/dm-lens/dist/clients/dispatch/runners/yamllint.js +0 -83
- package/extensions/dm-lens/dist/clients/dispatch/runners/zig-check.js +0 -72
- package/extensions/dm-lens/dist/clients/dispatch/suppress-writer.js +0 -57
- package/extensions/dm-lens/dist/clients/dispatch/tool-profile.js +0 -30
- package/extensions/dm-lens/dist/clients/dispatch/types.js +0 -27
- package/extensions/dm-lens/dist/clients/dispatch/utils/format-utils.js +0 -58
- package/extensions/dm-lens/dist/clients/dispatch/utils/lsp-diagnostics.js +0 -31
- package/extensions/dm-lens/dist/clients/disposition-logger.js +0 -19
- package/extensions/dm-lens/dist/clients/disposition-publish.js +0 -88
- package/extensions/dm-lens/dist/clients/durable-store.js +0 -77
- package/extensions/dm-lens/dist/clients/effective-config.js +0 -170
- package/extensions/dm-lens/dist/clients/env-utils.js +0 -26
- package/extensions/dm-lens/dist/clients/ephemeral-root.js +0 -67
- package/extensions/dm-lens/dist/clients/error-class.js +0 -3
- package/extensions/dm-lens/dist/clients/eval-timestamp.js +0 -2
- package/extensions/dm-lens/dist/clients/event-loop-hold.js +0 -119
- package/extensions/dm-lens/dist/clients/event-loop-monitor.js +0 -84
- package/extensions/dm-lens/dist/clients/extension-log.js +0 -230
- package/extensions/dm-lens/dist/clients/extension-mode.js +0 -20
- package/extensions/dm-lens/dist/clients/feature-hints.js +0 -88
- package/extensions/dm-lens/dist/clients/file-kinds.js +0 -313
- package/extensions/dm-lens/dist/clients/file-mutation-queue.js +0 -95
- package/extensions/dm-lens/dist/clients/file-role.js +0 -50
- package/extensions/dm-lens/dist/clients/file-time.js +0 -112
- package/extensions/dm-lens/dist/clients/file-utils.js +0 -706
- package/extensions/dm-lens/dist/clients/finding-delivery-gate.js +0 -132
- package/extensions/dm-lens/dist/clients/finding-identity.js +0 -23
- package/extensions/dm-lens/dist/clients/fix-run-restore.js +0 -413
- package/extensions/dm-lens/dist/clients/fix-worklog.js +0 -75
- package/extensions/dm-lens/dist/clients/format-events-publish.js +0 -310
- package/extensions/dm-lens/dist/clients/format-service.js +0 -159
- package/extensions/dm-lens/dist/clients/formatters-lazy.js +0 -8
- package/extensions/dm-lens/dist/clients/formatters.js +0 -1367
- package/extensions/dm-lens/dist/clients/freshness-cadence.js +0 -1
- package/extensions/dm-lens/dist/clients/freshness.js +0 -8
- package/extensions/dm-lens/dist/clients/generated-artifacts.js +0 -209
- package/extensions/dm-lens/dist/clients/generation-guard.js +0 -147
- package/extensions/dm-lens/dist/clients/generation-lock.js +0 -181
- package/extensions/dm-lens/dist/clients/git-guard.js +0 -786
- package/extensions/dm-lens/dist/clients/git-tracked-ignore.js +0 -120
- package/extensions/dm-lens/dist/clients/gitleaks-client.js +0 -290
- package/extensions/dm-lens/dist/clients/go-client.js +0 -47
- package/extensions/dm-lens/dist/clients/govulncheck-client.js +0 -411
- package/extensions/dm-lens/dist/clients/gradle-ktfmt-style.js +0 -177
- package/extensions/dm-lens/dist/clients/grammar-source.js +0 -229
- package/extensions/dm-lens/dist/clients/grammar-wasm-imports.js +0 -48
- package/extensions/dm-lens/dist/clients/gzip-stage-write.js +0 -93
- package/extensions/dm-lens/dist/clients/hard-failure-summary.js +0 -28
- package/extensions/dm-lens/dist/clients/hashline-anchor.js +0 -222
- package/extensions/dm-lens/dist/clients/hook-budgets.js +0 -17
- package/extensions/dm-lens/dist/clients/host-edit-normalize.js +0 -87
- package/extensions/dm-lens/dist/clients/host-ports.js +0 -35
- package/extensions/dm-lens/dist/clients/indent-retarget.js +0 -102
- package/extensions/dm-lens/dist/clients/inline-blocker-dispositions.js +0 -103
- package/extensions/dm-lens/dist/clients/inline-blocker-fields.js +0 -8
- package/extensions/dm-lens/dist/clients/install-diagnostics.js +0 -135
- package/extensions/dm-lens/dist/clients/installer/index.js +0 -3935
- package/extensions/dm-lens/dist/clients/installer/managed-tool-refresh-session.js +0 -17
- package/extensions/dm-lens/dist/clients/installer/managed-tool-refresh.js +0 -522
- package/extensions/dm-lens/dist/clients/instance-reaper-state.js +0 -3
- package/extensions/dm-lens/dist/clients/instance-reaper.js +0 -682
- package/extensions/dm-lens/dist/clients/instance-registry-lock.js +0 -166
- package/extensions/dm-lens/dist/clients/instance-registry-tail.js +0 -17
- package/extensions/dm-lens/dist/clients/instance-registry.js +0 -595
- package/extensions/dm-lens/dist/clients/io-bridge-contract.js +0 -7
- package/extensions/dm-lens/dist/clients/io-bridge.js +0 -357
- package/extensions/dm-lens/dist/clients/jscpd-client.js +0 -300
- package/extensions/dm-lens/dist/clients/json-cache-read.js +0 -25
- package/extensions/dm-lens/dist/clients/knip-client.js +0 -534
- package/extensions/dm-lens/dist/clients/knip-scan-roots.js +0 -26
- package/extensions/dm-lens/dist/clients/language-policy.js +0 -244
- package/extensions/dm-lens/dist/clients/language-profile.js +0 -263
- package/extensions/dm-lens/dist/clients/language-registry.js +0 -427
- package/extensions/dm-lens/dist/clients/latency-logger.js +0 -202
- package/extensions/dm-lens/dist/clients/lazy-import.js +0 -14
- package/extensions/dm-lens/dist/clients/ledger-bounds.js +0 -21
- package/extensions/dm-lens/dist/clients/lens-config.js +0 -246
- package/extensions/dm-lens/dist/clients/lens-engine.js +0 -181
- package/extensions/dm-lens/dist/clients/lens-events.js +0 -105
- package/extensions/dm-lens/dist/clients/lens-flag-registry.js +0 -292
- package/extensions/dm-lens/dist/clients/lens-map.js +0 -980
- package/extensions/dm-lens/dist/clients/live-bus-emitter.js +0 -53
- package/extensions/dm-lens/dist/clients/log-cleanup.js +0 -138
- package/extensions/dm-lens/dist/clients/lsp/aggregation.js +0 -89
- package/extensions/dm-lens/dist/clients/lsp/auxiliary-lifecycle.js +0 -23
- package/extensions/dm-lens/dist/clients/lsp/capabilities.js +0 -94
- package/extensions/dm-lens/dist/clients/lsp/cascade-tier.js +0 -208
- package/extensions/dm-lens/dist/clients/lsp/client.js +0 -2943
- package/extensions/dm-lens/dist/clients/lsp/config.js +0 -471
- package/extensions/dm-lens/dist/clients/lsp/content-limits.js +0 -21
- package/extensions/dm-lens/dist/clients/lsp/diagnostic-binding.js +0 -79
- package/extensions/dm-lens/dist/clients/lsp/document-drift.js +0 -324
- package/extensions/dm-lens/dist/clients/lsp/edits.js +0 -982
- package/extensions/dm-lens/dist/clients/lsp/grouping.js +0 -38
- package/extensions/dm-lens/dist/clients/lsp/index.js +0 -4639
- package/extensions/dm-lens/dist/clients/lsp/inferred-project.js +0 -121
- package/extensions/dm-lens/dist/clients/lsp/jvm-runtime.js +0 -194
- package/extensions/dm-lens/dist/clients/lsp/language.js +0 -23
- package/extensions/dm-lens/dist/clients/lsp/launch.js +0 -564
- package/extensions/dm-lens/dist/clients/lsp/lombok.js +0 -146
- package/extensions/dm-lens/dist/clients/lsp/path-utils.js +0 -1
- package/extensions/dm-lens/dist/clients/lsp/pending-aux-coverage.js +0 -120
- package/extensions/dm-lens/dist/clients/lsp/position-encoding.js +0 -28
- package/extensions/dm-lens/dist/clients/lsp/resolved-config.js +0 -183
- package/extensions/dm-lens/dist/clients/lsp/ruby-drive-dirs.js +0 -42
- package/extensions/dm-lens/dist/clients/lsp/server-covers.js +0 -8
- package/extensions/dm-lens/dist/clients/lsp/server-traits.js +0 -39
- package/extensions/dm-lens/dist/clients/lsp/server.js +0 -2640
- package/extensions/dm-lens/dist/clients/lsp/service-singleton.js +0 -59
- package/extensions/dm-lens/dist/clients/lsp/session-roots.js +0 -52
- package/extensions/dm-lens/dist/clients/lsp/spawn-history.js +0 -15
- package/extensions/dm-lens/dist/clients/lsp/sync-kind.js +0 -30
- package/extensions/dm-lens/dist/clients/lsp/tsserver-sync.js +0 -156
- package/extensions/dm-lens/dist/clients/lsp/wait-policy/capability-snapshot.js +0 -1
- package/extensions/dm-lens/dist/clients/lsp/wait-policy/classification.js +0 -37
- package/extensions/dm-lens/dist/clients/lsp/wait-policy/index.js +0 -3
- package/extensions/dm-lens/dist/clients/lsp/wait-policy/strategies.js +0 -196
- package/extensions/dm-lens/dist/clients/lsp/watch-queue.js +0 -40
- package/extensions/dm-lens/dist/clients/lsp/workspace-diagnostics-cache.js +0 -270
- package/extensions/dm-lens/dist/clients/lsp/workspace-diagnostics-session.js +0 -7
- package/extensions/dm-lens/dist/clients/lsp/workspace-sweep-hold.js +0 -93
- package/extensions/dm-lens/dist/clients/lsp-budget.js +0 -87
- package/extensions/dm-lens/dist/clients/lsp-document-symbols.js +0 -93
- package/extensions/dm-lens/dist/clients/lsp-lazy.js +0 -8
- package/extensions/dm-lens/dist/clients/lsp-mutation.js +0 -309
- package/extensions/dm-lens/dist/clients/lsp-status.js +0 -35
- package/extensions/dm-lens/dist/clients/map-with-concurrency.js +0 -20
- package/extensions/dm-lens/dist/clients/mcp/analyze.js +0 -265
- package/extensions/dm-lens/dist/clients/mcp/host-shim.js +0 -14
- package/extensions/dm-lens/dist/clients/mcp/ipc.js +0 -321
- package/extensions/dm-lens/dist/clients/mcp/review.js +0 -137
- package/extensions/dm-lens/dist/clients/mcp/session.js +0 -305
- package/extensions/dm-lens/dist/clients/memory-sampler.js +0 -145
- package/extensions/dm-lens/dist/clients/message-end-attribution.js +0 -18
- package/extensions/dm-lens/dist/clients/metrics-client.js +0 -80
- package/extensions/dm-lens/dist/clients/metrics-history.js +0 -255
- package/extensions/dm-lens/dist/clients/middle-man-analysis.js +0 -161
- package/extensions/dm-lens/dist/clients/model-provider.js +0 -31
- package/extensions/dm-lens/dist/clients/module-report-lsp.js +0 -140
- package/extensions/dm-lens/dist/clients/module-report.js +0 -1648
- package/extensions/dm-lens/dist/clients/mutating-tool.js +0 -386
- package/extensions/dm-lens/dist/clients/mutation-attribution.js +0 -176
- package/extensions/dm-lens/dist/clients/mutation-bridge.js +0 -231
- package/extensions/dm-lens/dist/clients/ndjson-logger.js +0 -504
- package/extensions/dm-lens/dist/clients/observed-mutation-sources.js +0 -43
- package/extensions/dm-lens/dist/clients/observed-mutation.js +0 -729
- package/extensions/dm-lens/dist/clients/oldtext-autopatch.js +0 -100
- package/extensions/dm-lens/dist/clients/opaque-mutation-scan.js +0 -340
- package/extensions/dm-lens/dist/clients/opengrep-client.js +0 -219
- package/extensions/dm-lens/dist/clients/opengrep-config.js +0 -52
- package/extensions/dm-lens/dist/clients/package-manager.js +0 -358
- package/extensions/dm-lens/dist/clients/package-root.js +0 -25
- package/extensions/dm-lens/dist/clients/partial-edit-apply.js +0 -337
- package/extensions/dm-lens/dist/clients/path-attribution-telemetry.js +0 -31
- package/extensions/dm-lens/dist/clients/path-keyed-map.js +0 -57
- package/extensions/dm-lens/dist/clients/path-utils.js +0 -535
- package/extensions/dm-lens/dist/clients/performance-report.js +0 -291
- package/extensions/dm-lens/dist/clients/persist-debounce.js +0 -37
- package/extensions/dm-lens/dist/clients/persist-worker-stats.js +0 -8
- package/extensions/dm-lens/dist/clients/persistent-reverify.js +0 -166
- package/extensions/dm-lens/dist/clients/php-cs-fixer-config.js +0 -15
- package/extensions/dm-lens/dist/clients/pipeline.js +0 -1279
- package/extensions/dm-lens/dist/clients/post-autofix-notice.js +0 -19
- package/extensions/dm-lens/dist/clients/print-mode.js +0 -3
- package/extensions/dm-lens/dist/clients/probe-home-state.js +0 -67
- package/extensions/dm-lens/dist/clients/process-bridge.js +0 -48
- package/extensions/dm-lens/dist/clients/process-singletons.js +0 -69
- package/extensions/dm-lens/dist/clients/process-snapshot.js +0 -130
- package/extensions/dm-lens/dist/clients/project-changes.js +0 -174
- package/extensions/dm-lens/dist/clients/project-conventions.js +0 -152
- package/extensions/dm-lens/dist/clients/project-diagnostics/cache.js +0 -91
- package/extensions/dm-lens/dist/clients/project-diagnostics/extractors.js +0 -53
- package/extensions/dm-lens/dist/clients/project-diagnostics/fresh-fetch.js +0 -413
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/call-graph-impact.js +0 -64
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/dead-code.js +0 -38
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/gitleaks.js +0 -21
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/govulncheck.js +0 -23
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/jscpd.js +0 -28
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/knip.js +0 -45
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/madge.js +0 -34
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/opengrep.js +0 -32
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/runner-findings.js +0 -79
- package/extensions/dm-lens/dist/clients/project-diagnostics/runner-adapters/trivy.js +0 -41
- package/extensions/dm-lens/dist/clients/project-diagnostics/scanner.js +0 -349
- package/extensions/dm-lens/dist/clients/project-diagnostics/types.js +0 -1
- package/extensions/dm-lens/dist/clients/project-lens-config.js +0 -464
- package/extensions/dm-lens/dist/clients/project-report.js +0 -527
- package/extensions/dm-lens/dist/clients/project-scale.js +0 -60
- package/extensions/dm-lens/dist/clients/project-scan-policy.js +0 -4
- package/extensions/dm-lens/dist/clients/project-snapshot-fingerprint.js +0 -44
- package/extensions/dm-lens/dist/clients/project-snapshot-persist-worker.js +0 -13
- package/extensions/dm-lens/dist/clients/project-snapshot.js +0 -1333
- package/extensions/dm-lens/dist/clients/project-trust.js +0 -104
- package/extensions/dm-lens/dist/clients/python-environment.js +0 -162
- package/extensions/dm-lens/dist/clients/python-provenance.js +0 -551
- package/extensions/dm-lens/dist/clients/quiet-window-config.js +0 -16
- package/extensions/dm-lens/dist/clients/quiet-window.js +0 -129
- package/extensions/dm-lens/dist/clients/read-bridge.js +0 -53
- package/extensions/dm-lens/dist/clients/read-expansion.js +0 -218
- package/extensions/dm-lens/dist/clients/read-guard-branch.js +0 -126
- package/extensions/dm-lens/dist/clients/read-guard-logger.js +0 -186
- package/extensions/dm-lens/dist/clients/read-guard-tool-lines.js +0 -1050
- package/extensions/dm-lens/dist/clients/read-guard.js +0 -1429
- package/extensions/dm-lens/dist/clients/recent-touches.js +0 -126
- package/extensions/dm-lens/dist/clients/redact/secrets.js +0 -386
- package/extensions/dm-lens/dist/clients/resource-sampler.js +0 -344
- package/extensions/dm-lens/dist/clients/reverse-deps.js +0 -227
- package/extensions/dm-lens/dist/clients/review-graph/builder.js +0 -3708
- package/extensions/dm-lens/dist/clients/review-graph/format.js +0 -30
- package/extensions/dm-lens/dist/clients/review-graph/git-identity.js +0 -168
- package/extensions/dm-lens/dist/clients/review-graph/import-resolvers.js +0 -323
- package/extensions/dm-lens/dist/clients/review-graph/persist-worker.js +0 -8
- package/extensions/dm-lens/dist/clients/review-graph/query.js +0 -195
- package/extensions/dm-lens/dist/clients/review-graph/revision-drift.js +0 -3
- package/extensions/dm-lens/dist/clients/review-graph/service.js +0 -60
- package/extensions/dm-lens/dist/clients/review-graph/shared-extraction-ir.js +0 -54
- package/extensions/dm-lens/dist/clients/review-graph/symbol-id.js +0 -29
- package/extensions/dm-lens/dist/clients/review-graph/tsconfig-paths.js +0 -253
- package/extensions/dm-lens/dist/clients/review-graph/types.js +0 -1
- package/extensions/dm-lens/dist/clients/review-graph/workspace-modules.js +0 -374
- package/extensions/dm-lens/dist/clients/review-graph-logger.js +0 -51
- package/extensions/dm-lens/dist/clients/ruff-client.js +0 -109
- package/extensions/dm-lens/dist/clients/rules-scanner.js +0 -113
- package/extensions/dm-lens/dist/clients/run-duration.js +0 -9
- package/extensions/dm-lens/dist/clients/runtime-agent-end.js +0 -800
- package/extensions/dm-lens/dist/clients/runtime-config.js +0 -39
- package/extensions/dm-lens/dist/clients/runtime-context.js +0 -155
- package/extensions/dm-lens/dist/clients/runtime-coordinator.js +0 -1117
- package/extensions/dm-lens/dist/clients/runtime-session.js +0 -1768
- package/extensions/dm-lens/dist/clients/runtime-tool-call.js +0 -935
- package/extensions/dm-lens/dist/clients/runtime-tool-result.js +0 -1630
- package/extensions/dm-lens/dist/clients/runtime-turn.js +0 -2900
- package/extensions/dm-lens/dist/clients/rust-client.js +0 -48
- package/extensions/dm-lens/dist/clients/safe-spawn.js +0 -1275
- package/extensions/dm-lens/dist/clients/sanitize.js +0 -174
- package/extensions/dm-lens/dist/clients/scan-utils.js +0 -7
- package/extensions/dm-lens/dist/clients/scanner-temp-root.js +0 -8
- package/extensions/dm-lens/dist/clients/scratch-tree-policy.js +0 -63
- package/extensions/dm-lens/dist/clients/search-read-registration.js +0 -60
- package/extensions/dm-lens/dist/clients/secret-findings.js +0 -69
- package/extensions/dm-lens/dist/clients/security-scan-client.js +0 -208
- package/extensions/dm-lens/dist/clients/session-event-guard.js +0 -111
- package/extensions/dm-lens/dist/clients/session-lifecycle.js +0 -269
- package/extensions/dm-lens/dist/clients/session-scope.js +0 -451
- package/extensions/dm-lens/dist/clients/session-start-observability.js +0 -47
- package/extensions/dm-lens/dist/clients/session-state-store.js +0 -66
- package/extensions/dm-lens/dist/clients/session-summary.js +0 -8
- package/extensions/dm-lens/dist/clients/sessionstart-logger.js +0 -22
- package/extensions/dm-lens/dist/clients/sg-runner.js +0 -645
- package/extensions/dm-lens/dist/clients/sgconfig.js +0 -306
- package/extensions/dm-lens/dist/clients/shared-checkout-guard.js +0 -177
- package/extensions/dm-lens/dist/clients/single-flight.js +0 -52
- package/extensions/dm-lens/dist/clients/situational-tool-telemetry.js +0 -85
- package/extensions/dm-lens/dist/clients/skills-resolver.js +0 -38
- package/extensions/dm-lens/dist/clients/slow-fs.js +0 -77
- package/extensions/dm-lens/dist/clients/smells-rollup.js +0 -118
- package/extensions/dm-lens/dist/clients/source-filter.js +0 -320
- package/extensions/dm-lens/dist/clients/source-walker.js +0 -96
- package/extensions/dm-lens/dist/clients/spawn-output-cap.js +0 -35
- package/extensions/dm-lens/dist/clients/spawn-timeout-cooldown.js +0 -51
- package/extensions/dm-lens/dist/clients/stale-marker.js +0 -1
- package/extensions/dm-lens/dist/clients/startup-scan.js +0 -230
- package/extensions/dm-lens/dist/clients/startup-timing.js +0 -67
- package/extensions/dm-lens/dist/clients/string-utils.js +0 -6
- package/extensions/dm-lens/dist/clients/subagent-mode.js +0 -40
- package/extensions/dm-lens/dist/clients/symbol-containment.js +0 -16
- package/extensions/dm-lens/dist/clients/symbol-types.js +0 -1
- package/extensions/dm-lens/dist/clients/test-runner-client.js +0 -1697
- package/extensions/dm-lens/dist/clients/test-runner-delivery.js +0 -293
- package/extensions/dm-lens/dist/clients/test-target-roots.js +0 -17
- package/extensions/dm-lens/dist/clients/todo-scanner.js +0 -164
- package/extensions/dm-lens/dist/clients/tool-agreement.js +0 -640
- package/extensions/dm-lens/dist/clients/tool-config.js +0 -219
- package/extensions/dm-lens/dist/clients/tool-cwd.js +0 -235
- package/extensions/dm-lens/dist/clients/tool-definition.js +0 -22
- package/extensions/dm-lens/dist/clients/tool-event.js +0 -24
- package/extensions/dm-lens/dist/clients/tool-policy.js +0 -2393
- package/extensions/dm-lens/dist/clients/tool-probe.js +0 -13
- package/extensions/dm-lens/dist/clients/tool-render.js +0 -79
- package/extensions/dm-lens/dist/clients/tool-set-policy.js +0 -77
- package/extensions/dm-lens/dist/clients/tree-sitter-cache.js +0 -206
- package/extensions/dm-lens/dist/clients/tree-sitter-client.js +0 -3057
- package/extensions/dm-lens/dist/clients/tree-sitter-logger.js +0 -77
- package/extensions/dm-lens/dist/clients/tree-sitter-navigator.js +0 -198
- package/extensions/dm-lens/dist/clients/tree-sitter-query-loader.js +0 -389
- package/extensions/dm-lens/dist/clients/tree-sitter-shared.js +0 -87
- package/extensions/dm-lens/dist/clients/tree-sitter-symbol-extractor.js +0 -959
- package/extensions/dm-lens/dist/clients/trivy-client.js +0 -335
- package/extensions/dm-lens/dist/clients/tui-fit.js +0 -26
- package/extensions/dm-lens/dist/clients/turn-context.js +0 -48
- package/extensions/dm-lens/dist/clients/turn-end/delivery-holds.js +0 -59
- package/extensions/dm-lens/dist/clients/turn-end/lane.js +0 -1
- package/extensions/dm-lens/dist/clients/turn-end/lanes/govulncheck.js +0 -54
- package/extensions/dm-lens/dist/clients/turn-end/lanes/secrets.js +0 -131
- package/extensions/dm-lens/dist/clients/turn-summary-render.js +0 -56
- package/extensions/dm-lens/dist/clients/turn-summary.js +0 -84
- package/extensions/dm-lens/dist/clients/typos-config.js +0 -9
- package/extensions/dm-lens/dist/clients/user-notify.js +0 -15
- package/extensions/dm-lens/dist/clients/vanished-instance-marker.js +0 -18
- package/extensions/dm-lens/dist/clients/warm-attach.js +0 -210
- package/extensions/dm-lens/dist/clients/widget-state.js +0 -997
- package/extensions/dm-lens/dist/clients/word-index-logger.js +0 -21
- package/extensions/dm-lens/dist/clients/word-index-store.js +0 -222
- package/extensions/dm-lens/dist/clients/word-index.js +0 -1494
- package/extensions/dm-lens/dist/clients/workspace-topology.js +0 -268
- package/extensions/dm-lens/dist/clients/write-ordering-guard.js +0 -28
- package/extensions/dm-lens/dist/clients/zizmor-config.js +0 -160
- package/extensions/dm-lens/dist/i18n.js +0 -67
- package/extensions/dm-lens/dist/index.js +0 -1973
- package/extensions/dm-lens/dist/mcp/analyze-cli.js +0 -205
- package/extensions/dm-lens/dist/mcp/build-staleness.js +0 -55
- package/extensions/dm-lens/dist/mcp/cli.js +0 -96
- package/extensions/dm-lens/dist/mcp/server.js +0 -1239
- package/extensions/dm-lens/dist/mcp/tool-arguments.js +0 -134
- package/extensions/dm-lens/dist/mcp/worker.js +0 -41
- package/extensions/dm-lens/dist/scripts/lib/process-scan.mjs +0 -375
- package/extensions/dm-lens/dist/scripts/lib/skills-predicate.mjs +0 -53
- package/extensions/dm-lens/dist/scripts/lib/web-tree-sitter-dir.mjs +0 -51
- package/extensions/dm-lens/dist/tools/activate-tools.js +0 -62
- package/extensions/dm-lens/dist/tools/ast-grep-outline.js +0 -126
- package/extensions/dm-lens/dist/tools/ast-grep-replace.js +0 -227
- package/extensions/dm-lens/dist/tools/ast-grep-search.js +0 -687
- package/extensions/dm-lens/dist/tools/effective-config.js +0 -59
- package/extensions/dm-lens/dist/tools/lens-diagnostic-mark.js +0 -251
- package/extensions/dm-lens/dist/tools/lens-diagnostics.js +0 -1518
- package/extensions/dm-lens/dist/tools/lsp-diagnostics.js +0 -1198
- package/extensions/dm-lens/dist/tools/lsp-navigation.js +0 -1249
- package/extensions/dm-lens/dist/tools/lsp-structured-output.js +0 -277
- package/extensions/dm-lens/dist/tools/module-report.js +0 -332
- package/extensions/dm-lens/dist/tools/project-report.js +0 -72
- package/extensions/dm-lens/dist/tools/render-compact.js +0 -272
- package/extensions/dm-lens/dist/tools/scan-progress.js +0 -31
- package/extensions/dm-lens/dist/tools/shared.js +0 -32
- package/extensions/dm-lens/dist/tools/symbol-search.js +0 -133
- package/extensions/dm-mcp-adapter/dist/abort.js +0 -35
- package/extensions/dm-mcp-adapter/dist/agent-dir.js +0 -45
- package/extensions/dm-mcp-adapter/dist/agent-plugin-loader.js +0 -392
- package/extensions/dm-mcp-adapter/dist/agent-plugin-provenance.js +0 -26
- package/extensions/dm-mcp-adapter/dist/bearer-command-resolver.js +0 -182
- package/extensions/dm-mcp-adapter/dist/claude-plugin-loader.js +0 -350
- package/extensions/dm-mcp-adapter/dist/config.js +0 -1735
- package/extensions/dm-mcp-adapter/dist/consent-manager.js +0 -84
- package/extensions/dm-mcp-adapter/dist/elicitation-handler.js +0 -370
- package/extensions/dm-mcp-adapter/dist/errors.js +0 -225
- package/extensions/dm-mcp-adapter/dist/http-ca.js +0 -75
- package/extensions/dm-mcp-adapter/dist/jev-client.js +0 -359
- package/extensions/dm-mcp-adapter/dist/jev-contracts.js +0 -1
- package/extensions/dm-mcp-adapter/dist/jev-key-store.js +0 -189
- package/extensions/dm-mcp-adapter/dist/json-schema-validator.js +0 -70
- package/extensions/dm-mcp-adapter/dist/lifecycle.js +0 -387
- package/extensions/dm-mcp-adapter/dist/logger.js +0 -115
- package/extensions/dm-mcp-adapter/dist/mcp-auth-fetch.js +0 -86
- package/extensions/dm-mcp-adapter/dist/mcp-auth-flow.js +0 -956
- package/extensions/dm-mcp-adapter/dist/mcp-auth.js +0 -998
- package/extensions/dm-mcp-adapter/dist/mcp-bearer-store.js +0 -182
- package/extensions/dm-mcp-adapter/dist/mcp-callback-server.js +0 -380
- package/extensions/dm-mcp-adapter/dist/mcp-oauth-provider.js +0 -525
- package/extensions/dm-mcp-adapter/dist/mcp-probe.js +0 -151
- package/extensions/dm-mcp-adapter/dist/mcp-tasks.js +0 -300
- package/extensions/dm-mcp-adapter/dist/mcp-trace.js +0 -220
- package/extensions/dm-mcp-adapter/dist/metadata-cache.js +0 -323
- package/extensions/dm-mcp-adapter/dist/npx-resolver.js +0 -465
- package/extensions/dm-mcp-adapter/dist/output-shape.js +0 -312
- package/extensions/dm-mcp-adapter/dist/package-mcp-loader.js +0 -144
- package/extensions/dm-mcp-adapter/dist/project-server-trust.js +0 -186
- package/extensions/dm-mcp-adapter/dist/request-headers-command.js +0 -294
- package/extensions/dm-mcp-adapter/dist/resource-tools.js +0 -7
- package/extensions/dm-mcp-adapter/dist/runtime-owner.js +0 -94
- package/extensions/dm-mcp-adapter/dist/sampling-handler.js +0 -213
- package/extensions/dm-mcp-adapter/dist/secure-keyring.js +0 -191
- package/extensions/dm-mcp-adapter/dist/server-manager.js +0 -1594
- package/extensions/dm-mcp-adapter/dist/session-approvals.js +0 -127
- package/extensions/dm-mcp-adapter/dist/session-recovery.js +0 -83
- package/extensions/dm-mcp-adapter/dist/state.js +0 -1
- package/extensions/dm-mcp-adapter/dist/ts-shape.js +0 -157
- package/extensions/dm-mcp-adapter/dist/types.js +0 -286
- package/extensions/dm-mcp-adapter/dist/ui-app-bridge-helpers.js +0 -36
- package/extensions/dm-mcp-adapter/dist/ui-resource-handler.js +0 -204
- package/extensions/dm-mcp-adapter/dist/ui-stream-types.js +0 -58
- package/extensions/dm-mcp-adapter/dist/ui-tool-visibility.js +0 -26
- package/extensions/dm-mcp-adapter/dist/unix-socket-transport.js +0 -83
- package/extensions/dm-mcp-adapter/dist/utils.js +0 -418
- package/extensions/dm-web-access/dist/index.js +0 -28396
- package/extensions/dm-web-access/dist/mcp-cli.js +0 -28185
- /package/extensions/dm-lens/skills/{pi-lens-lsp-navigation → dm-lens-lsp-navigation}/SKILL.md +0 -0
- /package/extensions/dm-lens/skills/{pi-lens-write-ast-grep-rule → dm-lens-write-ast-grep-rule}/SKILL.md +0 -0
- /package/extensions/dm-lens/skills/{pi-lens-write-ast-grep-rule → dm-lens-write-ast-grep-rule}/reference.md +0 -0
- /package/extensions/dm-lens/skills/{pi-lens-write-tree-sitter-rule → dm-lens-write-tree-sitter-rule}/SKILL.md +0 -0
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
updateForegroundChild
|
|
16
16
|
} from "./foreground-control.js";
|
|
17
17
|
import { getLivePromptAudit, rewritePromptWithGuidance, updateLiveEffectivePrompt } from "./prompt-audit.js";
|
|
18
|
-
import {
|
|
18
|
+
import { discardRunningForegroundRun, persistForegroundRun, MAX_REMEMBERED_FOREGROUND_RUNS } from "./foreground-history.js";
|
|
19
19
|
import { projectScopeRequiresTrustMessage, resolveExecutionAgentScope } from "../../agents/agent-scope.js";
|
|
20
20
|
import { handleManagementAction } from "../../agents/agent-management.js";
|
|
21
21
|
import { handleRefinementAction } from "../../agents/agent-refinements.js";
|
|
@@ -91,8 +91,10 @@ import {
|
|
|
91
91
|
} from "./workflow-foreground-steering.js";
|
|
92
92
|
import { stopAsyncRun } from "./async-stop-action.js";
|
|
93
93
|
import { dismissRecoveredWorkflow } from "./async-dismiss-action.js";
|
|
94
|
+
import { inheritedSessionIds } from "../../shared/session-succession.js";
|
|
94
95
|
import { promotePausedWorkflowIfSettled, reconcileDetachedWorkflowChildCompletion } from "./workflow-detach-reconcile.js";
|
|
95
96
|
import { reconcileAsyncRun } from "../background/stale-run-reconciler.js";
|
|
97
|
+
import { currentRecordedPid } from "../background/boot-id.js";
|
|
96
98
|
import { resolveAsyncRootResultPath, waitForImportedAsyncRoot } from "../background/chain-root-attachment.js";
|
|
97
99
|
import { awaitExistingAsyncRun, claimWorkflowAwaitedResult } from "../background/await-async-run.js";
|
|
98
100
|
import { fallbackResultPayloadPathForSessionRun, resultFilePath, retireResultSnapshot, writeAsyncResultFile } from "../background/result-files.js";
|
|
@@ -104,7 +106,7 @@ import { inspectSubagentStatus } from "../background/run-status.js";
|
|
|
104
106
|
import { getExternalJobProvider } from "../../api/external-job-provider.js";
|
|
105
107
|
import { externalJobFollowUpRequestDigest, externalJobFollowUpRequestId, externalJobFollowUpRunId, externalJobPromptDigest, externalJobStableJson } from "../shared/external-job-runner.js";
|
|
106
108
|
import { externalCliReceiptMetadata, normalizeExternalCliRunnerStatus } from "../shared/external-cli-contract.js";
|
|
107
|
-
import { formatHerdrMachineRunnerUnsupported,
|
|
109
|
+
import { formatHerdrMachineRunnerUnsupported, resolveMachinePlacement } from "../shared/herdr-machine.js";
|
|
108
110
|
import { lookupRunnerLauncher, resolveAgentRunnerLauncher } from "../shared/runner-launcher.js";
|
|
109
111
|
import { applyForceTopLevelAsyncOverride } from "../background/top-level-async.js";
|
|
110
112
|
import { handleMissionAction, MISSION_ACTIONS } from "../../missions/actions.js";
|
|
@@ -117,7 +119,10 @@ import { getInspectorPlugins } from "../../inspectors/plugins.js";
|
|
|
117
119
|
import { handleHerdrProjectPaneAction, HERDR_PROJECT_PANE_ACTIONS } from "../../inspectors/herdr/project-panes.js";
|
|
118
120
|
import { previewSimpleWorkflowRun, runWorkflowScript, validateWorkflowScript, WorkflowScriptError } from "../../workflows/scripted-workflow.js";
|
|
119
121
|
import { formatIncrementalChildCompletion, incrementalChildCompletionTriggersTurn } from "../background/notify.js";
|
|
120
|
-
import {
|
|
122
|
+
import { COMPLETION_ACTION, STATUS_ACTION } from "../../shared/parent-wake.js";
|
|
123
|
+
import { appendWorkflowChildJournal, claimedWorkflowRunRefusal, findWorkflowReuseSource, matchWorkflowReuse, readNamedWorkflowReuseSource, WORKFLOW_RUNTIME_REPLACED_STOP_NOTICE, workflowChildFingerprint, workflowScriptDigest, workflowStopCause } from "../../workflows/workflow-reuse.js";
|
|
124
|
+
import { claimWorkflowResume, recordWorkflowResumeRefusal, releaseWorkflowResumeClaim, resumedRunStarted } from "../../workflows/workflow-resume-claim.js";
|
|
125
|
+
import { manualWorkflowResumeRefusalText, prepareWorkflowResume, workflowResumeRefusal, workflowResumeTargetId } from "../../workflows/workflow-resume.js";
|
|
121
126
|
import { executeWorkflowHostCommand, resolveWorkflowHostOutputClaimPath } from "../../workflows/host-command.js";
|
|
122
127
|
import { buildWorkflowReceipt, readWorkflowReceipt, workflowReceiptPath, resolveWorkflowReceiptResumeEntry, writeWorkflowReceipt } from "../../workflows/workflow-receipt.js";
|
|
123
128
|
import { formatWorkflowKeyRevival, recordWorkflowRevival, withWorkflowRevivals } from "../../workflows/workflow-revival.js";
|
|
@@ -133,6 +138,7 @@ import {
|
|
|
133
138
|
validateWorkflowChildPermitRoot
|
|
134
139
|
} from "../../shared/workflow-child-permit.js";
|
|
135
140
|
import { deepFreezeWorkflowArgs, normalizeWorkflowArgs, resolveStructuredWorkflowResource, resolveWorkflowResource } from "../../workflows/workflow-resources.js";
|
|
141
|
+
import { writeWorkflowLaunchRecord } from "../../workflows/workflow-launch-record.js";
|
|
136
142
|
import { stableJsonDigest } from "../../shared/launch-contract.js";
|
|
137
143
|
import {
|
|
138
144
|
cleanupWorktrees,
|
|
@@ -318,11 +324,11 @@ function nestedResolutionScopeForExecutor(deps) {
|
|
|
318
324
|
...address ? { descendantOf: { parentRunId: address.parentRunId, ...address.parentStepIndex !== undefined ? { parentStepIndex: address.parentStepIndex } : {} } } : {}
|
|
319
325
|
};
|
|
320
326
|
}
|
|
321
|
-
function
|
|
327
|
+
function trustedSessionRoots(parentSessionFile, deps) {
|
|
322
328
|
const roots = deps.config.defaultSessionDir ? [path.resolve(deps.expandTilde(deps.config.defaultSessionDir))] : [];
|
|
323
|
-
const parentSessionFile = ctx.sessionManager.getSessionFile() ?? null;
|
|
324
329
|
if (parentSessionFile)
|
|
325
|
-
|
|
330
|
+
for (const sessionFile of [parentSessionFile, ...inheritedSessionIds(parentSessionFile)])
|
|
331
|
+
roots.push(deps.getSubagentSessionRoot(sessionFile));
|
|
326
332
|
return [...new Set(roots)];
|
|
327
333
|
}
|
|
328
334
|
function sessionProjectTrust(ctx) {
|
|
@@ -437,9 +443,12 @@ function trimRememberedForegroundRuns(state) {
|
|
|
437
443
|
state.foregroundRuns.delete(oldestTerminal.runId);
|
|
438
444
|
}
|
|
439
445
|
}
|
|
440
|
-
function
|
|
446
|
+
function persistRememberedForegroundRun(state, runId) {
|
|
447
|
+
const run = state.foregroundRuns?.get(runId);
|
|
448
|
+
if (!run)
|
|
449
|
+
return;
|
|
441
450
|
try {
|
|
442
|
-
|
|
451
|
+
persistForegroundRun(run);
|
|
443
452
|
} catch (error) {
|
|
444
453
|
console.error("Failed to persist foreground run history:", error);
|
|
445
454
|
}
|
|
@@ -458,6 +467,49 @@ function foregroundChildActivityFromProgress(progress) {
|
|
|
458
467
|
...progress?.toolCount !== undefined ? { toolCount: progress.toolCount } : {}
|
|
459
468
|
};
|
|
460
469
|
}
|
|
470
|
+
function rememberedForegroundChild(input, result, index, status, updatedAt) {
|
|
471
|
+
const resumeContract = omitUndefinedProperties({
|
|
472
|
+
modelResponseAliases: input.modelResponseAliases,
|
|
473
|
+
outputSchema: input.params.outputSchema,
|
|
474
|
+
agentContract: input.params.agentContract,
|
|
475
|
+
acceptance: input.params.acceptance,
|
|
476
|
+
output: input.effectiveOutput,
|
|
477
|
+
outputMode: input.effectiveOutputMode
|
|
478
|
+
});
|
|
479
|
+
return {
|
|
480
|
+
agent: result.agent,
|
|
481
|
+
index,
|
|
482
|
+
...result.sessionName ? { sessionName: result.sessionName } : {},
|
|
483
|
+
...result.context ? { context: result.context } : {},
|
|
484
|
+
status,
|
|
485
|
+
...foregroundChildActivityFromProgress(result.progress),
|
|
486
|
+
updatedAt,
|
|
487
|
+
...result.exitCode !== undefined ? { exitCode: result.exitCode } : {},
|
|
488
|
+
...result.error ? { error: result.error } : {},
|
|
489
|
+
...result.finalOutput ? { finalOutput: result.finalOutput } : {},
|
|
490
|
+
...result.outputState ? { outputState: result.outputState } : {},
|
|
491
|
+
...result.outputPartial ? { outputPartial: true } : {},
|
|
492
|
+
...result.outputMode ? { outputMode: result.outputMode } : {},
|
|
493
|
+
...result.savedOutputPath ? { savedOutputPath: result.savedOutputPath } : {},
|
|
494
|
+
...result.outputSaveError ? { outputSaveError: result.outputSaveError } : {},
|
|
495
|
+
...result.sessionFile ? { sessionFile: result.sessionFile } : {},
|
|
496
|
+
...result.model ? { model: result.model } : {},
|
|
497
|
+
...result.thinking ? { thinking: result.thinking } : {},
|
|
498
|
+
...result.artifactPaths ? { artifactPaths: result.artifactPaths } : {},
|
|
499
|
+
...result.transcriptPath ? { transcriptPath: result.transcriptPath } : {},
|
|
500
|
+
...result.transcriptError ? { transcriptError: result.transcriptError } : {},
|
|
501
|
+
...result.detachedReason ? { detachedReason: result.detachedReason } : {},
|
|
502
|
+
...result.acceptance ? { acceptance: result.acceptance } : {},
|
|
503
|
+
...Object.keys(resumeContract).length ? { resumeContract } : {},
|
|
504
|
+
...result.launchContractDigest ? { launchContractDigest: result.launchContractDigest } : {},
|
|
505
|
+
...input.extensionBindings ? { extensionBindings: input.extensionBindings } : {},
|
|
506
|
+
...input.requiredExtensions?.length ? { requiredExtensions: input.requiredExtensions } : {},
|
|
507
|
+
...result.launchResolvedExtensions ? { launchResolvedExtensions: result.launchResolvedExtensions } : {},
|
|
508
|
+
...result.runtimeAcknowledgedExtensions ? { runtimeAcknowledgedExtensions: result.runtimeAcknowledgedExtensions } : {},
|
|
509
|
+
...result.capabilityCeiling ? { capabilityCeiling: result.capabilityCeiling } : {},
|
|
510
|
+
...result.capabilityAudit ? { capabilityAudit: result.capabilityAudit } : {}
|
|
511
|
+
};
|
|
512
|
+
}
|
|
461
513
|
function rememberForegroundRun(state, input) {
|
|
462
514
|
state.foregroundRuns ??= new Map;
|
|
463
515
|
const previous = state.foregroundRuns.get(input.runId);
|
|
@@ -469,61 +521,38 @@ function rememberForegroundRun(state, input) {
|
|
|
469
521
|
...input.sessionId ? { sessionId: input.sessionId } : {},
|
|
470
522
|
updatedAt,
|
|
471
523
|
children: input.results.map((result, index) => {
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
agent: result.agent,
|
|
482
|
-
index,
|
|
483
|
-
...result.sessionName ? { sessionName: result.sessionName } : {},
|
|
484
|
-
...result.context ? { context: result.context } : {},
|
|
485
|
-
status: resolveSubagentResultStatus(omitUndefinedProperties({
|
|
486
|
-
exitCode: result.exitCode,
|
|
487
|
-
interrupted: result.interrupted,
|
|
488
|
-
detached: result.detached,
|
|
489
|
-
processSignal: result.processSignal,
|
|
490
|
-
timedOut: result.timedOut,
|
|
491
|
-
stopped: result.stopped,
|
|
492
|
-
turnBudgetExceeded: result.turnBudgetExceeded
|
|
493
|
-
})),
|
|
494
|
-
...foregroundChildActivityFromProgress(result.progress),
|
|
495
|
-
updatedAt,
|
|
496
|
-
...result.exitCode !== undefined ? { exitCode: result.exitCode } : {},
|
|
497
|
-
...result.error ? { error: result.error } : {},
|
|
498
|
-
...result.finalOutput ? { finalOutput: result.finalOutput } : {},
|
|
499
|
-
...result.outputState ? { outputState: result.outputState } : {},
|
|
500
|
-
...result.outputPartial ? { outputPartial: true } : {},
|
|
501
|
-
...result.outputMode ? { outputMode: result.outputMode } : {},
|
|
502
|
-
...result.savedOutputPath ? { savedOutputPath: result.savedOutputPath } : {},
|
|
503
|
-
...result.outputSaveError ? { outputSaveError: result.outputSaveError } : {},
|
|
504
|
-
...result.sessionFile ? { sessionFile: result.sessionFile } : {},
|
|
505
|
-
...result.model ? { model: result.model } : {},
|
|
506
|
-
...result.thinking ? { thinking: result.thinking } : {},
|
|
507
|
-
...result.artifactPaths ? { artifactPaths: result.artifactPaths } : {},
|
|
508
|
-
...result.transcriptPath ? { transcriptPath: result.transcriptPath } : {},
|
|
509
|
-
...result.transcriptError ? { transcriptError: result.transcriptError } : {},
|
|
510
|
-
...result.detachedReason ? { detachedReason: result.detachedReason } : {},
|
|
511
|
-
...result.acceptance ? { acceptance: result.acceptance } : {},
|
|
512
|
-
...Object.keys(resumeContract).length ? { resumeContract } : {},
|
|
513
|
-
...result.launchContractDigest ? { launchContractDigest: result.launchContractDigest } : {},
|
|
514
|
-
...input.extensionBindings ? { extensionBindings: input.extensionBindings } : {},
|
|
515
|
-
...input.requiredExtensions?.length ? { requiredExtensions: input.requiredExtensions } : {},
|
|
516
|
-
...result.launchResolvedExtensions ? { launchResolvedExtensions: result.launchResolvedExtensions } : {},
|
|
517
|
-
...result.runtimeAcknowledgedExtensions ? { runtimeAcknowledgedExtensions: result.runtimeAcknowledgedExtensions } : {},
|
|
518
|
-
...result.capabilityCeiling ? { capabilityCeiling: result.capabilityCeiling } : {},
|
|
519
|
-
...result.capabilityAudit ? { capabilityAudit: result.capabilityAudit } : {}
|
|
520
|
-
};
|
|
524
|
+
const child = rememberedForegroundChild(input, result, index, resolveSubagentResultStatus(omitUndefinedProperties({
|
|
525
|
+
exitCode: result.exitCode,
|
|
526
|
+
interrupted: result.interrupted,
|
|
527
|
+
detached: result.detached,
|
|
528
|
+
processSignal: result.processSignal,
|
|
529
|
+
timedOut: result.timedOut,
|
|
530
|
+
stopped: result.stopped,
|
|
531
|
+
turnBudgetExceeded: result.turnBudgetExceeded
|
|
532
|
+
})), updatedAt);
|
|
521
533
|
const recovered = previous?.children[index];
|
|
522
534
|
return child.status === "detached" && recovered && recovered.status !== "detached" ? recovered : child;
|
|
523
535
|
})
|
|
524
536
|
});
|
|
525
537
|
trimRememberedForegroundRuns(state);
|
|
526
|
-
|
|
538
|
+
persistRememberedForegroundRun(state, input.runId);
|
|
539
|
+
}
|
|
540
|
+
function rememberRunningForegroundRun(input) {
|
|
541
|
+
const updatedAt = Date.now();
|
|
542
|
+
try {
|
|
543
|
+
persistForegroundRun({
|
|
544
|
+
runId: input.runId,
|
|
545
|
+
mode: "single",
|
|
546
|
+
cwd: input.cwd,
|
|
547
|
+
...input.sessionId ? { sessionId: input.sessionId } : {},
|
|
548
|
+
updatedAt,
|
|
549
|
+
children: [rememberedForegroundChild(input, input.child, 0, "running", updatedAt)],
|
|
550
|
+
owner: currentRecordedPid(),
|
|
551
|
+
...input.parentWorkflowRunId ? { parentWorkflowRunId: input.parentWorkflowRunId } : {}
|
|
552
|
+
});
|
|
553
|
+
} catch (error) {
|
|
554
|
+
console.error("Failed to persist running foreground run:", error);
|
|
555
|
+
}
|
|
527
556
|
}
|
|
528
557
|
function applyControlEventToRememberedForegroundRun(state, event) {
|
|
529
558
|
const run = state.foregroundRuns?.get(event.runId);
|
|
@@ -601,7 +630,7 @@ function updateRememberedForegroundChild(state, input) {
|
|
|
601
630
|
...input.result.capabilityAudit ? { capabilityAudit: input.result.capabilityAudit } : {}
|
|
602
631
|
});
|
|
603
632
|
trimRememberedForegroundRuns(state);
|
|
604
|
-
|
|
633
|
+
persistRememberedForegroundRun(state, input.runId);
|
|
605
634
|
const output = getSingleResultOutput(input.result).trim();
|
|
606
635
|
const success = terminalStatus === "completed";
|
|
607
636
|
const summary = !success && input.result.error ? `${input.result.error}${output ? `
|
|
@@ -672,6 +701,7 @@ function resolveForegroundResumeTarget(params, state, options = {}) {
|
|
|
672
701
|
...child.thinking ? { thinking: child.thinking } : {},
|
|
673
702
|
...child.launchContractDigest ? { launchContractDigest: child.launchContractDigest } : {},
|
|
674
703
|
...child.resumeContract ? { resumeContract: child.resumeContract } : {},
|
|
704
|
+
...child.savedOutputPath ? { savedOutputPath: child.savedOutputPath } : {},
|
|
675
705
|
...child.extensionBindings ? { extensionBindings: normalizeExtensionBindings(child.extensionBindings).value } : {},
|
|
676
706
|
...child.requiredExtensions ? { requiredExtensions: child.requiredExtensions } : {},
|
|
677
707
|
...child.capabilityCeiling ? { capabilityCeiling: child.capabilityCeiling } : {}
|
|
@@ -1146,7 +1176,7 @@ function pathWithin(base, candidate) {
|
|
|
1146
1176
|
const resolvedCandidate = path.resolve(candidate);
|
|
1147
1177
|
return resolvedCandidate === resolvedBase || resolvedCandidate.startsWith(`${resolvedBase}${path.sep}`);
|
|
1148
1178
|
}
|
|
1149
|
-
function validateNestedSessionFile(run, trustedSessionRoots) {
|
|
1179
|
+
function validateNestedSessionFile(run, trustedSessionRoots, resolveSource, visited = []) {
|
|
1150
1180
|
const sessionFile = nestedRunSessionFile(run);
|
|
1151
1181
|
if (!sessionFile)
|
|
1152
1182
|
throw new Error(`Nested run '${run.id}' does not have a persisted session file to resume from.`);
|
|
@@ -1166,7 +1196,20 @@ function validateNestedSessionFile(run, trustedSessionRoots) {
|
|
|
1166
1196
|
throw new Error(`Nested run '${run.id}' session file is outside trusted nested session roots: ${sessionFile}`);
|
|
1167
1197
|
}
|
|
1168
1198
|
if (!realSessionFile.split(path.sep).includes(run.id)) {
|
|
1169
|
-
|
|
1199
|
+
const sourceId = run.revivedFrom;
|
|
1200
|
+
const chain = [...visited, run.id];
|
|
1201
|
+
const source = sourceId && chain.length <= 8 && !chain.includes(sourceId) ? resolveSource(sourceId) : undefined;
|
|
1202
|
+
let sourceFile;
|
|
1203
|
+
if (source && source.state !== "running" && source.state !== "queued" && source.state !== "stopped") {
|
|
1204
|
+
try {
|
|
1205
|
+
sourceFile = validateNestedSessionFile(source, trustedSessionRoots, resolveSource, chain);
|
|
1206
|
+
} catch {
|
|
1207
|
+
sourceFile = undefined;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
if (sourceFile !== realSessionFile) {
|
|
1211
|
+
throw new Error(`Nested run '${run.id}' session file is not under that nested run's session directory: ${sessionFile}`);
|
|
1212
|
+
}
|
|
1170
1213
|
}
|
|
1171
1214
|
return realSessionFile;
|
|
1172
1215
|
}
|
|
@@ -1180,7 +1223,7 @@ export function readNestedRecoveryDescriptor(asyncDir, runId, agent) {
|
|
|
1180
1223
|
throw new Error(`Nested run '${runId}' has a recovery descriptor for a different agent.`);
|
|
1181
1224
|
return recoveryDescriptor;
|
|
1182
1225
|
}
|
|
1183
|
-
function resolveNestedResumeTarget(match, trustedSessionRoots) {
|
|
1226
|
+
function resolveNestedResumeTarget(match, trustedSessionRoots, resolveSource) {
|
|
1184
1227
|
const run = match.match.run;
|
|
1185
1228
|
if (run.state === "running" || run.state === "queued")
|
|
1186
1229
|
throw new Error(`Nested run '${run.id}' is live; route the follow-up to the owner process instead.`);
|
|
@@ -1200,7 +1243,7 @@ function resolveNestedResumeTarget(match, trustedSessionRoots) {
|
|
|
1200
1243
|
agent,
|
|
1201
1244
|
index: 0,
|
|
1202
1245
|
cwd: asyncDir ? path.dirname(asyncDir) : undefined,
|
|
1203
|
-
sessionFile: validateNestedSessionFile(run, trustedSessionRoots),
|
|
1246
|
+
sessionFile: validateNestedSessionFile(run, trustedSessionRoots, resolveSource),
|
|
1204
1247
|
...run.capabilityCeiling ? { capabilityCeiling: run.capabilityCeiling } : {},
|
|
1205
1248
|
...recoveryDescriptor ? { recoveryDescriptor } : {}
|
|
1206
1249
|
});
|
|
@@ -1513,9 +1556,10 @@ async function resumeExternalJobFollowUp(input) {
|
|
|
1513
1556
|
}
|
|
1514
1557
|
function resolveRequestedResumeTarget(params, deps, parentSessionFile) {
|
|
1515
1558
|
const requestedId = params.id ?? params.runId;
|
|
1559
|
+
const resolutionDeps = omitUndefinedProperties({ state: deps.state, nested: nestedResolutionScopeForExecutor(deps) });
|
|
1516
1560
|
let resolved;
|
|
1517
1561
|
try {
|
|
1518
|
-
resolved = requestedId ? resolveSubagentRunId(requestedId,
|
|
1562
|
+
resolved = requestedId ? resolveSubagentRunId(requestedId, resolutionDeps) : undefined;
|
|
1519
1563
|
} catch (error) {
|
|
1520
1564
|
const message = error instanceof Error ? error.message : "";
|
|
1521
1565
|
const asyncMatches = message.match(/async:/g)?.length ?? 0;
|
|
@@ -1530,11 +1574,16 @@ function resolveRequestedResumeTarget(params, deps, parentSessionFile) {
|
|
|
1530
1574
|
const externalJobTarget = resolveNestedExternalJobResumeTarget(resolved, params, deps);
|
|
1531
1575
|
if (externalJobTarget)
|
|
1532
1576
|
return externalJobTarget;
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1577
|
+
const rootRunId = resolved.match.rootRunId;
|
|
1578
|
+
const resolveSource = (id) => {
|
|
1579
|
+
try {
|
|
1580
|
+
const source = resolveSubagentRunId(id, resolutionDeps);
|
|
1581
|
+
return source?.kind === "nested" && source.id === id && source.match.rootRunId === rootRunId ? source.match.run : undefined;
|
|
1582
|
+
} catch {
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
};
|
|
1586
|
+
return resolveNestedResumeTarget(resolved, trustedSessionRoots(parentSessionFile, deps), resolveSource);
|
|
1538
1587
|
}
|
|
1539
1588
|
return resolveResumeTarget(params, deps.state, { asyncRequireSessionFile: false });
|
|
1540
1589
|
}
|
|
@@ -1856,6 +1905,9 @@ async function resumeAsyncRun(input) {
|
|
|
1856
1905
|
const availableModels = input.ctx.modelRegistry.getAvailable().map(toModelInfo);
|
|
1857
1906
|
const parentModel = input.parentModel;
|
|
1858
1907
|
const revivalAsyncDir = path.join(DIRS.async, runId);
|
|
1908
|
+
const revivalOutputBaseDir = resolveSingleRunOutputBaseDir(input.deps, artifactsDir, runId);
|
|
1909
|
+
const inheritedOutput = foregroundContract?.output ?? recoveryDescriptor?.outputPath;
|
|
1910
|
+
const inheritedOutputPath = input.params.output === undefined && input.params.workflowParentRunId === undefined ? (target.source === "foreground" ? target.savedOutputPath : undefined) ?? resolveSingleOutputPath(inheritedOutput, input.requestCwd, effectiveCwd, revivalOutputBaseDir) : undefined;
|
|
1859
1911
|
const result = await executeAsyncSingle(runId, compactOptional({
|
|
1860
1912
|
agent: target.agent,
|
|
1861
1913
|
task: buildRevivedAsyncTask(target, effectiveFollowUp),
|
|
@@ -1902,7 +1954,7 @@ async function resumeAsyncRun(input) {
|
|
|
1902
1954
|
thinkingCeiling: recoveryDescriptor?.thinkingCeiling ?? ("thinkingCeiling" in target ? target.thinkingCeiling : undefined),
|
|
1903
1955
|
extensionBindings: recoveryDescriptor?.extensionBindings ?? ("extensionBindings" in target ? target.extensionBindings : undefined),
|
|
1904
1956
|
requiredExtensions: recoveryDescriptor?.requiredExtensions ?? target.requiredExtensions,
|
|
1905
|
-
outputBaseDir:
|
|
1957
|
+
outputBaseDir: revivalOutputBaseDir,
|
|
1906
1958
|
maxSubagentDepth: recoveryDescriptor?.maxSubagentDepth ?? resolveCurrentMaxSubagentDepth(input.deps.config.maxSubagentDepth, input.deps.childRuntime),
|
|
1907
1959
|
waitToolEnabled: input.deps.waitToolEnabled,
|
|
1908
1960
|
waitToolDefaultTimeoutMs: input.deps.waitToolDefaultTimeoutMs,
|
|
@@ -1919,7 +1971,7 @@ async function resumeAsyncRun(input) {
|
|
|
1919
1971
|
controlIntercomTarget: intercomBridge.active ? intercomBridge.orchestratorTarget : undefined,
|
|
1920
1972
|
childIntercomTarget: intercomBridge.active ? (agent, index) => resolveSubagentIntercomTarget(runId, agent, index) : undefined,
|
|
1921
1973
|
availableModels,
|
|
1922
|
-
output: input.params.output !== undefined ? input.params.output :
|
|
1974
|
+
output: input.params.output !== undefined ? input.params.output : inheritedOutputPath ? suffixedOutputPath(inheritedOutputPath, runId.slice(0, 8)) : inheritedOutput,
|
|
1923
1975
|
outputMode: input.params.outputMode ?? foregroundContract?.outputMode ?? recoveryDescriptor?.outputMode,
|
|
1924
1976
|
outputClaimPath: input.params.workflowOutputClaimPath,
|
|
1925
1977
|
...agentContract ? { agentContract } : {},
|
|
@@ -2907,10 +2959,10 @@ function importWorkflowAwaitedChildResult(completed, options) {
|
|
|
2907
2959
|
}
|
|
2908
2960
|
};
|
|
2909
2961
|
}
|
|
2910
|
-
function stopAwaitedAsyncChildOnAbort(signal, state, runId, asyncDir, kill) {
|
|
2962
|
+
function stopAwaitedAsyncChildOnAbort(signal, state, runId, asyncDir, kill, reattached = false) {
|
|
2911
2963
|
const stopOnAbort = () => {
|
|
2912
2964
|
if (!workflowStopCause(signal?.reason))
|
|
2913
|
-
stopAsyncRun(state, runId, kill, { asyncDir, resolvedId: runId });
|
|
2965
|
+
stopAsyncRun(state, runId, kill, { asyncDir, resolvedId: runId, ...reattached ? { reattachedRunId: runId } : {} });
|
|
2914
2966
|
};
|
|
2915
2967
|
if (signal?.aborted)
|
|
2916
2968
|
stopOnAbort();
|
|
@@ -3140,11 +3192,13 @@ export function sanitizeRunPathSegment(value, maxBytes = 120) {
|
|
|
3140
3192
|
function resolveSingleRunOutputBaseDir(deps, artifactsDir, runId) {
|
|
3141
3193
|
return resolveConfiguredSingleRunOutputBaseDir(deps) ?? path.join(artifactsDir, "outputs", sanitizeRunPathSegment(runId));
|
|
3142
3194
|
}
|
|
3195
|
+
function suffixedOutputPath(outputPath, suffix) {
|
|
3196
|
+
const parsed = path.parse(outputPath);
|
|
3197
|
+
return path.join(parsed.dir, `${parsed.name}.${suffix}${parsed.ext || ".md"}`);
|
|
3198
|
+
}
|
|
3143
3199
|
function workflowChildDefaultOutput(aggregateOutputPath, artifactsDir, workflowRunId, workflowKey) {
|
|
3144
|
-
if (aggregateOutputPath)
|
|
3145
|
-
|
|
3146
|
-
return path.join(parsed.dir, `${parsed.name}.${workflowKey}${parsed.ext || ".md"}`);
|
|
3147
|
-
}
|
|
3200
|
+
if (aggregateOutputPath)
|
|
3201
|
+
return suffixedOutputPath(aggregateOutputPath, workflowKey);
|
|
3148
3202
|
return path.join(artifactsDir, "outputs", sanitizeRunPathSegment(workflowRunId), `${workflowKey}.md`);
|
|
3149
3203
|
}
|
|
3150
3204
|
function workflowHostCommandRunner(input) {
|
|
@@ -3242,8 +3296,8 @@ function resolveWorkflowChildOutputPath(input) {
|
|
|
3242
3296
|
const recoveryOutput = "recoveryDescriptor" in target ? target.recoveryDescriptor?.outputPath : undefined;
|
|
3243
3297
|
if (hasExplicitOutput)
|
|
3244
3298
|
return { path: recoveryOutput, inherited: false };
|
|
3245
|
-
const
|
|
3246
|
-
return {
|
|
3299
|
+
const savedPath = recoveryOutput ?? (target.source === "foreground" ? target.savedOutputPath ?? resolveSingleOutputPath(target.resumeContract?.output, input.ctxCwd) : undefined);
|
|
3300
|
+
return { inherited: false, ...savedPath ? { resumedSavedPath: savedPath } : {} };
|
|
3247
3301
|
}
|
|
3248
3302
|
const childCwd = resolveWorkflowChildLocalCwd(input);
|
|
3249
3303
|
let agentOutput;
|
|
@@ -3275,9 +3329,10 @@ function workflowChildOutputClaims(input) {
|
|
|
3275
3329
|
}
|
|
3276
3330
|
const overrides = new Map;
|
|
3277
3331
|
for (const entry of resolvedEntries) {
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3332
|
+
if (entry.resumedSavedPath || entry.inherited && entry.path && (paths.get(resolveWorkflowHostOutputClaimPath(entry.path)) ?? 0) > 1) {
|
|
3333
|
+
let output = workflowChildDefaultOutput(input.aggregateOutputPath, input.artifactsDir, input.workflowRunId, entry.key);
|
|
3334
|
+
if (entry.resumedSavedPath && resolveWorkflowHostOutputClaimPath(output) === resolveWorkflowHostOutputClaimPath(entry.resumedSavedPath))
|
|
3335
|
+
output = suffixedOutputPath(output, input.workflowRunId.slice(0, 8));
|
|
3281
3336
|
overrides.set(entry.key, output);
|
|
3282
3337
|
entry.path = output;
|
|
3283
3338
|
}
|
|
@@ -3294,15 +3349,6 @@ function workflowChildOutputClaims(input) {
|
|
|
3294
3349
|
claims.set(claimPath, key);
|
|
3295
3350
|
childClaims.set(key, claimPath);
|
|
3296
3351
|
}
|
|
3297
|
-
for (const { key, path: resolved, resumedOutput } of resolvedEntries) {
|
|
3298
|
-
if (resolved || !resumedOutput)
|
|
3299
|
-
continue;
|
|
3300
|
-
const claimPath = resolveWorkflowHostOutputClaimPath(resumedOutput);
|
|
3301
|
-
if (claims.has(claimPath))
|
|
3302
|
-
continue;
|
|
3303
|
-
claims.set(claimPath, key);
|
|
3304
|
-
childClaims.set(key, claimPath);
|
|
3305
|
-
}
|
|
3306
3352
|
return { claims, childClaims, overrides };
|
|
3307
3353
|
}
|
|
3308
3354
|
function applyWorkflowChildOutputClaims(target, claims) {
|
|
@@ -3467,7 +3513,7 @@ async function runSinglePath(data, deps) {
|
|
|
3467
3513
|
if (requestedMachine) {
|
|
3468
3514
|
try {
|
|
3469
3515
|
assertRequiredChildExtensionsAdmitted([requiredExtensions], { agent: agentConfig.name, runnerType: agentConfig.runner?.type, machine: requestedMachine });
|
|
3470
|
-
foregroundMachine =
|
|
3516
|
+
foregroundMachine = resolveMachinePlacement({ machine: requestedMachine, cwd: ctx.cwd, stepCwd: params.machineCwd }).machine;
|
|
3471
3517
|
} catch (error) {
|
|
3472
3518
|
return toExecutionErrorResult(params, error instanceof Error ? error : new Error(String(error)), data.contextPolicy.contextSummary);
|
|
3473
3519
|
}
|
|
@@ -3651,6 +3697,13 @@ async function runSinglePath(data, deps) {
|
|
|
3651
3697
|
onUpdate(update);
|
|
3652
3698
|
} : undefined;
|
|
3653
3699
|
const deadlineAt = data.deadlineAt ?? (data.timeoutMs !== undefined ? Date.now() + data.timeoutMs : undefined);
|
|
3700
|
+
const discardRunningRecord = () => {
|
|
3701
|
+
try {
|
|
3702
|
+
discardRunningForegroundRun(runId);
|
|
3703
|
+
} catch (discardError) {
|
|
3704
|
+
console.error("Failed to discard running foreground run:", discardError);
|
|
3705
|
+
}
|
|
3706
|
+
};
|
|
3654
3707
|
let r;
|
|
3655
3708
|
let resolveDetachedWorkflowChild;
|
|
3656
3709
|
const detachedWorkflowChild = params.workflowAwaitDetached === true ? new Promise((resolve) => {
|
|
@@ -3658,6 +3711,27 @@ async function runSinglePath(data, deps) {
|
|
|
3658
3711
|
}) : undefined;
|
|
3659
3712
|
try {
|
|
3660
3713
|
const childSessionFile = sessionFileForTask(params.agent, 0, modelOverride, modelOverrideFromParent, modelOrigin);
|
|
3714
|
+
rememberRunningForegroundRun({
|
|
3715
|
+
modelResponseAliases,
|
|
3716
|
+
runId,
|
|
3717
|
+
mode: "single",
|
|
3718
|
+
cwd: singleCwd,
|
|
3719
|
+
sessionId: data.parentSessionId,
|
|
3720
|
+
params,
|
|
3721
|
+
effectiveOutput,
|
|
3722
|
+
effectiveOutputMode,
|
|
3723
|
+
extensionBindings: params.extensionBindings,
|
|
3724
|
+
requiredExtensions,
|
|
3725
|
+
child: omitUndefinedProperties({
|
|
3726
|
+
agent: params.agent,
|
|
3727
|
+
context: shouldForkAgent(contextPolicy, params.agent) ? "fork" : "fresh",
|
|
3728
|
+
sessionFile: childSessionFile,
|
|
3729
|
+
model: modelOverride,
|
|
3730
|
+
thinking: resolveEffectiveThinking(modelOverride, thinkingOverrideForTask()),
|
|
3731
|
+
capabilityCeiling: data.capabilityCeiling
|
|
3732
|
+
}),
|
|
3733
|
+
parentWorkflowRunId: params.workflowParentRunId ?? foregroundControl?.parentWorkflowRunId
|
|
3734
|
+
});
|
|
3661
3735
|
const launched = await runSync(ctx.cwd, agents, params.agent, task, compactOptional({
|
|
3662
3736
|
machine: foregroundMachine,
|
|
3663
3737
|
parentProviderRegistry: ctx.modelRegistry,
|
|
@@ -3735,7 +3809,12 @@ async function runSinglePath(data, deps) {
|
|
|
3735
3809
|
}
|
|
3736
3810
|
try {
|
|
3737
3811
|
if (worktreeSetup) {
|
|
3738
|
-
|
|
3812
|
+
try {
|
|
3813
|
+
await finalizeSingleWorktreeHandoff({ worktreeSetup, artifactsDir, runId, cwd: sourceCwd, agent: params.agent, result, workflowKey: params.workflowKey, lane });
|
|
3814
|
+
} catch (error) {
|
|
3815
|
+
discardRunningRecord();
|
|
3816
|
+
throw error;
|
|
3817
|
+
}
|
|
3739
3818
|
}
|
|
3740
3819
|
try {
|
|
3741
3820
|
updateRememberedForegroundChild(deps.state, { runId, mode: "single", cwd: singleCwd, sessionId: data.parentSessionId, index: 0, result, events: deps.dm.events, notify: true });
|
|
@@ -3787,6 +3866,7 @@ async function runSinglePath(data, deps) {
|
|
|
3787
3866
|
}
|
|
3788
3867
|
r = launched.detached && detachedWorkflowChild ? await detachedWorkflowChild : launched;
|
|
3789
3868
|
} catch (error) {
|
|
3869
|
+
discardRunningRecord();
|
|
3790
3870
|
await cleanupSingleWorktree();
|
|
3791
3871
|
throw error;
|
|
3792
3872
|
} finally {
|
|
@@ -3801,7 +3881,12 @@ async function runSinglePath(data, deps) {
|
|
|
3801
3881
|
}
|
|
3802
3882
|
let worktreeHandoff;
|
|
3803
3883
|
if (worktreeSetup) {
|
|
3804
|
-
|
|
3884
|
+
try {
|
|
3885
|
+
worktreeHandoff = r.detached ? { suffix: pendingHandoff ? formatParallelHandoffReference(pendingHandoff) : "", reference: pendingHandoff } : await finalizeSingleWorktreeHandoff({ worktreeSetup, artifactsDir, runId, cwd: sourceCwd, agent: params.agent, result: r, workflowKey: params.workflowKey, lane });
|
|
3886
|
+
} catch (error) {
|
|
3887
|
+
discardRunningRecord();
|
|
3888
|
+
throw error;
|
|
3889
|
+
}
|
|
3805
3890
|
}
|
|
3806
3891
|
if (r.progress)
|
|
3807
3892
|
allProgress.push(r.progress);
|
|
@@ -3962,8 +4047,11 @@ export function bindMissionWorkflowChildAsyncLaunch(params, binding, asyncByDefa
|
|
|
3962
4047
|
}
|
|
3963
4048
|
function workflowChildResult(key, result, childParams = {}, resumeState, forcedTerminalOutcome) {
|
|
3964
4049
|
const running = missionWorkflowChildStatus(result) === "running";
|
|
3965
|
-
const
|
|
4050
|
+
const fanoutPrefix = result.details.runFanoutBudget ? `${formatRunFanoutBudget(result.details.runFanoutBudget)}
|
|
4051
|
+
` : undefined;
|
|
4052
|
+
const fullReceipt = result.content.map((part) => part.type === "text" ? part.text : "").filter(Boolean).join(`
|
|
3966
4053
|
`);
|
|
4054
|
+
const receiptOutput = fanoutPrefix && fullReceipt.startsWith(fanoutPrefix) ? fullReceipt.slice(fanoutPrefix.length) : fullReceipt;
|
|
3967
4055
|
const output = running ? "" : result.details.results.length === 1 && result.details.results[0]?.finalOutput !== undefined ? result.details.results[0].finalOutput : receiptOutput;
|
|
3968
4056
|
const childError = result.details.results.map((child) => child.error).find((error) => Boolean(error));
|
|
3969
4057
|
const stopped = result.details.results.some((child) => child.stopped);
|
|
@@ -4550,6 +4638,15 @@ function createScheduledOwnerState(source, ownerSessionId, ctx) {
|
|
|
4550
4638
|
workflowChildStops: new Map
|
|
4551
4639
|
};
|
|
4552
4640
|
}
|
|
4641
|
+
function savedWorkflowLaunchParams(params) {
|
|
4642
|
+
const { reuseFrom: _reuseFrom, scheduleOrigin: _scheduleOrigin, resumeOrigin: _resumeOrigin, ...saved } = params;
|
|
4643
|
+
return saved;
|
|
4644
|
+
}
|
|
4645
|
+
function workflowLaunchRecord(launch, cwd, scriptDigest) {
|
|
4646
|
+
if (launch.source === "structured")
|
|
4647
|
+
return { version: 1, source: "structured", scriptDigest };
|
|
4648
|
+
return { version: 1, source: launch.source, params: { ...launch.params, cwd }, scriptDigest };
|
|
4649
|
+
}
|
|
4553
4650
|
export function createSubagentExecutor(deps) {
|
|
4554
4651
|
const executorDeps = deps;
|
|
4555
4652
|
const delegatedThinkingOverrides = new WeakMap;
|
|
@@ -4557,6 +4654,8 @@ export function createSubagentExecutor(deps) {
|
|
|
4557
4654
|
const delegatedExecutions = new WeakSet;
|
|
4558
4655
|
const publicExecutions = new WeakSet;
|
|
4559
4656
|
const workflowResourcePermits = new WeakMap;
|
|
4657
|
+
const publicWorkflowLaunches = new WeakMap;
|
|
4658
|
+
const workflowResumeLaunches = new WeakMap;
|
|
4560
4659
|
const workflowPermitContexts = new WeakMap;
|
|
4561
4660
|
const warnedArtifactPackageDirs = new Set;
|
|
4562
4661
|
const scheduledOwnerExecutors = new Map;
|
|
@@ -4574,7 +4673,13 @@ export function createSubagentExecutor(deps) {
|
|
|
4574
4673
|
throw new Error(error);
|
|
4575
4674
|
}
|
|
4576
4675
|
};
|
|
4577
|
-
const
|
|
4676
|
+
const pendingReuseClaimReleases = new WeakMap;
|
|
4677
|
+
const execute = (...args) => executeRequest(...args).finally(() => {
|
|
4678
|
+
const releaseReuseClaim = pendingReuseClaimReleases.get(args[1]);
|
|
4679
|
+
pendingReuseClaimReleases.delete(args[1]);
|
|
4680
|
+
releaseReuseClaim?.();
|
|
4681
|
+
});
|
|
4682
|
+
const executeRequest = async (_id, params, signal, onUpdate, ctx, preserveActiveSession = false, parentModelOverride) => {
|
|
4578
4683
|
const projectScopeError = projectScopeTrustError(params, ctx);
|
|
4579
4684
|
if (projectScopeError)
|
|
4580
4685
|
return projectScopeError;
|
|
@@ -4587,6 +4692,8 @@ export function createSubagentExecutor(deps) {
|
|
|
4587
4692
|
const delegatedExecution = delegatedExecutions.has(params);
|
|
4588
4693
|
const publicExecution = publicExecutions.has(params);
|
|
4589
4694
|
const workflowResourcePermit = workflowResourcePermits.get(params);
|
|
4695
|
+
const workflowResumeLaunch = workflowResumeLaunches.get(params);
|
|
4696
|
+
const publicWorkflowLaunch = publicWorkflowLaunches.get(params);
|
|
4590
4697
|
const workflowPermitContext = workflowPermitContexts.get(params);
|
|
4591
4698
|
const delegatedWorkflowPermit = workflowPermitContext && "root" in workflowPermitContext ? workflowPermitContext.root : undefined;
|
|
4592
4699
|
const workflowChildPermitLaunch = workflowPermitContext && "child" in workflowPermitContext ? workflowPermitContext.child : undefined;
|
|
@@ -4659,11 +4766,6 @@ export function createSubagentExecutor(deps) {
|
|
|
4659
4766
|
if (launchBlockingErrors.length > 0) {
|
|
4660
4767
|
return buildRequestedModeError(requestParams, `Workflow '${_id}' validation failed before child launch; no children launched. ${launchBlockingErrors.map((error) => error.message).join(" ")}`);
|
|
4661
4768
|
}
|
|
4662
|
-
const structuredResource = workflowResource?.provenance.name === "chain" || workflowResource?.provenance.name === "tasks";
|
|
4663
|
-
for (const warning of workflowValidation.warnings ?? []) {
|
|
4664
|
-
if (!(structuredResource && warning.kind === "dynamic-spawn-count"))
|
|
4665
|
-
console.warn(`[dm-subagents] ${warning.message}`);
|
|
4666
|
-
}
|
|
4667
4769
|
const acceptanceErrors = validateAcceptanceInput(requestParams.acceptance);
|
|
4668
4770
|
if (acceptanceErrors.length > 0)
|
|
4669
4771
|
return buildRequestedModeError(requestParams, acceptanceErrors.join(" "));
|
|
@@ -4725,7 +4827,19 @@ export function createSubagentExecutor(deps) {
|
|
|
4725
4827
|
const workflowDepth = checkSubagentDepth(deps.config.maxSubagentDepth, deps.childRuntime).depth;
|
|
4726
4828
|
const asyncWorkflow = requestParams.async !== false;
|
|
4727
4829
|
const topLevelAsyncWorkflow = asyncWorkflow && workflowDepth === 0 && !inheritedNestedRoute(deps) && !requestParams.workflowParentRunId;
|
|
4728
|
-
const workflowRunId = asyncWorkflow ? randomUUID() : undefined;
|
|
4830
|
+
const workflowRunId = asyncWorkflow ? workflowResumeLaunch?.presetRunId ?? randomUUID() : undefined;
|
|
4831
|
+
if (requestParams.reuseFrom !== undefined && !topLevelAsyncWorkflow) {
|
|
4832
|
+
return { content: [{ type: "text", text: "options.reuseFrom requires an async top-level workflow." }], isError: true, details: { mode: "workflow", results: [] } };
|
|
4833
|
+
}
|
|
4834
|
+
let workflowReuseSource;
|
|
4835
|
+
try {
|
|
4836
|
+
if (requestParams.reuseFrom !== undefined)
|
|
4837
|
+
workflowReuseSource = readNamedWorkflowReuseSource(DIRS.async, requestParams.reuseFrom, workflowScriptDigest(requestParams.workflowScript), workflowCwd, workflowResumeLaunch?.presetRunId);
|
|
4838
|
+
else if (workflowRunId)
|
|
4839
|
+
workflowReuseSource = findWorkflowReuseSource(DIRS.async, resolveCurrentSessionId(ctx.sessionManager), workflowScriptDigest(requestParams.workflowScript), workflowArgsDigest);
|
|
4840
|
+
} catch (error) {
|
|
4841
|
+
return { content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }], isError: true, details: { mode: "workflow", results: [] } };
|
|
4842
|
+
}
|
|
4729
4843
|
let workflowCapacity;
|
|
4730
4844
|
if (workflowRunId && topLevelAsyncWorkflow) {
|
|
4731
4845
|
const currentSessionId = resolveCurrentSessionId(ctx.sessionManager);
|
|
@@ -4782,7 +4896,7 @@ export function createSubagentExecutor(deps) {
|
|
|
4782
4896
|
};
|
|
4783
4897
|
if (workflowRunId) {
|
|
4784
4898
|
const toolCallId = _id;
|
|
4785
|
-
const workflowSessionRoot = requestParams.sessionDir ? path.resolve(deps.expandTilde(requestParams.sessionDir)) :
|
|
4899
|
+
const workflowSessionRoot = requestParams.sessionDir ? path.resolve(deps.expandTilde(requestParams.sessionDir)) : trustedSessionRoots(ctx.sessionManager.getSessionFile() ?? null, deps)[0];
|
|
4786
4900
|
const asyncDir = path.join(DIRS.async, workflowRunId);
|
|
4787
4901
|
const resultPath = resultFilePath(DIRS.results, workflowRunId);
|
|
4788
4902
|
const statusPath = path.join(asyncDir, "status.json");
|
|
@@ -4793,18 +4907,41 @@ export function createSubagentExecutor(deps) {
|
|
|
4793
4907
|
const completionOwnerId = deps.state.completionOwnerId ?? currentCompletionOwnerId();
|
|
4794
4908
|
deps.state.completionOwnerId = completionOwnerId;
|
|
4795
4909
|
const workflowScriptSourceDigest = workflowScriptDigest(requestParams.workflowScript);
|
|
4796
|
-
const workflowReuseSource = findWorkflowReuseSource(DIRS.async, currentSessionId, workflowScriptSourceDigest, workflowArgsDigest);
|
|
4797
4910
|
const workflowRunEvidence = { ...workflowArgsEvidence, scriptDigest: workflowScriptSourceDigest };
|
|
4798
4911
|
if (workflowReuseSource)
|
|
4799
4912
|
workflowRunEvidence.reusedFrom = workflowReuseSource.runId;
|
|
4913
|
+
if (workflowResumeLaunch)
|
|
4914
|
+
workflowRunEvidence.resumeOrigin = workflowResumeLaunch.resumeOrigin;
|
|
4800
4915
|
const workflowJournalFingerprints = new Map;
|
|
4916
|
+
const storageFailure = (error) => {
|
|
4917
|
+
workflowCapacity?.rollback();
|
|
4918
|
+
return { content: [{ type: "text", text: `Failed to create async workflow storage: ${error instanceof Error ? error.message : String(error)}` }], isError: true, details: { mode: "workflow", results: [] } };
|
|
4919
|
+
};
|
|
4920
|
+
if (workflowReuseSource) {
|
|
4921
|
+
const reuseSourceDir = path.join(DIRS.async, workflowReuseSource.runId);
|
|
4922
|
+
let claim;
|
|
4923
|
+
try {
|
|
4924
|
+
claim = claimWorkflowResume(reuseSourceDir, { newRunId: workflowRunId, trigger: "reuse" });
|
|
4925
|
+
} catch (error) {
|
|
4926
|
+
return storageFailure(error);
|
|
4927
|
+
}
|
|
4928
|
+
if (claim.kind !== "owner") {
|
|
4929
|
+
workflowCapacity?.rollback();
|
|
4930
|
+
return { content: [{ type: "text", text: claimedWorkflowRunRefusal(workflowReuseSource.runId, claim, requestParams.reuseFrom !== undefined) }], isError: true, details: { mode: "workflow", results: [] } };
|
|
4931
|
+
}
|
|
4932
|
+
pendingReuseClaimReleases.set(params, () => {
|
|
4933
|
+
if (!fs.existsSync(statusPath))
|
|
4934
|
+
releaseWorkflowResumeClaim(reuseSourceDir, workflowRunId);
|
|
4935
|
+
});
|
|
4936
|
+
}
|
|
4801
4937
|
try {
|
|
4802
4938
|
fs.mkdirSync(asyncDir, { recursive: true });
|
|
4803
4939
|
writeRunFanoutBudgetDescriptor(asyncDir, workflowFanoutBudget);
|
|
4940
|
+
if (topLevelAsyncWorkflow && publicWorkflowLaunch)
|
|
4941
|
+
writeWorkflowLaunchRecord(asyncDir, workflowLaunchRecord(publicWorkflowLaunch, workflowCwd, workflowScriptSourceDigest));
|
|
4804
4942
|
fs.mkdirSync(DIRS.results, { recursive: true });
|
|
4805
4943
|
} catch (error) {
|
|
4806
|
-
|
|
4807
|
-
return { content: [{ type: "text", text: `Failed to create async workflow storage: ${error instanceof Error ? error.message : String(error)}` }], isError: true, details: { mode: "workflow", results: [] } };
|
|
4944
|
+
return storageFailure(error);
|
|
4808
4945
|
}
|
|
4809
4946
|
const controller = new AbortController;
|
|
4810
4947
|
deps.state.workflowControllers ??= new Map;
|
|
@@ -4826,7 +4963,7 @@ export function createSubagentExecutor(deps) {
|
|
|
4826
4963
|
cwd: workflowCwd,
|
|
4827
4964
|
...workflowSessionRoot ? { sessionRoot: workflowSessionRoot } : {},
|
|
4828
4965
|
...requestParams.scheduleOrigin ? { scheduleOrigin: requestParams.scheduleOrigin } : {},
|
|
4829
|
-
|
|
4966
|
+
...currentRecordedPid(),
|
|
4830
4967
|
...workflowCapabilityCeiling ? { admissionCapabilityCeiling: workflowCapabilityCeiling } : {},
|
|
4831
4968
|
steps: [],
|
|
4832
4969
|
...workflowPreflight ? { preflight: workflowPreflight } : {},
|
|
@@ -4879,7 +5016,9 @@ export function createSubagentExecutor(deps) {
|
|
|
4879
5016
|
try {
|
|
4880
5017
|
(deps.parentWake ?? deps.dm).sendMessage({
|
|
4881
5018
|
customType: "subagent-workflow-result-write-failed",
|
|
4882
|
-
content: message
|
|
5019
|
+
content: `${message}
|
|
5020
|
+
|
|
5021
|
+
Parent action: ${STATUS_ACTION}`,
|
|
4883
5022
|
display: true
|
|
4884
5023
|
}, { triggerTurn: true });
|
|
4885
5024
|
resultWriteFailureWakeDelivered = true;
|
|
@@ -5185,6 +5324,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5185
5324
|
const childOutputClaimPaths = new Map;
|
|
5186
5325
|
const producedChildOutputPaths = new Set;
|
|
5187
5326
|
const workflowSteps = new Map;
|
|
5327
|
+
const dispatchedWorkflowChildKeys = new Set;
|
|
5188
5328
|
const announcedWorkflowChildren = new Set;
|
|
5189
5329
|
const announceWorkflowChild = (key, step) => {
|
|
5190
5330
|
if (announcedWorkflowChildren.has(key))
|
|
@@ -5269,6 +5409,8 @@ export function createSubagentExecutor(deps) {
|
|
|
5269
5409
|
if (entry.state === "reused" && existing) {
|
|
5270
5410
|
continue;
|
|
5271
5411
|
}
|
|
5412
|
+
if (entry.state === "stopped" && existing?.async === true && existing.runId && workflowStopCause(controller.signal.reason))
|
|
5413
|
+
continue;
|
|
5272
5414
|
const mapped = entry.state === "started" || entry.state === "reused" ? "running" : entry.state === "completed" ? "completed" : entry.state === "stopped" ? "stopped" : entry.state === "detached" ? "paused" : "failed";
|
|
5273
5415
|
if (existing) {
|
|
5274
5416
|
existing.status = mapped;
|
|
@@ -5276,7 +5418,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5276
5418
|
existing.agent = entry.agent;
|
|
5277
5419
|
if (entry.runId)
|
|
5278
5420
|
existing.runId = entry.runId;
|
|
5279
|
-
if (entry.state === "failed" && !entry.runId && existing.async === undefined)
|
|
5421
|
+
if ((entry.state === "failed" || entry.state === "stopped" && !dispatchedWorkflowChildKeys.has(entry.key)) && !entry.runId && existing.async === undefined)
|
|
5280
5422
|
existing.async = false;
|
|
5281
5423
|
if (entry.state === "detached")
|
|
5282
5424
|
existing.activityState = "needs_attention";
|
|
@@ -5306,7 +5448,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5306
5448
|
startedAt: Date.now(),
|
|
5307
5449
|
...entryPhase ? { phase: entryPhase } : {},
|
|
5308
5450
|
...entry.runId ? { runId: entry.runId } : {},
|
|
5309
|
-
...entry.state === "failed" && !entry.runId ? { async: false } : {},
|
|
5451
|
+
...(entry.state === "failed" || entry.state === "stopped" && !dispatchedWorkflowChildKeys.has(entry.key)) && !entry.runId ? { async: false } : {},
|
|
5310
5452
|
...entry.state === "detached" ? { activityState: "needs_attention" } : {},
|
|
5311
5453
|
...entry.state === "stopped" ? { stopped: true } : {}
|
|
5312
5454
|
};
|
|
@@ -5339,6 +5481,15 @@ export function createSubagentExecutor(deps) {
|
|
|
5339
5481
|
persist({ tolerateStatusWriteFailure: true });
|
|
5340
5482
|
appendWorkflowEvent({ type: "subagent.workflow.trace", trace });
|
|
5341
5483
|
};
|
|
5484
|
+
const recordReusedWorkflowChild = (key, runId) => {
|
|
5485
|
+
const step = status.steps?.find((candidate) => candidate.workflowKey === key);
|
|
5486
|
+
if (!step)
|
|
5487
|
+
return;
|
|
5488
|
+
if (runId)
|
|
5489
|
+
step.runId = runId;
|
|
5490
|
+
step.async = runId !== undefined && path.basename(runId) === runId && fs.existsSync(path.join(path.dirname(asyncDir), runId));
|
|
5491
|
+
persist({ tolerateStatusWriteFailure: true });
|
|
5492
|
+
};
|
|
5342
5493
|
try {
|
|
5343
5494
|
const workflow = await runWorkflowScript({
|
|
5344
5495
|
script: workflowScript,
|
|
@@ -5384,12 +5535,16 @@ export function createSubagentExecutor(deps) {
|
|
|
5384
5535
|
workflowRunning: notification.workflowRunning
|
|
5385
5536
|
});
|
|
5386
5537
|
try {
|
|
5538
|
+
const triggerTurn = incrementalChildCompletionTriggersTurn(notification, requestParams.scheduleOrigin);
|
|
5539
|
+
const content = formatIncrementalChildCompletion(notification);
|
|
5387
5540
|
(deps.parentWake ?? deps.dm).sendMessage({
|
|
5388
5541
|
customType: "subagent-incremental-child-notify",
|
|
5389
|
-
content:
|
|
5542
|
+
content: triggerTurn ? `${content}
|
|
5543
|
+
|
|
5544
|
+
Parent action: ${COMPLETION_ACTION}` : content,
|
|
5390
5545
|
display: notification.outcome !== "completed",
|
|
5391
5546
|
details: { childKey: notification.childKey, outcome: notification.outcome }
|
|
5392
|
-
}, { triggerTurn
|
|
5547
|
+
}, { triggerTurn });
|
|
5393
5548
|
} catch (sendError) {
|
|
5394
5549
|
console.error(`Failed to send incremental child completion notification for '${notification.childKey}':`, sendError);
|
|
5395
5550
|
}
|
|
@@ -5436,13 +5591,15 @@ export function createSubagentExecutor(deps) {
|
|
|
5436
5591
|
if (priorChild?.kind === "settled") {
|
|
5437
5592
|
if (priorChild.result.runId)
|
|
5438
5593
|
workflowChildRunIds.set(key, priorChild.result.runId);
|
|
5594
|
+
recordReusedWorkflowChild(key, priorChild.result.runId);
|
|
5439
5595
|
return { ...priorChild.result, reused: true };
|
|
5440
5596
|
}
|
|
5441
5597
|
if (priorChild?.kind === "started") {
|
|
5442
5598
|
const priorRunId = priorChild.runId;
|
|
5443
5599
|
const priorAsyncDir = path.join(DIRS.async, priorRunId);
|
|
5444
5600
|
appendWorkflowChildJournal(asyncDir, { type: "start", key, fingerprint: journalFingerprint, runId: priorRunId });
|
|
5445
|
-
|
|
5601
|
+
recordReusedWorkflowChild(key, priorRunId);
|
|
5602
|
+
const stopListener = stopAwaitedAsyncChildOnAbort(workflowSignal, deps.state, priorRunId, priorAsyncDir, deps.kill, true);
|
|
5446
5603
|
const reattached = await awaitExistingAsyncRun(priorAsyncDir, priorRunId, workflowSignal).finally(stopListener.remove);
|
|
5447
5604
|
const claimedPath = reattached.status === "settled" ? claimWorkflowAwaitedResult(priorAsyncDir, workflowRunId, { ...reattached.result.importedPublication, runId: priorRunId }) : undefined;
|
|
5448
5605
|
if (reattached.status === "settled" && claimedPath) {
|
|
@@ -5454,6 +5611,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5454
5611
|
}
|
|
5455
5612
|
}
|
|
5456
5613
|
}
|
|
5614
|
+
dispatchedWorkflowChildKeys.add(key);
|
|
5457
5615
|
if (workflowUsageBudget.budget && childParams.async === true)
|
|
5458
5616
|
return workflowChildResult(key, buildRequestedModeError(childParams, "workflow usageBudget does not support async runs.run launches."), childParams, deps.state);
|
|
5459
5617
|
const budgetState = usageBudgetState(workflowUsageBudget.budget, sumResultsCost(workflowResults));
|
|
@@ -5632,7 +5790,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5632
5790
|
status = promoted;
|
|
5633
5791
|
}
|
|
5634
5792
|
const errorPreview = status.error && status.error.length > 1000 ? `${status.error.slice(0, 1000)}… (truncated; full error: ${statusPath} (error))` : status.error;
|
|
5635
|
-
const terminalSummary = `${status.state === "complete" ? "Workflow completed after detached child finished." : errorPreview ?? (pauseForDetached ? "Workflow paused." : "Workflow failed.")}${stopCause ? ` ${
|
|
5793
|
+
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(" ")}` : ""}`;
|
|
5636
5794
|
const outputWarning = writeWorkflowAggregateOutput(workflowAggregateOutputPath, terminalSummary, producedChildOutputPaths);
|
|
5637
5795
|
const resultSummary = appendWorkflowOutputWarning(terminalSummary, outputWarning);
|
|
5638
5796
|
const receiptState = status.state === "complete" ? "complete" : status.state === "paused" ? "paused" : status.state === "stopped" ? "stopped" : "failed";
|
|
@@ -5696,6 +5854,8 @@ export function createSubagentExecutor(deps) {
|
|
|
5696
5854
|
const workflowHostSteps = new Map;
|
|
5697
5855
|
let liveWorkflow = { trace: [], emits: [], console: [], ...workflowResource ? { resource: workflowResource.provenance } : {} };
|
|
5698
5856
|
const childProgress = new Map;
|
|
5857
|
+
const childLaunches = new Map;
|
|
5858
|
+
const blockingWorkflowChildren = new Set;
|
|
5699
5859
|
let activityTimer;
|
|
5700
5860
|
let lastProgressAt = 0;
|
|
5701
5861
|
let workflowProgressClosed = false;
|
|
@@ -5708,7 +5868,7 @@ export function createSubagentExecutor(deps) {
|
|
|
5708
5868
|
clearTimeout(activityTimer);
|
|
5709
5869
|
activityTimer = undefined;
|
|
5710
5870
|
lastProgressAt = Date.now();
|
|
5711
|
-
const liveWorkflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "running", inventoryComplete: false, trace: liveWorkflow.trace, progress: childProgress });
|
|
5871
|
+
const liveWorkflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "running", inventoryComplete: false, trace: liveWorkflow.trace, progress: childProgress, launches: childLaunches });
|
|
5712
5872
|
onUpdate?.(workflowProgressUpdate(foregroundWorkflowRunId, chatProgress, liveWorkflow, liveWorkflowChildren, workflowPreflight));
|
|
5713
5873
|
};
|
|
5714
5874
|
try {
|
|
@@ -5794,11 +5954,23 @@ export function createSubagentExecutor(deps) {
|
|
|
5794
5954
|
throw new Error("Workflow child permit supports native DM children only.");
|
|
5795
5955
|
workflowPermitContexts.set(childRequest, { child: { permit: delegatedWorkflowPermit, workflowRunId: foregroundWorkflowRunId, childKey: key } });
|
|
5796
5956
|
}
|
|
5797
|
-
workflowLaunchObservers.set(childRequest, (launch) =>
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5957
|
+
workflowLaunchObservers.set(childRequest, (launch) => {
|
|
5958
|
+
if (launch.async && launch.runId && (childRequest.workflowAwaitAsync === true || childRequest.action === "resume")) {
|
|
5959
|
+
(deps.state.blockingWorkflowChildren ??= new Set).add(launch.runId);
|
|
5960
|
+
blockingWorkflowChildren.add(launch.runId);
|
|
5961
|
+
}
|
|
5962
|
+
childLaunches.set(key, { agent: launch.agent, ...launch.runId ? { runId: launch.runId } : {} });
|
|
5963
|
+
try {
|
|
5964
|
+
sendWorkflowProgress();
|
|
5965
|
+
} catch (error) {
|
|
5966
|
+
console.error("Workflow progress update failed:", error);
|
|
5967
|
+
}
|
|
5968
|
+
recordMissionWorkflowChild(missionBinding, foregroundWorkflowRunId, key, {
|
|
5969
|
+
status: "running",
|
|
5970
|
+
agent: launch.agent,
|
|
5971
|
+
...launch.sessionFile ? { sessionPath: launch.sessionFile } : {}
|
|
5972
|
+
});
|
|
5973
|
+
});
|
|
5802
5974
|
return execute(randomUUID(), childRequest, workflowSignal, (update) => {
|
|
5803
5975
|
const progress = update.details.progress?.[0];
|
|
5804
5976
|
if (!progress)
|
|
@@ -5920,6 +6092,8 @@ ${partial.console.map((entry) => `[${entry.level}] ${entry.text}`).join(`
|
|
|
5920
6092
|
}, workflowFanoutBudget));
|
|
5921
6093
|
} finally {
|
|
5922
6094
|
workflowProgressClosed = true;
|
|
6095
|
+
for (const runId of blockingWorkflowChildren)
|
|
6096
|
+
deps.state.blockingWorkflowChildren?.delete(runId);
|
|
5923
6097
|
if (activityTimer)
|
|
5924
6098
|
clearTimeout(activityTimer);
|
|
5925
6099
|
childProgress.clear();
|
|
@@ -6324,7 +6498,7 @@ ${item.text}` } : item)
|
|
|
6324
6498
|
};
|
|
6325
6499
|
};
|
|
6326
6500
|
const nestedScope = nestedResolutionScopeForExecutor(deps);
|
|
6327
|
-
const sessionRoots =
|
|
6501
|
+
const sessionRoots = trustedSessionRoots(ctx.sessionManager.getSessionFile() ?? null, deps);
|
|
6328
6502
|
if (action === "debug.run") {
|
|
6329
6503
|
if (!targetRunId && !hasDirectoryTarget) {
|
|
6330
6504
|
return withBudget({ content: [{ type: "text", text: "action='debug.run' requires id, runId, or dir." }], isError: true, details: { mode: "management", results: [] } });
|
|
@@ -6358,6 +6532,9 @@ ${item.text}` } : item)
|
|
|
6358
6532
|
return withBudget(inspectSubagentStatus(paramsWithResolvedCwd, omitUndefinedProperties({ state: deps.state, nested: nestedScope, sessionRoots, abandonedSlotReleaseAfterMs: resolveAbandonedSlotReleaseAfterMs(deps.config.capacity?.abandonedSlotReleaseAfterMs) })));
|
|
6359
6533
|
}
|
|
6360
6534
|
if (action === "resume") {
|
|
6535
|
+
const workflowResumeSourceId = workflowResumeTargetId(DIRS.async, paramsWithResolvedCwd);
|
|
6536
|
+
if (workflowResumeSourceId)
|
|
6537
|
+
return resumeWorkflowById(_id, workflowResumeSourceId, signal, ctx);
|
|
6361
6538
|
return resumeAsyncRun(omitUndefinedProperties({
|
|
6362
6539
|
params: paramsWithResolvedCwd,
|
|
6363
6540
|
requestCwd,
|
|
@@ -6633,7 +6810,7 @@ ${item.text}` } : item)
|
|
|
6633
6810
|
...ctx,
|
|
6634
6811
|
cwd: requestCwd,
|
|
6635
6812
|
config: deps.config,
|
|
6636
|
-
|
|
6813
|
+
piSessionId: ctx.sessionManager.getSessionId() ?? undefined,
|
|
6637
6814
|
discoverAgentsAll: deps.discoverAgentsAll,
|
|
6638
6815
|
runtimeAgentOwner: deps.dm,
|
|
6639
6816
|
onAgentsChanged: deps.onAgentsChanged
|
|
@@ -6728,10 +6905,18 @@ ${item.text}` } : item)
|
|
|
6728
6905
|
for (const agent of launchable)
|
|
6729
6906
|
assertAgentAllowedByCapabilityCeiling(agent, ceiling);
|
|
6730
6907
|
};
|
|
6908
|
+
let sessionRunId;
|
|
6731
6909
|
try {
|
|
6732
6910
|
assertLaunchableAgentsAllowedBeforeFork();
|
|
6733
6911
|
const pruneSession = contextPolicy.usesFork && deps.config.forkContext?.mode === "pruned" ? await createPrunedForkSessionWriter(ctx, deps.config.forkContext, signal) : undefined;
|
|
6734
|
-
const forkContextResolver = createForkContextResolver(ctx.sessionManager, contextPolicy.usesFork ? "fork" : undefined,
|
|
6912
|
+
const forkContextResolver = createForkContextResolver(ctx.sessionManager, contextPolicy.usesFork ? "fork" : undefined, {
|
|
6913
|
+
...pruneSession ? { pruneSession } : {},
|
|
6914
|
+
runDirName: () => {
|
|
6915
|
+
if (!sessionRunId)
|
|
6916
|
+
throw new Error("A fork session was requested before the launch's run id was assigned.");
|
|
6917
|
+
return sessionRunId;
|
|
6918
|
+
}
|
|
6919
|
+
});
|
|
6735
6920
|
prepareForkSessionForIndex = forkContextResolver.prepareSessionForIndex;
|
|
6736
6921
|
forkSessionFileForIndex = forkContextResolver.sessionFileForIndex;
|
|
6737
6922
|
} catch (error) {
|
|
@@ -6818,11 +7003,12 @@ ${item.text}` } : item)
|
|
|
6818
7003
|
console.warn(`[dm-subagents] ${warning}`);
|
|
6819
7004
|
}
|
|
6820
7005
|
let sessionRoot;
|
|
7006
|
+
sessionRunId = effectiveAsync ? asyncRunId : runId;
|
|
6821
7007
|
if (effectiveParams.sessionDir) {
|
|
6822
|
-
sessionRoot = path.join(path.resolve(deps.expandTilde(effectiveParams.sessionDir)),
|
|
7008
|
+
sessionRoot = path.join(path.resolve(deps.expandTilde(effectiveParams.sessionDir)), sessionRunId);
|
|
6823
7009
|
} else {
|
|
6824
7010
|
const baseSessionRoot = deps.config.defaultSessionDir ? path.resolve(deps.expandTilde(deps.config.defaultSessionDir)) : deps.getSubagentSessionRoot(parentSessionFile);
|
|
6825
|
-
sessionRoot = path.join(baseSessionRoot,
|
|
7011
|
+
sessionRoot = path.join(baseSessionRoot, sessionRunId);
|
|
6826
7012
|
}
|
|
6827
7013
|
try {
|
|
6828
7014
|
fs.mkdirSync(sessionRoot, { recursive: true });
|
|
@@ -7169,6 +7355,8 @@ ${item.text}` } : item)
|
|
|
7169
7355
|
const workflow = publicParams.workflow;
|
|
7170
7356
|
const errorResult = (text) => Promise.resolve({ content: [{ type: "text", text }], isError: true, details: { mode: publicParams.action ? "management" : "workflow", results: [] } });
|
|
7171
7357
|
const scriptTextHint = " A workflow string is a named workflow resource or a script file path. To run script text, write it in one ```js workflow block in the same reply and call subagent({ workflow: true }).";
|
|
7358
|
+
let workflowLaunch;
|
|
7359
|
+
const workflowResumeLaunch = workflowResumeLaunches.get(params);
|
|
7172
7360
|
if (publicParams.tasks !== undefined || publicParams.chain !== undefined) {
|
|
7173
7361
|
const kind = publicParams.tasks !== undefined ? "tasks" : "chain";
|
|
7174
7362
|
const resolved = resolveStructuredWorkflowResource({ kind, steps: publicParams[kind], task: publicParams.task });
|
|
@@ -7177,11 +7365,21 @@ ${item.text}` } : item)
|
|
|
7177
7365
|
const { tasks: _tasks, chain: _chain, task: _task, ...withoutStructuredInput } = publicParams;
|
|
7178
7366
|
publicParams = { ...withoutStructuredInput, workflowScript: resolved.resource.script };
|
|
7179
7367
|
workflowResourcePermits.set(publicParams, resolved.resource.permit);
|
|
7368
|
+
workflowLaunch = { source: "structured" };
|
|
7180
7369
|
} else if (typeof workflow === "string" && !isWorkflowScriptPath(workflow)) {
|
|
7181
7370
|
const resolved = resolveWorkflowResource(workflow, publicParams.args, ctx.sessionManager.getSessionId() ?? undefined);
|
|
7371
|
+
if (workflowResumeLaunch && !resolved.ok) {
|
|
7372
|
+
workflowResumeLaunch.refusal = { code: "authority", reason: `workflow resource '${workflow}' can no longer be resolved: ${resolved.error}` };
|
|
7373
|
+
return errorResult(workflowResumeLaunch.refusal.reason);
|
|
7374
|
+
}
|
|
7375
|
+
if (workflowResumeLaunch && resolved.ok && workflowScriptDigest(resolved.resource.script) !== workflowResumeLaunch.expectedScriptDigest) {
|
|
7376
|
+
workflowResumeLaunch.refusal = { code: "digest", reason: `workflow resource '${workflow}' changed since the run started` };
|
|
7377
|
+
return errorResult(workflowResumeLaunch.refusal.reason);
|
|
7378
|
+
}
|
|
7182
7379
|
if (!resolved.ok)
|
|
7183
7380
|
return Promise.resolve({ content: [{ type: "text", text: resolved.error + scriptTextHint }], isError: true, details: { mode: "workflow", results: [] } });
|
|
7184
7381
|
const { workflow: _workflow, args: _args, ...withoutResourceInput } = publicParams;
|
|
7382
|
+
workflowLaunch = { source: "resource", params: savedWorkflowLaunchParams(publicParams) };
|
|
7185
7383
|
publicParams = { ...withoutResourceInput, workflowScript: resolved.resource.script };
|
|
7186
7384
|
workflowResourcePermits.set(publicParams, resolved.resource.permit);
|
|
7187
7385
|
} else if (workflow !== undefined || publicParams.workflowScript !== undefined) {
|
|
@@ -7198,10 +7396,63 @@ ${item.text}` } : item)
|
|
|
7198
7396
|
}
|
|
7199
7397
|
const { workflow: _workflow, ...withoutWorkflowSource } = publicParams;
|
|
7200
7398
|
publicParams = { ...withoutWorkflowSource, workflowScript, args: "error" in normalizedArgs ? publicParams.args : deepFreezeWorkflowArgs(normalizedArgs.args) };
|
|
7399
|
+
workflowLaunch = { source: "script", params: savedWorkflowLaunchParams(publicParams) };
|
|
7201
7400
|
}
|
|
7401
|
+
if (workflowLaunch && publicParams.action === undefined)
|
|
7402
|
+
publicWorkflowLaunches.set(publicParams, workflowLaunch);
|
|
7403
|
+
if (workflowResumeLaunch)
|
|
7404
|
+
workflowResumeLaunches.set(publicParams, workflowResumeLaunch);
|
|
7202
7405
|
publicExecutions.add(publicParams);
|
|
7203
7406
|
return executeWithSingleDispatchGuard(id, publicParams, signal, onUpdate, ctx);
|
|
7204
7407
|
};
|
|
7408
|
+
const executeWorkflowResume = async (id, prepared, signal, ctx) => {
|
|
7409
|
+
const params = { ...prepared.params };
|
|
7410
|
+
const launch = { presetRunId: prepared.newRunId, resumeOrigin: prepared.resumeOrigin, expectedScriptDigest: prepared.expectedScriptDigest };
|
|
7411
|
+
workflowResumeLaunches.set(params, launch);
|
|
7412
|
+
let result;
|
|
7413
|
+
try {
|
|
7414
|
+
result = await executePublic(id, params, signal, undefined, ctx);
|
|
7415
|
+
} catch (error) {
|
|
7416
|
+
result = { content: [{ type: "text", text: error instanceof Error ? error.message : String(error) }], isError: true, details: { mode: "workflow", results: [] } };
|
|
7417
|
+
}
|
|
7418
|
+
if (resumedRunStarted(prepared.sourceAsyncDir, prepared.newRunId))
|
|
7419
|
+
return { result, launched: true };
|
|
7420
|
+
const firstText = result.content.find((block) => block.type === "text")?.text ?? "no result";
|
|
7421
|
+
const refusal = launch.refusal ? workflowResumeRefusal(launch.refusal.code, launch.refusal.reason, prepared.sourceRunId) : result.details?.activeAsyncCapacity ? workflowResumeRefusal("capacity", `capacity refused: ${firstText}`, prepared.sourceRunId) : workflowResumeRefusal("launch-failed", `launch failed: ${firstText}`, prepared.sourceRunId);
|
|
7422
|
+
releaseWorkflowResumeClaim(prepared.sourceAsyncDir, prepared.newRunId);
|
|
7423
|
+
if (prepared.trigger === "auto") {
|
|
7424
|
+
try {
|
|
7425
|
+
recordWorkflowResumeRefusal(prepared.sourceAsyncDir, { reason: refusal.reason, byHand: refusal.byHand, newRunId: prepared.newRunId });
|
|
7426
|
+
} catch (error) {
|
|
7427
|
+
console.error(`Failed to record why workflow ${prepared.sourceRunId} was not resumed:`, error);
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7430
|
+
return { result, launched: false, refusal };
|
|
7431
|
+
};
|
|
7432
|
+
const resumeWorkflowById = async (id, sourceRunId, signal, ctx) => {
|
|
7433
|
+
const refused = (text) => ({ content: [{ type: "text", text }], isError: true, details: { mode: "management", results: [] } });
|
|
7434
|
+
let preparation;
|
|
7435
|
+
try {
|
|
7436
|
+
preparation = prepareWorkflowResume({ asyncDirRoot: DIRS.async, sourceRunId, trigger: "manual", now: Date.now(), currentSessionId: resolveCurrentSessionId(ctx.sessionManager) });
|
|
7437
|
+
} catch (error) {
|
|
7438
|
+
return refused(`Cannot resume workflow '${sourceRunId}': ${error instanceof Error ? error.message : String(error)}`);
|
|
7439
|
+
}
|
|
7440
|
+
if (!preparation.ok)
|
|
7441
|
+
return refused(manualWorkflowResumeRefusalText(sourceRunId, preparation));
|
|
7442
|
+
const outcome = await executeWorkflowResume(id, preparation.prepared, signal, ctx);
|
|
7443
|
+
if (!outcome.launched)
|
|
7444
|
+
return refused(manualWorkflowResumeRefusalText(sourceRunId, outcome.refusal));
|
|
7445
|
+
const resumedLine = `Resumed workflow '${sourceRunId}' as ${preparation.prepared.newRunId}.`;
|
|
7446
|
+
const textIndex = outcome.result.content.findIndex((block) => block.type === "text");
|
|
7447
|
+
const content = [...outcome.result.content];
|
|
7448
|
+
const first = content[textIndex];
|
|
7449
|
+
if (first?.type === "text")
|
|
7450
|
+
content[textIndex] = { ...first, text: `${resumedLine}
|
|
7451
|
+
${first.text}` };
|
|
7452
|
+
else
|
|
7453
|
+
content.unshift({ type: "text", text: resumedLine });
|
|
7454
|
+
return { ...outcome.result, content };
|
|
7455
|
+
};
|
|
7205
7456
|
const executeDelegated = async (id, params, signal, onUpdate, ctx) => {
|
|
7206
7457
|
const disabledFeatureError = disabledFeatureResult(params);
|
|
7207
7458
|
if (disabledFeatureError)
|
|
@@ -7246,5 +7497,5 @@ ${item.text}` } : item)
|
|
|
7246
7497
|
for (const owner of scheduledOwnerExecutors.get(ownerId)?.values() ?? [])
|
|
7247
7498
|
yield owner.state;
|
|
7248
7499
|
}
|
|
7249
|
-
return { execute: executeWithSingleDispatchGuard, executePublic, executeDelegated, executeScheduled, getCurrentSupervisorOwnerStates };
|
|
7500
|
+
return { execute: executeWithSingleDispatchGuard, executePublic, executeDelegated, executeScheduled, executeWorkflowResume, getCurrentSupervisorOwnerStates };
|
|
7250
7501
|
}
|