@bastani/atomic 0.9.13-alpha.1 → 0.9.13-alpha.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/CHANGELOG.md +130 -0
- package/README.md +35 -17
- package/dist/builtin/i-have-adhd/CHANGELOG.md +17 -0
- package/dist/builtin/i-have-adhd/LICENSE +21 -0
- package/dist/builtin/i-have-adhd/README.md +18 -0
- package/dist/builtin/i-have-adhd/index.ts +238 -0
- package/dist/builtin/i-have-adhd/package.json +56 -0
- package/dist/builtin/i-have-adhd/skills/i-have-adhd/SKILL.md +140 -0
- package/dist/builtin/intercom/CHANGELOG.md +19 -0
- package/dist/builtin/intercom/README.md +25 -4
- package/dist/builtin/intercom/broker/bounded-stderr-install.ts +18 -0
- package/dist/builtin/intercom/broker/bounded-stderr.ts +132 -0
- package/dist/builtin/intercom/broker/broker.ts +12 -23
- package/dist/builtin/intercom/broker/client.ts +70 -3
- package/dist/builtin/intercom/broker/paths.ts +9 -0
- package/dist/builtin/intercom/broker/presence-handler.ts +103 -0
- package/dist/builtin/intercom/broker/spawn.ts +128 -29
- package/dist/builtin/intercom/foreground-detach-handoff.ts +30 -14
- package/dist/builtin/intercom/group.ts +64 -25
- package/dist/builtin/intercom/index-heavy.ts +38 -5
- package/dist/builtin/intercom/index.ts +7 -3
- package/dist/builtin/intercom/intercom-tool.ts +82 -5
- package/dist/builtin/intercom/lazy-subagent-ack.ts +11 -6
- package/dist/builtin/intercom/package.json +2 -3
- package/dist/builtin/intercom/runtime-group.ts +13 -0
- package/dist/builtin/intercom/skills/intercom/SKILL.md +30 -2
- package/dist/builtin/intercom/subagent-relay.ts +32 -16
- package/dist/builtin/intercom/terminal-ordering-barrier.ts +21 -4
- package/dist/builtin/intercom/types.ts +3 -1
- package/dist/builtin/intercom/ui/compose.ts +8 -6
- package/dist/builtin/intercom/ui/session-list.ts +7 -5
- package/dist/builtin/mcp/CHANGELOG.md +13 -0
- package/dist/builtin/mcp/glimpse-ui.ts +2 -1
- package/dist/builtin/mcp/index.ts +1 -11
- package/dist/builtin/mcp/mcp-panel.ts +35 -34
- package/dist/builtin/mcp/mcp-setup-panel.ts +35 -33
- package/dist/builtin/mcp/npx-resolver.ts +3 -2
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/mcp/sampling-handler.ts +5 -1
- package/dist/builtin/mcp/server-manager.ts +4 -7
- package/dist/builtin/subagents/CHANGELOG.md +33 -0
- package/dist/builtin/subagents/README.md +124 -323
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +5 -5
- package/dist/builtin/subagents/prompts/parallel-context-build.md +2 -2
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +4 -4
- package/dist/builtin/subagents/prompts/review-loop.md +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +39 -102
- package/dist/builtin/subagents/src/agents/agent-discovery.ts +1 -29
- package/dist/builtin/subagents/src/agents/agent-loaders.ts +1 -40
- package/dist/builtin/subagents/src/agents/agent-management-helpers.ts +6 -135
- package/dist/builtin/subagents/src/agents/agent-management.ts +52 -282
- package/dist/builtin/subagents/src/agents/agent-paths.ts +0 -22
- package/dist/builtin/subagents/src/agents/agent-types.ts +0 -40
- package/dist/builtin/subagents/src/agents/agents.ts +0 -3
- package/dist/builtin/subagents/src/agents/identity.ts +2 -4
- package/dist/builtin/subagents/src/agents/skills-paths.ts +8 -1
- package/dist/builtin/subagents/src/extension/doctor.ts +3 -23
- package/dist/builtin/subagents/src/extension/index.ts +9 -7
- package/dist/builtin/subagents/src/extension/prompt-guidance.ts +2 -2
- package/dist/builtin/subagents/src/extension/schemas.ts +1 -157
- package/dist/builtin/subagents/src/extension/startup-maintenance.ts +0 -2
- package/dist/builtin/subagents/src/extension/tool-description.ts +4 -13
- package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +6 -2
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +20 -22
- package/dist/builtin/subagents/src/intercom/supervisor-authorization.ts +9 -2
- package/dist/builtin/subagents/src/runs/background/async-job-tracker.ts +97 -16
- package/dist/builtin/subagents/src/runs/background/completion-notification.ts +8 -3
- package/dist/builtin/subagents/src/runs/background/notify.ts +54 -18
- package/dist/builtin/subagents/src/runs/foreground/execution-updates.ts +0 -5
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +1 -4
- package/dist/builtin/subagents/src/runs/foreground/inprocess-run-sync.ts +117 -15
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-async.ts +11 -40
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +11 -22
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-input.ts +10 -173
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +6 -4
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +9 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +9 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +32 -12
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +2 -6
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-worktree.ts +1 -14
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +56 -31
- package/dist/builtin/subagents/src/runs/inprocess/background-single.ts +46 -30
- package/dist/builtin/subagents/src/runs/inprocess/background.ts +2 -1
- package/dist/builtin/subagents/src/runs/inprocess/runner.ts +343 -89
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-projection.ts +0 -2
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-sanitize.ts +1 -3
- package/dist/builtin/subagents/src/runs/shared/intercom-group.ts +23 -7
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +0 -86
- package/dist/builtin/subagents/src/runs/shared/worktree.ts +7 -2
- package/dist/builtin/subagents/src/shared/formatters.ts +2 -56
- package/dist/builtin/subagents/src/shared/settings.ts +14 -350
- package/dist/builtin/subagents/src/shared/types-async.ts +8 -31
- package/dist/builtin/subagents/src/shared/types-config.ts +20 -22
- package/dist/builtin/subagents/src/shared/types-depth.ts +30 -56
- package/dist/builtin/subagents/src/shared/types-results.ts +9 -58
- package/dist/builtin/subagents/src/shared/types-runtime.ts +0 -1
- package/dist/builtin/subagents/src/shared/utils.ts +5 -0
- package/dist/builtin/subagents/src/slash/bridge-settlement.ts +87 -0
- package/dist/builtin/subagents/src/slash/prompt-template-bridge.ts +47 -7
- package/dist/builtin/subagents/src/slash/slash-bridge.ts +27 -7
- package/dist/builtin/subagents/src/slash/slash-commands.ts +37 -82
- package/dist/builtin/subagents/src/slash/slash-live-state.ts +1 -92
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -35
- package/dist/builtin/subagents/src/tui/render-progress.ts +89 -0
- package/dist/builtin/subagents/src/tui/render-result-compact.ts +43 -71
- package/dist/builtin/subagents/src/tui/render-result.ts +41 -90
- package/dist/builtin/subagents/src/tui/render-stable-output.ts +0 -5
- package/dist/builtin/subagents/src/tui/render-widget-graph.ts +6 -55
- package/dist/builtin/web-access/CHANGELOG.md +14 -0
- package/dist/builtin/web-access/chrome-cookies.ts +3 -2
- package/dist/builtin/web-access/github-api.ts +7 -6
- package/dist/builtin/web-access/github-extract.ts +2 -1
- package/dist/builtin/web-access/package.json +3 -3
- package/dist/builtin/web-access/subprocess.ts +3 -1
- package/dist/builtin/web-access/summary-review.ts +2 -2
- package/dist/builtin/web-access/web-search-features.ts +38 -22
- package/dist/builtin/web-access/web-search-summary.ts +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +45 -0
- package/dist/builtin/workflows/README.md +41 -1
- package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +3 -0
- package/dist/builtin/workflows/builtin/ralph-models.ts +25 -20
- package/dist/builtin/workflows/builtin/shared-prompts.ts +5 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/durable/backend.ts +18 -1
- package/dist/builtin/workflows/src/durable/completed-catalog-stage-groups.ts +60 -3
- package/dist/builtin/workflows/src/durable/completed-catalog.ts +67 -1
- package/dist/builtin/workflows/src/durable/completed-subtree.ts +22 -7
- package/dist/builtin/workflows/src/durable/dbos-metadata.ts +4 -0
- package/dist/builtin/workflows/src/durable/local-command.ts +2 -1
- package/dist/builtin/workflows/src/durable/types.ts +17 -1
- package/dist/builtin/workflows/src/durable/workflow-child-result.ts +3 -1
- package/dist/builtin/workflows/src/engine/primitives/workflow.ts +1 -1
- package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +10 -2
- package/dist/builtin/workflows/src/engine/run-durable-topology.ts +9 -2
- package/dist/builtin/workflows/src/extension/atomic-stage-session.ts +7 -1
- package/dist/builtin/workflows/src/extension/companions.ts +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +947 -447
- package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +31 -3
- package/dist/builtin/workflows/src/extension/mcp.ts +13 -2
- package/dist/builtin/workflows/src/extension/render-result.ts +1 -0
- package/dist/builtin/workflows/src/extension/ui-surface.ts +7 -20
- package/dist/builtin/workflows/src/extension/wiring.ts +33 -6
- package/dist/builtin/workflows/src/extension/workflow-ports.ts +14 -6
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +11 -6
- package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +8 -0
- package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +2 -0
- package/dist/builtin/workflows/src/intercom/intercom-routing.ts +12 -6
- package/dist/builtin/workflows/src/intercom/result-intercom.ts +35 -4
- package/dist/builtin/workflows/src/runs/background/status.ts +15 -0
- package/dist/builtin/workflows/src/runs/foreground/executor-abort.ts +11 -3
- package/dist/builtin/workflows/src/runs/foreground/executor-child-boundary.ts +2 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-exit-manager.ts +26 -2
- package/dist/builtin/workflows/src/runs/foreground/executor-run-finalizers.ts +3 -2
- package/dist/builtin/workflows/src/runs/shared/worktree-git-runner.ts +5 -2
- package/dist/builtin/workflows/src/runs/shared/worktree-setup.ts +2 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +5 -3
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.ts +5 -3
- package/dist/builtin/workflows/src/shared/graph-store-snapshot.ts +34 -2
- package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +23 -6
- package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +10 -4
- package/dist/builtin/workflows/src/shared/store-public-types.ts +4 -2
- package/dist/builtin/workflows/src/shared/store-types.ts +1 -1
- package/dist/builtin/workflows/src/shared/workflow-artifact-env.ts +21 -0
- package/dist/builtin/workflows/src/shared/workflow-artifacts.ts +2 -5
- package/dist/builtin/workflows/src/tui/dispatch-confirm.ts +37 -2
- package/dist/builtin/workflows/src/tui/graph-view-constants.ts +0 -15
- package/dist/builtin/workflows/src/tui/graph-view-graph-render.ts +38 -47
- package/dist/builtin/workflows/src/tui/graph-view-input.ts +48 -45
- package/dist/builtin/workflows/src/tui/graph-view-layout.ts +266 -0
- package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +1 -86
- package/dist/builtin/workflows/src/tui/graph-view-render.ts +209 -91
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +5 -7
- package/dist/builtin/workflows/src/tui/graph-view-types.ts +13 -7
- package/dist/builtin/workflows/src/tui/inline-form-editor.ts +8 -6
- package/dist/builtin/workflows/src/tui/inline-form-overlay.ts +2 -1
- package/dist/builtin/workflows/src/tui/inputs-overlay.ts +7 -4
- package/dist/builtin/workflows/src/tui/inputs-picker-input.ts +66 -0
- package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +1 -0
- package/dist/builtin/workflows/src/tui/node-card.ts +1 -1
- package/dist/builtin/workflows/src/tui/overlay-adapter.ts +18 -46
- package/dist/builtin/workflows/src/tui/overlay-terminal-modes.ts +15 -26
- package/dist/builtin/workflows/src/tui/session-overlays.ts +5 -2
- package/dist/builtin/workflows/src/tui/session-picker.ts +27 -0
- package/dist/builtin/workflows/src/tui/stage-chat-view-footer-status.ts +5 -14
- package/dist/builtin/workflows/src/tui/stage-chat-view-input.ts +8 -7
- package/dist/builtin/workflows/src/tui/stage-chat-view-state.ts +12 -3
- package/dist/builtin/workflows/src/tui/stage-chat-view-types.ts +1 -11
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +0 -8
- package/dist/builtin/workflows/src/tui/status-list.ts +1 -0
- package/dist/builtin/workflows/src/tui/store-widget-installer.ts +2 -6
- package/dist/builtin/workflows/src/tui/workflow-attach-pane-types.ts +0 -15
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +2 -26
- package/dist/builtin/workflows/src/tui/workflow-status.ts +3 -3
- package/dist/bun/split-loader.js +2 -0
- package/dist/bun/split-loader.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +6 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +35 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +100 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +27 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +150 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/config-selector.js +2 -2
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/credential-print.d.ts +18 -23
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +42 -88
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/experimental/auth.d.ts +16 -0
- package/dist/cli/experimental/auth.d.ts.map +1 -0
- package/dist/cli/experimental/auth.js +13 -0
- package/dist/cli/experimental/auth.js.map +1 -0
- package/dist/cli/experimental/cli.d.ts +6 -0
- package/dist/cli/experimental/cli.d.ts.map +1 -0
- package/dist/cli/experimental/cli.js +5 -0
- package/dist/cli/experimental/cli.js.map +1 -0
- package/dist/cli/experimental/command-options.d.ts +17 -0
- package/dist/cli/experimental/command-options.d.ts.map +1 -0
- package/dist/cli/experimental/command-options.js +35 -0
- package/dist/cli/experimental/command-options.js.map +1 -0
- package/dist/cli/experimental/command.d.ts +63 -0
- package/dist/cli/experimental/command.d.ts.map +1 -0
- package/dist/cli/experimental/command.js +127 -0
- package/dist/cli/experimental/command.js.map +1 -0
- package/dist/cli/experimental/commands/client.d.ts +13 -0
- package/dist/cli/experimental/commands/client.d.ts.map +1 -0
- package/dist/cli/experimental/commands/client.js +25 -0
- package/dist/cli/experimental/commands/client.js.map +1 -0
- package/dist/cli/experimental/commands/pi.d.ts +15 -0
- package/dist/cli/experimental/commands/pi.d.ts.map +1 -0
- package/dist/cli/experimental/commands/pi.js +28 -0
- package/dist/cli/experimental/commands/pi.js.map +1 -0
- package/dist/cli/experimental/commands/server.d.ts +13 -0
- package/dist/cli/experimental/commands/server.d.ts.map +1 -0
- package/dist/cli/experimental/commands/server.js +25 -0
- package/dist/cli/experimental/commands/server.js.map +1 -0
- package/dist/cli/experimental/transport-address.d.ts +10 -0
- package/dist/cli/experimental/transport-address.d.ts.map +1 -0
- package/dist/cli/experimental/transport-address.js +38 -0
- package/dist/cli/experimental/transport-address.js.map +1 -0
- package/dist/cli/session-picker.js +2 -2
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +4 -10
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/remote-session.d.ts +64 -0
- package/dist/client/remote-session.d.ts.map +1 -0
- package/dist/client/remote-session.js +351 -0
- package/dist/client/remote-session.js.map +1 -0
- package/dist/client/transcript.d.ts +12 -0
- package/dist/client/transcript.d.ts.map +1 -0
- package/dist/client/transcript.js +98 -0
- package/dist/client/transcript.js.map +1 -0
- package/dist/core/agent-session-auto-compaction.d.ts +17 -13
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +146 -64
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +2 -0
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-compaction.d.ts +3 -6
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +64 -28
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts +1 -11
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +15 -23
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +4 -2
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +6 -2
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts +1 -0
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js +11 -4
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-post-tool-compaction.js +22 -6
- package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
- package/dist/core/agent-session-runtime-auth.d.ts.map +1 -1
- package/dist/core/agent-session-runtime-auth.js +3 -0
- package/dist/core/agent-session-runtime-auth.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +25 -14
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +4 -0
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +2 -0
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +6 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +30 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.d.ts.map +1 -1
- package/dist/core/atomic-guide-command.js +2 -3
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/auth-storage.d.ts +18 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +83 -0
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +5 -0
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +43 -19
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +6 -0
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/codex-fast-mode.d.ts.map +1 -1
- package/dist/core/codex-fast-mode.js +8 -3
- package/dist/core/codex-fast-mode.js.map +1 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +4 -3
- package/dist/core/exec.js.map +1 -1
- package/dist/core/extensions/agent-events.d.ts +0 -1
- package/dist/core/extensions/agent-events.d.ts.map +1 -1
- package/dist/core/extensions/agent-events.js.map +1 -1
- package/dist/core/extensions/api-types.d.ts +5 -3
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +15 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/event-results.d.ts +5 -0
- package/dist/core/extensions/event-results.d.ts.map +1 -1
- package/dist/core/extensions/event-results.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -0
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +14 -1
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-discovery.d.ts.map +1 -1
- package/dist/core/extensions/loader-discovery.js +3 -23
- package/dist/core/extensions/loader-discovery.js.map +1 -1
- package/dist/core/extensions/loader-runtime.d.ts.map +1 -1
- package/dist/core/extensions/loader-runtime.js +20 -3
- package/dist/core/extensions/loader-runtime.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +7 -1
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/message-types.d.ts +6 -0
- package/dist/core/extensions/message-types.d.ts.map +1 -1
- package/dist/core/extensions/message-types.js.map +1 -1
- package/dist/core/extensions/provider-types.d.ts +9 -3
- package/dist/core/extensions/provider-types.d.ts.map +1 -1
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-registries.d.ts +2 -1
- package/dist/core/extensions/runner-registries.d.ts.map +1 -1
- package/dist/core/extensions/runner-registries.js +3 -0
- package/dist/core/extensions/runner-registries.js.map +1 -1
- package/dist/core/extensions/runner-ui.d.ts.map +1 -1
- package/dist/core/extensions/runner-ui.js +1 -0
- package/dist/core/extensions/runner-ui.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +2 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +6 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +4 -1
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/stale-context.d.ts +5 -0
- package/dist/core/extensions/stale-context.d.ts.map +1 -0
- package/dist/core/extensions/stale-context.js +11 -0
- package/dist/core/extensions/stale-context.js.map +1 -0
- package/dist/core/extensions/ui-types.d.ts +14 -11
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +3 -2
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/intercom-runtime-group.d.ts +13 -0
- package/dist/core/intercom-runtime-group.d.ts.map +1 -0
- package/dist/core/intercom-runtime-group.js +23 -0
- package/dist/core/intercom-runtime-group.js.map +1 -0
- package/dist/core/keybindings.d.ts +44 -4
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/model-config.d.ts +39 -5
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +6 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +12 -5
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +20 -12
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver-cli.d.ts.map +1 -1
- package/dist/core/model-resolver-cli.js +46 -14
- package/dist/core/model-resolver-cli.js.map +1 -1
- package/dist/core/model-resolver-defaults.d.ts.map +1 -1
- package/dist/core/model-resolver-defaults.js +2 -0
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-resolver-scope.d.ts +2 -0
- package/dist/core/model-resolver-scope.d.ts.map +1 -1
- package/dist/core/model-resolver-scope.js +12 -9
- package/dist/core/model-resolver-scope.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime-snapshot.d.ts +10 -0
- package/dist/core/model-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/model-runtime-snapshot.js +14 -1
- package/dist/core/model-runtime-snapshot.js.map +1 -1
- package/dist/core/model-runtime-streaming.d.ts +3 -1
- package/dist/core/model-runtime-streaming.d.ts.map +1 -1
- package/dist/core/model-runtime-streaming.js +16 -0
- package/dist/core/model-runtime-streaming.js.map +1 -1
- package/dist/core/model-runtime-types.d.ts +2 -0
- package/dist/core/model-runtime-types.d.ts.map +1 -1
- package/dist/core/model-runtime-types.js.map +1 -1
- package/dist/core/model-runtime.d.ts +37 -10
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +312 -113
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-login.d.ts.map +1 -1
- package/dist/core/oauth-login.js +2 -1
- package/dist/core/oauth-login.js.map +1 -1
- package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -1
- package/dist/core/openai-responses-payload-sanitizer.js +18 -2
- package/dist/core/openai-responses-payload-sanitizer.js.map +1 -1
- package/dist/core/package-manager-git.d.ts.map +1 -1
- package/dist/core/package-manager-git.js +56 -10
- package/dist/core/package-manager-git.js.map +1 -1
- package/dist/core/package-manager-manifest.d.ts +1 -1
- package/dist/core/package-manager-manifest.d.ts.map +1 -1
- package/dist/core/package-manager-manifest.js +19 -9
- package/dist/core/package-manager-manifest.js.map +1 -1
- package/dist/core/package-manager-resource-collector.js.map +1 -1
- package/dist/core/package-manager-resource-files.d.ts.map +1 -1
- package/dist/core/package-manager-resource-files.js +1 -2
- package/dist/core/package-manager-resource-files.js.map +1 -1
- package/dist/core/provider-composer-internal.d.ts +10 -2
- package/dist/core/provider-composer-internal.d.ts.map +1 -1
- package/dist/core/provider-composer-internal.js +7 -3
- package/dist/core/provider-composer-internal.js.map +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +19 -12
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +2 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +77 -67
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +3 -0
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader-context-files.d.ts.map +1 -1
- package/dist/core/resource-loader-context-files.js +13 -5
- package/dist/core/resource-loader-context-files.js.map +1 -1
- package/dist/core/runtime-credentials.d.ts +5 -5
- package/dist/core/runtime-credentials.d.ts.map +1 -1
- package/dist/core/runtime-credentials.js +8 -8
- package/dist/core/runtime-credentials.js.map +1 -1
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +3 -1
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +8 -1
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +31 -0
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-merge.d.ts.map +1 -1
- package/dist/core/settings-merge.js +13 -16
- package/dist/core/settings-merge.js.map +1 -1
- package/dist/core/settings-types.d.ts +5 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts +2 -2
- package/dist/core/tools/ask-user-question/state/questionnaire-session.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js +39 -2
- package/dist/core/tools/ask-user-question/state/questionnaire-session.js.map +1 -1
- package/dist/core/tools/bash-async-execution.d.ts +2 -0
- package/dist/core/tools/bash-async-execution.d.ts.map +1 -1
- package/dist/core/tools/bash-async-execution.js +4 -1
- package/dist/core/tools/bash-async-execution.js.map +1 -1
- package/dist/core/tools/bash-async-output.d.ts +1 -0
- package/dist/core/tools/bash-async-output.d.ts.map +1 -1
- package/dist/core/tools/bash-async-output.js +62 -27
- package/dist/core/tools/bash-async-output.js.map +1 -1
- package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
- package/dist/core/tools/bash-pty-native.js +2 -1
- package/dist/core/tools/bash-pty-native.js.map +1 -1
- package/dist/core/tools/bash.d.ts +9 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +34 -16
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/directory-tree.d.ts +11 -0
- package/dist/core/tools/directory-tree.d.ts.map +1 -1
- package/dist/core/tools/directory-tree.js +26 -0
- package/dist/core/tools/directory-tree.js.map +1 -1
- package/dist/core/tools/edit.d.ts +4 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +12 -8
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/errno.d.ts +25 -0
- package/dist/core/tools/errno.d.ts.map +1 -0
- package/dist/core/tools/errno.js +29 -0
- package/dist/core/tools/errno.js.map +1 -0
- package/dist/core/tools/find.d.ts +8 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +20 -15
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +5 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +7 -7
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +7 -7
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +8 -1
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +50 -28
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/oversized-tool-result.d.ts.map +1 -1
- package/dist/core/tools/oversized-tool-result.js +129 -22
- package/dist/core/tools/oversized-tool-result.js.map +1 -1
- package/dist/core/tools/persisted-output-file.d.ts +80 -0
- package/dist/core/tools/persisted-output-file.d.ts.map +1 -0
- package/dist/core/tools/persisted-output-file.js +284 -0
- package/dist/core/tools/persisted-output-file.js.map +1 -0
- package/dist/core/tools/read.d.ts +10 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +20 -8
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/search.d.ts +4 -0
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +5 -1
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/tools/session-temp-cleanup.d.ts +133 -0
- package/dist/core/tools/session-temp-cleanup.d.ts.map +1 -0
- package/dist/core/tools/session-temp-cleanup.js +669 -0
- package/dist/core/tools/session-temp-cleanup.js.map +1 -0
- package/dist/core/tools/session-temp-dir.d.ts +116 -0
- package/dist/core/tools/session-temp-dir.d.ts.map +1 -0
- package/dist/core/tools/session-temp-dir.js +409 -0
- package/dist/core/tools/session-temp-dir.js.map +1 -0
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +2 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/tool-limits.d.ts +11 -0
- package/dist/core/tools/tool-limits.d.ts.map +1 -1
- package/dist/core/tools/tool-limits.js +11 -0
- package/dist/core/tools/tool-limits.js.map +1 -1
- package/dist/core/tools/windows-directory-security.d.ts +82 -0
- package/dist/core/tools/windows-directory-security.d.ts.map +1 -0
- package/dist/core/tools/windows-directory-security.js +238 -0
- package/dist/core/tools/windows-directory-security.js.map +1 -0
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +8 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.js +1 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/extensions/llama/huggingface-ui.d.ts +1 -1
- package/dist/extensions/llama/huggingface-ui.d.ts.map +1 -1
- package/dist/extensions/llama/huggingface-ui.js +6 -5
- package/dist/extensions/llama/huggingface-ui.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +11 -2
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +24 -8
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +5 -2
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/index-extensions.d.ts +2 -2
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main-runtime-api-key.d.ts +2 -2
- package/dist/main-runtime-api-key.d.ts.map +1 -1
- package/dist/main-runtime-api-key.js +7 -2
- package/dist/main-runtime-api-key.js.map +1 -1
- package/dist/main-session.js +2 -2
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +130 -26
- package/dist/main.js.map +1 -1
- package/dist/modes/index.d.ts +1 -0
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +6 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +18 -5
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
- package/dist/modes/interactive/components/bordered-loader.js +5 -4
- package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +3 -2
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts +17 -7
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +35 -69
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js +11 -3
- package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +25 -15
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +9 -4
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +2 -0
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +2 -0
- package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +9 -0
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +14 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.d.ts +32 -0
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.js +173 -5
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
- package/dist/modes/interactive/components/config-selector-list.d.ts +1 -1
- package/dist/modes/interactive/components/config-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector-list.js +9 -8
- package/dist/modes/interactive/components/config-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +32 -10
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +2 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +3 -2
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +3 -2
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts +1 -1
- package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-input.js +1 -0
- package/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +4 -0
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.d.ts +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +7 -5
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +3 -0
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/host-input-form.d.ts +1 -1
- package/dist/modes/interactive/components/host-input-form.d.ts.map +1 -1
- package/dist/modes/interactive/components/host-input-form.js +6 -5
- package/dist/modes/interactive/components/host-input-form.js.map +1 -1
- package/dist/modes/interactive/components/index.d.ts +1 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +2 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
- package/dist/modes/interactive/components/markdown-transform.js +19 -0
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
- package/dist/modes/interactive/components/mermaid.d.ts +11 -0
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
- package/dist/modes/interactive/components/mermaid.js +81 -0
- package/dist/modes/interactive/components/mermaid.js.map +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts +2 -2
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +9 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +3 -2
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +6 -2
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +39 -13
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-delete.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-delete.js +2 -1
- package/dist/modes/interactive/components/session-selector-delete.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.d.ts +1 -1
- package/dist/modes/interactive/components/session-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-list.js +12 -11
- package/dist/modes/interactive/components/session-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +3 -3
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +9 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +21 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector-submenus.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-submenus.js +6 -1
- package/dist/modes/interactive/components/settings-selector-submenus.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +8 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +3 -2
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +2 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +50 -27
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-component.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector-component.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-component.js +2 -3
- package/dist/modes/interactive/components/tree-selector-component.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-help.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector-help.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-help.js +3 -1
- package/dist/modes/interactive/components/tree-selector-help.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-label-input.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector-label-input.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-label-input.js +1 -0
- package/dist/modes/interactive/components/tree-selector-label-input.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector-list.d.ts +1 -1
- package/dist/modes/interactive/components/tree-selector-list.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector-list.js +3 -0
- package/dist/modes/interactive/components/tree-selector-list.js.map +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +1 -1
- package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/trust-selector.js +4 -0
- package/dist/modes/interactive/components/trust-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +4 -0
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +4 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +10 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +36 -18
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js +9 -2
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +5 -1
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +16 -4
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +3 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-editor-actions.js +2 -0
- package/dist/modes/interactive/interactive-editor-actions.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-context.js +12 -7
- package/dist/modes/interactive/interactive-extension-context.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-custom-ui.js +1 -0
- package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js +7 -0
- package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-widgets.js +7 -24
- package/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +9 -8
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +52 -3
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +143 -5
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +2 -2
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -3
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +107 -41
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +24 -6
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +44 -5
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +1 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +9 -4
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +37 -18
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +21 -0
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -0
- package/dist/modes/interactive/interactive-tui.js +279 -0
- package/dist/modes/interactive/interactive-tui.js.map +1 -0
- package/dist/modes/interactive/streaming-assistant-message.d.ts +34 -0
- package/dist/modes/interactive/streaming-assistant-message.d.ts.map +1 -0
- package/dist/modes/interactive/streaming-assistant-message.js +76 -0
- package/dist/modes/interactive/streaming-assistant-message.js.map +1 -0
- package/dist/modes/interactive/theme/catppuccin-frappe.json +1 -0
- package/dist/modes/interactive/theme/catppuccin-latte.json +1 -0
- package/dist/modes/interactive/theme/catppuccin-macchiato.json +1 -0
- package/dist/modes/interactive/theme/catppuccin-mocha.json +1 -0
- package/dist/modes/interactive/theme/dark.json +1 -0
- package/dist/modes/interactive/theme/light.json +1 -0
- package/dist/modes/interactive/theme/terminal-detection.d.ts +10 -0
- package/dist/modes/interactive/theme/terminal-detection.d.ts.map +1 -1
- package/dist/modes/interactive/theme/terminal-detection.js +19 -0
- package/dist/modes/interactive/theme/terminal-detection.js.map +1 -1
- package/dist/modes/interactive/theme/theme-class.d.ts +2 -2
- package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-class.js +5 -1
- package/dist/modes/interactive/theme/theme-class.js.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +3 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +10 -13
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.js +1 -0
- package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.js +2 -1
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +5 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +1 -1
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +28 -11
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/engine-render-service.js +3 -3
- package/dist/modes/interactive-engine/engine-render-service.js.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts +2 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.d.ts.map +1 -1
- package/dist/modes/interactive-engine/extension-ui-bridge.js +2 -2
- package/dist/modes/interactive-engine/extension-ui-bridge.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +7 -0
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +12 -10
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +14 -11
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-component.d.ts +11 -1
- package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-component.js +48 -8
- package/dist/modes/interactive-engine/remote-component.js.map +1 -1
- package/dist/modes/interactive-engine/terminal-mode-controller.d.ts +19 -12
- package/dist/modes/interactive-engine/terminal-mode-controller.d.ts.map +1 -1
- package/dist/modes/interactive-engine/terminal-mode-controller.js +54 -35
- package/dist/modes/interactive-engine/terminal-mode-controller.js.map +1 -1
- package/dist/modes/json-event.d.ts +28 -0
- package/dist/modes/json-event.d.ts.map +1 -0
- package/dist/modes/json-event.js +12 -0
- package/dist/modes/json-event.js.map +1 -0
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +2 -1
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts +1 -0
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +5 -1
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +7 -2
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +1 -1
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-event-buffer.d.ts +9 -0
- package/dist/modes/rpc/rpc-event-buffer.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-event-buffer.js +10 -5
- package/dist/modes/rpc/rpc-event-buffer.js.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-extension-ui.js +3 -0
- package/dist/modes/rpc/rpc-extension-ui.js.map +1 -1
- package/dist/modes/rpc/rpc-input.js +1 -1
- package/dist/modes/rpc/rpc-input.js.map +1 -1
- package/dist/modes/rpc/rpc-output-buffer.d.ts +9 -0
- package/dist/modes/rpc/rpc-output-buffer.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-output-buffer.js +10 -5
- package/dist/modes/rpc/rpc-output-buffer.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js +3 -0
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
- package/dist/modes/rpc/rpc-responses.d.ts +1 -1
- package/dist/modes/rpc/rpc-responses.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-responses.js +13 -1
- package/dist/modes/rpc/rpc-responses.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +2 -1
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +9 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/rpc-entry.js +2 -0
- package/dist/rpc-entry.js.map +1 -1
- package/dist/self-update-plan.d.ts.map +1 -1
- package/dist/self-update-plan.js +5 -4
- package/dist/self-update-plan.js.map +1 -1
- package/dist/server/create-harness.d.ts +53 -0
- package/dist/server/create-harness.d.ts.map +1 -0
- package/dist/server/create-harness.js +349 -0
- package/dist/server/create-harness.js.map +1 -0
- package/dist/utils/agent-attribution.d.ts +2 -0
- package/dist/utils/agent-attribution.d.ts.map +1 -0
- package/dist/utils/agent-attribution.js +2 -0
- package/dist/utils/agent-attribution.js.map +1 -0
- package/dist/utils/child-process.d.ts +3 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +24 -4
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-image.d.ts.map +1 -1
- package/dist/utils/clipboard-image.js +2 -1
- package/dist/utils/clipboard-image.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +12 -3
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/management-http.d.ts +23 -0
- package/dist/utils/management-http.d.ts.map +1 -0
- package/dist/utils/management-http.js +50 -0
- package/dist/utils/management-http.js.map +1 -0
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +2 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +2 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +13 -0
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +17 -4
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tool-result-images.d.ts +17 -0
- package/dist/utils/tool-result-images.d.ts.map +1 -0
- package/dist/utils/tool-result-images.js +41 -0
- package/dist/utils/tool-result-images.js.map +1 -0
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +7 -8
- package/dist/utils/tools-manager.js.map +1 -1
- package/dist/utils/version-check.d.ts +4 -0
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +20 -2
- package/dist/utils/version-check.js.map +1 -1
- package/docs/compaction.md +2 -1
- package/docs/custom-provider.md +15 -7
- package/docs/development.md +1 -0
- package/docs/docs.json +1 -0
- package/docs/environment-variables.md +4 -0
- package/docs/extensions.md +102 -18
- package/docs/i-have-adhd.md +36 -0
- package/docs/intercom.md +26 -6
- package/docs/json.md +2 -2
- package/docs/keybindings.md +55 -12
- package/docs/models/model-selection.md +34 -8
- package/docs/models.md +28 -3
- package/docs/providers.md +20 -2
- package/docs/quickstart.md +5 -5
- package/docs/rpc.md +18 -12
- package/docs/sdk.md +43 -7
- package/docs/security.md +10 -10
- package/docs/sessions.md +2 -0
- package/docs/settings.md +25 -5
- package/docs/subagents.md +15 -30
- package/docs/themes.md +5 -3
- package/docs/tools.md +21 -1
- package/docs/tui.md +41 -24
- package/docs/usage.md +40 -14
- package/docs/windows.md +2 -0
- package/docs/workflows.md +216 -20
- package/examples/extensions/custom-provider-anthropic/index.ts +9 -2
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +9 -2
- package/examples/extensions/modal-editor.ts +8 -10
- package/examples/extensions/rainbow-editor.ts +3 -2
- package/examples/extensions/subagent/README.md +16 -45
- package/examples/extensions/subagent/index.ts +6 -96
- package/examples/extensions/subagent/render.ts +0 -78
- package/examples/extensions/subagent/runner.ts +0 -3
- package/examples/extensions/subagent/schemas.ts +0 -13
- package/examples/extensions/subagent/types.ts +1 -2
- package/examples/sdk/09-api-keys-and-oauth.ts +6 -2
- package/examples/sdk/12-full-control.ts +8 -2
- package/examples/sdk/README.md +4 -1
- package/npm-shrinkwrap.json +191 -634
- package/package.json +14 -7
- package/dist/builtin/subagents/src/agents/chain-serializer.ts +0 -257
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-details.ts +0 -38
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-dynamic-step.ts +0 -280
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-runner.ts +0 -217
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-parallel-step.ts +0 -271
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-sequential-step.ts +0 -271
- package/dist/builtin/subagents/src/runs/foreground/chain-execution-types.ts +0 -200
- package/dist/builtin/subagents/src/runs/foreground/chain-execution.ts +0 -184
- package/dist/builtin/subagents/src/runs/foreground/execution-structured-retries.ts +0 -19
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-chain.ts +0 -109
- package/dist/builtin/subagents/src/runs/shared/chain-outputs.ts +0 -126
- package/dist/builtin/subagents/src/runs/shared/dynamic-fanout.ts +0 -393
- package/dist/builtin/subagents/src/runs/shared/structured-output.ts +0 -150
- package/dist/builtin/subagents/src/runs/shared/workflow-graph.ts +0 -232
- package/dist/builtin/subagents/src/slash/saved-chain-mapping.ts +0 -60
- package/dist/builtin/subagents/src/tui/render-chain-graph.ts +0 -341
- package/examples/extensions/subagent/prompts/implement-and-review.md +0 -10
- package/examples/extensions/subagent/prompts/implement.md +0 -10
- package/examples/extensions/subagent/prompts/scout-and-plan.md +0 -9
|
@@ -2,7 +2,6 @@ import { APP_NAME } from "@bastani/atomic";
|
|
|
2
2
|
import { normalizeSkillInput } from "../../agents/skills.ts";
|
|
3
3
|
import { resolveSubagentIntercomTarget } from "../../intercom/intercom-bridge.ts";
|
|
4
4
|
import { collectKnownModelProviders, toModelInfo } from "../../shared/model-info.ts";
|
|
5
|
-
import type { ChainStep } from "../../shared/settings.ts";
|
|
6
5
|
import type { SingleResult, SubagentToolResult } from "../../shared/types.ts";
|
|
7
6
|
import {
|
|
8
7
|
resolveChildMaxSubagentDepth,
|
|
@@ -12,16 +11,12 @@ import {
|
|
|
12
11
|
wrapForkTask,
|
|
13
12
|
} from "../../shared/types.ts";
|
|
14
13
|
import { formatAsyncStartedMessage } from "../inprocess/background.ts";
|
|
15
|
-
import {
|
|
14
|
+
import { inheritedIntercomGroup } from "../shared/intercom-group.js";
|
|
16
15
|
import { runParallelPath } from "./subagent-executor-parallel.ts";
|
|
17
16
|
import type { ExecutionContextData, ResolvedExecutorDeps } from "./subagent-executor-types.ts";
|
|
18
|
-
import {
|
|
19
|
-
buildChainWorktreeTaskCwdError,
|
|
20
|
-
buildParallelModeError,
|
|
21
|
-
buildParallelWorktreeTaskCwdError,
|
|
22
|
-
} from "./subagent-executor-worktree.ts";
|
|
17
|
+
import { buildParallelModeError, buildParallelWorktreeTaskCwdError } from "./subagent-executor-worktree.ts";
|
|
23
18
|
|
|
24
|
-
function continuedResult(data: ExecutionContextData, mode: "single" | "parallel"
|
|
19
|
+
function continuedResult(data: ExecutionContextData, mode: "single" | "parallel"): SingleResult {
|
|
25
20
|
const path = `${data.runId}/orchestration_1`;
|
|
26
21
|
return {
|
|
27
22
|
agent: mode,
|
|
@@ -49,35 +44,20 @@ function continuedResult(data: ExecutionContextData, mode: "single" | "parallel"
|
|
|
49
44
|
};
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
function modeFor(data: ExecutionContextData): "single" | "parallel"
|
|
53
|
-
if ((data.params.chain?.length ?? 0) > 0) return "chain";
|
|
47
|
+
function modeFor(data: ExecutionContextData): "single" | "parallel" {
|
|
54
48
|
if ((data.params.tasks?.length ?? 0) > 0) return "parallel";
|
|
55
49
|
return "single";
|
|
56
50
|
}
|
|
57
51
|
|
|
58
|
-
function runForegroundInBackground(
|
|
59
|
-
data: ExecutionContextData,
|
|
60
|
-
deps: ResolvedExecutorDeps,
|
|
61
|
-
mode: "parallel" | "chain",
|
|
62
|
-
): void {
|
|
52
|
+
function runForegroundInBackground(data: ExecutionContextData, deps: ResolvedExecutorDeps): void {
|
|
63
53
|
const backgroundData: ExecutionContextData = { ...data, effectiveAsync: false };
|
|
64
|
-
|
|
65
|
-
void work.catch((error) => {
|
|
54
|
+
void runParallelPath(backgroundData, deps).catch((error) => {
|
|
66
55
|
const message = error instanceof Error ? error.message : String(error);
|
|
67
|
-
console.error(`[${APP_NAME}-subagents] in-process async
|
|
56
|
+
console.error(`[${APP_NAME}-subagents] in-process async parallel failed: ${message}`);
|
|
68
57
|
});
|
|
69
58
|
}
|
|
70
59
|
|
|
71
|
-
/**
|
|
72
|
-
* Async is a don't-wait request over the same in-process foreground executor.
|
|
73
|
-
*
|
|
74
|
-
* Single runs retain the focused background-single helper because it owns the
|
|
75
|
-
* child admission and terminal artifact delivery. Chain and parallel runs use
|
|
76
|
-
* the existing foreground executors un-awaited; their child sessions are
|
|
77
|
-
* admitted by runSync as the executor advances, so chain substitution,
|
|
78
|
-
* dynamic fanout, worktrees, structured output, and fail-fast remain one code
|
|
79
|
-
* path rather than a second serialized runner.
|
|
80
|
-
*/
|
|
60
|
+
/** Async is a don't-wait request over the same in-process foreground executor. */
|
|
81
61
|
export async function runAsyncPath(
|
|
82
62
|
data: ExecutionContextData,
|
|
83
63
|
deps: ResolvedExecutorDeps,
|
|
@@ -86,16 +66,6 @@ export async function runAsyncPath(
|
|
|
86
66
|
|
|
87
67
|
const mode = modeFor(data);
|
|
88
68
|
const { params, effectiveCwd } = data;
|
|
89
|
-
if (mode === "chain" && params.chain) {
|
|
90
|
-
const chainWorktreeTaskCwdError = buildChainWorktreeTaskCwdError(params.chain as ChainStep[], effectiveCwd);
|
|
91
|
-
if (chainWorktreeTaskCwdError) {
|
|
92
|
-
return {
|
|
93
|
-
content: [{ type: "text", text: chainWorktreeTaskCwdError }],
|
|
94
|
-
isError: true,
|
|
95
|
-
details: { mode: "chain", results: [] },
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
69
|
if (mode === "parallel" && params.tasks) {
|
|
100
70
|
const maxParallelTasks = resolveTopLevelParallelMaxTasks(deps.config.parallel?.maxTasks);
|
|
101
71
|
if (params.tasks.length > maxParallelTasks) return buildParallelModeError(`Max ${maxParallelTasks} tasks`);
|
|
@@ -148,7 +118,7 @@ export async function runAsyncPath(
|
|
|
148
118
|
currentSessionId: deps.state.currentSessionId ?? data.ctx.sessionManager.getSessionId(),
|
|
149
119
|
currentModelProvider: data.ctx.model?.provider,
|
|
150
120
|
currentModel,
|
|
151
|
-
intercomGroup: data.ctx
|
|
121
|
+
intercomGroup: inheritedIntercomGroup(data.ctx),
|
|
152
122
|
workflowSessionMetadata: workflowSessionMetadataFromContext(data.ctx),
|
|
153
123
|
},
|
|
154
124
|
cwd: effectiveCwd,
|
|
@@ -166,6 +136,7 @@ export async function runAsyncPath(
|
|
|
166
136
|
availableModels,
|
|
167
137
|
knownModelProviders,
|
|
168
138
|
maxSubagentDepth: resolveChildMaxSubagentDepth(depthPolicy.maxSubagentDepth, agent.maxSubagentDepth),
|
|
139
|
+
parentDepth: data.parentDepth,
|
|
169
140
|
workflowStageSubagentGuard: depthPolicy.workflowStageSubagentGuard,
|
|
170
141
|
worktreeSetupHook: deps.config.worktreeSetupHook,
|
|
171
142
|
worktreeSetupHookTimeoutMs: deps.config.worktreeSetupHookTimeoutMs,
|
|
@@ -177,7 +148,7 @@ export async function runAsyncPath(
|
|
|
177
148
|
}
|
|
178
149
|
|
|
179
150
|
const continued = continuedResult(data, mode);
|
|
180
|
-
if (mode === "
|
|
151
|
+
if (mode === "parallel") runForegroundInBackground(data, deps);
|
|
181
152
|
return {
|
|
182
153
|
content: [{ type: "text", text: formatAsyncStartedMessage(`Async ${mode}: ${data.runId}`) }],
|
|
183
154
|
details: {
|
|
@@ -12,11 +12,7 @@ import {
|
|
|
12
12
|
import { getArtifactsDir } from "../../shared/artifacts.ts";
|
|
13
13
|
import { createForkContextResolver } from "../../shared/fork-context.ts";
|
|
14
14
|
import { resolveCurrentSessionId } from "../../shared/session-identity.ts";
|
|
15
|
-
import {
|
|
16
|
-
buildReadInstruction,
|
|
17
|
-
isParallelStep as isSettingsParallelStep,
|
|
18
|
-
type SequentialStep,
|
|
19
|
-
} from "../../shared/settings.ts";
|
|
15
|
+
import { buildReadInstruction } from "../../shared/settings.ts";
|
|
20
16
|
import {
|
|
21
17
|
type ArtifactConfig,
|
|
22
18
|
checkSubagentDepth,
|
|
@@ -56,8 +52,8 @@ export function checkDepthForExecution(
|
|
|
56
52
|
deps: ResolvedExecutorDeps,
|
|
57
53
|
): SubagentToolResult | undefined {
|
|
58
54
|
const depthPolicy = resolveSubagentDepthPolicy(ctx, deps.config.maxSubagentDepth);
|
|
59
|
-
const { blocked, depth, maxDepth
|
|
60
|
-
const workflowStageSubagentGuard =
|
|
55
|
+
const { blocked, depth, maxDepth } = checkSubagentDepth(ctx, depthPolicy.maxSubagentDepth);
|
|
56
|
+
const workflowStageSubagentGuard = depthPolicy.workflowStageSubagentGuard;
|
|
61
57
|
if (!blocked) return undefined;
|
|
62
58
|
return {
|
|
63
59
|
content: [
|
|
@@ -80,7 +76,7 @@ export function prepareExecutionContext(input: {
|
|
|
80
76
|
}): ExecutionContextBuildResult {
|
|
81
77
|
const { params, ctx, signal, onUpdate, deps } = input;
|
|
82
78
|
const depthPolicy = resolveSubagentDepthPolicy(ctx, deps.config.maxSubagentDepth);
|
|
83
|
-
const { depth } = checkSubagentDepth(depthPolicy.maxSubagentDepth);
|
|
79
|
+
const { depth } = checkSubagentDepth(ctx, depthPolicy.maxSubagentDepth);
|
|
84
80
|
const normalized = normalizeRepeatedParallelCounts(params);
|
|
85
81
|
if (normalized.error) return { error: normalized.error };
|
|
86
82
|
const normalizedParams = normalized.params!;
|
|
@@ -112,10 +108,9 @@ export function prepareExecutionContext(input: {
|
|
|
112
108
|
const nestedParentAddress = inheritedNestedRoute ? resolveNestedParentAddressFromEnv() : undefined;
|
|
113
109
|
const nestedRoute = inheritedNestedRoute ?? createNestedRoute(runId);
|
|
114
110
|
const shareEnabled = effectiveParams.share === true;
|
|
115
|
-
const hasChain = (effectiveParams.chain?.length ?? 0) > 0;
|
|
116
111
|
const hasTasks = (effectiveParams.tasks?.length ?? 0) > 0;
|
|
117
|
-
const hasSingle = !
|
|
118
|
-
const validationError = validateExecutionInput(effectiveParams, agents,
|
|
112
|
+
const hasSingle = !hasTasks && Boolean(effectiveParams.agent);
|
|
113
|
+
const validationError = validateExecutionInput(effectiveParams, agents, hasTasks, hasSingle);
|
|
119
114
|
if (validationError) return { error: validationError };
|
|
120
115
|
if (hasSingle) {
|
|
121
116
|
const readInstruction = buildReadInstruction(effectiveParams.reads, effectiveCwd);
|
|
@@ -180,13 +175,14 @@ export function prepareExecutionContext(input: {
|
|
|
180
175
|
sessionFileForIndex: childSessionFileForIndex,
|
|
181
176
|
artifactConfig,
|
|
182
177
|
artifactsDir,
|
|
178
|
+
parentDepth: depth,
|
|
183
179
|
effectiveAsync,
|
|
184
180
|
controlConfig,
|
|
185
181
|
intercomBridge,
|
|
186
182
|
nestedRoute,
|
|
187
183
|
};
|
|
188
184
|
|
|
189
|
-
const foregroundMode: "single" | "parallel"
|
|
185
|
+
const foregroundMode: "single" | "parallel" = hasTasks ? "parallel" : "single";
|
|
190
186
|
const foregroundControl = effectiveAsync
|
|
191
187
|
? undefined
|
|
192
188
|
: {
|
|
@@ -224,15 +220,9 @@ export function prepareExecutionContext(input: {
|
|
|
224
220
|
const agentsForSummary =
|
|
225
221
|
hasTasks && effectiveParams.tasks
|
|
226
222
|
? effectiveParams.tasks.map((task) => task.agent)
|
|
227
|
-
:
|
|
228
|
-
? effectiveParams.
|
|
229
|
-
|
|
230
|
-
? step.parallel.map((task) => task.agent)
|
|
231
|
-
: [(step as SequentialStep).agent],
|
|
232
|
-
)
|
|
233
|
-
: effectiveParams.agent
|
|
234
|
-
? [effectiveParams.agent]
|
|
235
|
-
: [];
|
|
223
|
+
: effectiveParams.agent
|
|
224
|
+
? [effectiveParams.agent]
|
|
225
|
+
: [];
|
|
236
226
|
const leafIntercomTarget =
|
|
237
227
|
intercomBridge.active && agentsForSummary[0]
|
|
238
228
|
? resolveSubagentIntercomTarget(runId, agentsForSummary[0], 0)
|
|
@@ -289,7 +279,6 @@ export function prepareExecutionContext(input: {
|
|
|
289
279
|
effectiveParams,
|
|
290
280
|
effectiveCwd,
|
|
291
281
|
runId,
|
|
292
|
-
hasChain,
|
|
293
282
|
hasTasks,
|
|
294
283
|
hasSingle,
|
|
295
284
|
foregroundMode,
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import type { AgentConfig } from "../../agents/agents.ts";
|
|
2
|
-
import {
|
|
3
|
-
type ChainStep,
|
|
4
|
-
getStepAgents,
|
|
5
|
-
isDynamicParallelStep,
|
|
6
|
-
isParallelStep,
|
|
7
|
-
type SequentialStep,
|
|
8
|
-
} from "../../shared/settings.ts";
|
|
9
|
-
import { type Details, type SubagentToolResult, wrapForkTask } from "../../shared/types.ts";
|
|
2
|
+
import type { Details, SubagentToolResult } from "../../shared/types.ts";
|
|
10
3
|
import type { SubagentParamsLike, TaskParam } from "./subagent-executor-types.ts";
|
|
11
4
|
|
|
12
5
|
export function validateExecutionInput(
|
|
13
6
|
params: SubagentParamsLike,
|
|
14
7
|
agents: AgentConfig[],
|
|
15
|
-
hasChain: boolean,
|
|
16
8
|
hasTasks: boolean,
|
|
17
9
|
hasSingle: boolean,
|
|
18
10
|
): SubagentToolResult | null {
|
|
19
|
-
if (Number(
|
|
11
|
+
if (Number(hasTasks) + Number(hasSingle) !== 1) {
|
|
20
12
|
return {
|
|
21
13
|
content: [
|
|
22
14
|
{
|
|
@@ -28,8 +20,9 @@ export function validateExecutionInput(
|
|
|
28
20
|
details: { mode: "single" as const, results: [] },
|
|
29
21
|
};
|
|
30
22
|
}
|
|
23
|
+
|
|
31
24
|
if (hasSingle) {
|
|
32
|
-
const reads =
|
|
25
|
+
const reads = params.reads;
|
|
33
26
|
if (
|
|
34
27
|
reads !== undefined &&
|
|
35
28
|
reads !== false &&
|
|
@@ -64,74 +57,10 @@ export function validateExecutionInput(
|
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
59
|
|
|
67
|
-
if (hasChain && params.chain) {
|
|
68
|
-
if (params.chain.length === 0) {
|
|
69
|
-
return {
|
|
70
|
-
content: [{ type: "text", text: "Chain must have at least one step" }],
|
|
71
|
-
isError: true,
|
|
72
|
-
details: { mode: "chain" as const, results: [] },
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const firstStep = params.chain[0] as ChainStep;
|
|
76
|
-
if (isParallelStep(firstStep)) {
|
|
77
|
-
const missingTaskIndex = firstStep.parallel.findIndex((t) => !t.task);
|
|
78
|
-
if (missingTaskIndex !== -1) {
|
|
79
|
-
return {
|
|
80
|
-
content: [
|
|
81
|
-
{
|
|
82
|
-
type: "text",
|
|
83
|
-
text: `First parallel step: task ${missingTaskIndex + 1} must have a task (no previous output to reference)`,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
isError: true,
|
|
87
|
-
details: { mode: "chain" as const, results: [] },
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
} else if (isDynamicParallelStep(firstStep)) {
|
|
91
|
-
return {
|
|
92
|
-
content: [
|
|
93
|
-
{
|
|
94
|
-
type: "text",
|
|
95
|
-
text: "First step in chain cannot be dynamic fanout; expand.from requires a prior structured named output",
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
isError: true,
|
|
99
|
-
details: { mode: "chain" as const, results: [] },
|
|
100
|
-
};
|
|
101
|
-
} else if (!(firstStep as SequentialStep).task && !params.task) {
|
|
102
|
-
return {
|
|
103
|
-
content: [{ type: "text", text: "First step in chain must have a task" }],
|
|
104
|
-
isError: true,
|
|
105
|
-
details: { mode: "chain" as const, results: [] },
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
for (let i = 0; i < params.chain.length; i++) {
|
|
109
|
-
const step = params.chain[i] as ChainStep;
|
|
110
|
-
const stepAgents = getStepAgents(step);
|
|
111
|
-
for (const agentName of stepAgents) {
|
|
112
|
-
if (!agents.find((a) => a.name === agentName)) {
|
|
113
|
-
return {
|
|
114
|
-
content: [{ type: "text", text: `Unknown agent: ${agentName} (step ${i + 1})` }],
|
|
115
|
-
isError: true,
|
|
116
|
-
details: { mode: "chain" as const, results: [] },
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (isParallelStep(step) && step.parallel.length === 0) {
|
|
121
|
-
return {
|
|
122
|
-
content: [{ type: "text", text: `Parallel step ${i + 1} must have at least one task` }],
|
|
123
|
-
isError: true,
|
|
124
|
-
details: { mode: "chain" as const, results: [] },
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
60
|
return null;
|
|
131
61
|
}
|
|
132
62
|
|
|
133
63
|
export function getRequestedModeLabel(params: SubagentParamsLike): Details["mode"] {
|
|
134
|
-
if ((params.chain?.length ?? 0) > 0) return "chain";
|
|
135
64
|
if ((params.tasks?.length ?? 0) > 0) return "parallel";
|
|
136
65
|
if (params.agent) return "single";
|
|
137
66
|
return "single";
|
|
@@ -143,7 +72,6 @@ export function applyAgentDefaultContext(params: SubagentParamsLike, agents: Age
|
|
|
143
72
|
const names: string[] = [];
|
|
144
73
|
if (params.agent) names.push(params.agent);
|
|
145
74
|
for (const task of params.tasks ?? []) names.push(task.agent);
|
|
146
|
-
for (const step of params.chain ?? []) names.push(...getStepAgents(step));
|
|
147
75
|
return names.some((name) => byName.get(name)?.defaultContext === "fork") ? { ...params, context: "fork" } : params;
|
|
148
76
|
}
|
|
149
77
|
|
|
@@ -166,58 +94,20 @@ function expandTopLevelTaskCounts(tasks: TaskParam[]): { tasks?: TaskParam[]; er
|
|
|
166
94
|
if (rawCount !== undefined && (typeof rawCount !== "number" || !Number.isInteger(rawCount) || rawCount < 1)) {
|
|
167
95
|
return { error: `tasks[${taskIndex}].count must be an integer >= 1` };
|
|
168
96
|
}
|
|
169
|
-
const { count, ...concreteTask } = task;
|
|
170
|
-
for (let repeat = 0; repeat < (rawCount ?? 1); repeat++) {
|
|
171
|
-
expanded.push({ ...concreteTask });
|
|
172
|
-
}
|
|
97
|
+
const { count: _count, ...concreteTask } = task;
|
|
98
|
+
for (let repeat = 0; repeat < (rawCount ?? 1); repeat++) expanded.push({ ...concreteTask });
|
|
173
99
|
}
|
|
174
100
|
return { tasks: expanded };
|
|
175
101
|
}
|
|
176
102
|
|
|
177
|
-
function expandChainParallelCounts(chain: ChainStep[]): { chain?: ChainStep[]; error?: string } {
|
|
178
|
-
const expandedChain: ChainStep[] = [];
|
|
179
|
-
for (let stepIndex = 0; stepIndex < chain.length; stepIndex++) {
|
|
180
|
-
const step = chain[stepIndex]!;
|
|
181
|
-
if (!isParallelStep(step)) {
|
|
182
|
-
expandedChain.push(step);
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
const expandedParallel = [];
|
|
186
|
-
for (let taskIndex = 0; taskIndex < step.parallel.length; taskIndex++) {
|
|
187
|
-
const task = step.parallel[taskIndex]!;
|
|
188
|
-
const rawCount = (task as typeof task & { count?: unknown }).count;
|
|
189
|
-
if (rawCount !== undefined && (typeof rawCount !== "number" || !Number.isInteger(rawCount) || rawCount < 1)) {
|
|
190
|
-
return { error: `chain[${stepIndex}].parallel[${taskIndex}].count must be an integer >= 1` };
|
|
191
|
-
}
|
|
192
|
-
const { count, ...concreteTask } = task;
|
|
193
|
-
for (let repeat = 0; repeat < (rawCount ?? 1); repeat++) {
|
|
194
|
-
expandedParallel.push({ ...concreteTask });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
expandedChain.push({ ...step, parallel: expandedParallel });
|
|
198
|
-
}
|
|
199
|
-
return { chain: expandedChain };
|
|
200
|
-
}
|
|
201
|
-
|
|
202
103
|
export function normalizeRepeatedParallelCounts(params: SubagentParamsLike): {
|
|
203
104
|
params?: SubagentParamsLike;
|
|
204
105
|
error?: SubagentToolResult;
|
|
205
106
|
} {
|
|
206
|
-
if (params.tasks) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
return { params: { ...params, tasks: expandedTasks.tasks } };
|
|
212
|
-
}
|
|
213
|
-
if (params.chain) {
|
|
214
|
-
const expandedChain = expandChainParallelCounts(params.chain);
|
|
215
|
-
if (expandedChain.error) {
|
|
216
|
-
return { error: buildRequestedModeError(params, expandedChain.error) };
|
|
217
|
-
}
|
|
218
|
-
return { params: { ...params, chain: expandedChain.chain } };
|
|
219
|
-
}
|
|
220
|
-
return { params };
|
|
107
|
+
if (!params.tasks) return { params };
|
|
108
|
+
const expandedTasks = expandTopLevelTaskCounts(params.tasks);
|
|
109
|
+
if (expandedTasks.error) return { error: buildRequestedModeError(params, expandedTasks.error) };
|
|
110
|
+
return { params: { ...params, tasks: expandedTasks.tasks } };
|
|
221
111
|
}
|
|
222
112
|
|
|
223
113
|
export function withForkContext(
|
|
@@ -245,56 +135,3 @@ export function toExecutionErrorResult(params: SubagentParamsLike, error: unknow
|
|
|
245
135
|
params.context,
|
|
246
136
|
);
|
|
247
137
|
}
|
|
248
|
-
|
|
249
|
-
export function collectChainSessionFiles(
|
|
250
|
-
chain: ChainStep[],
|
|
251
|
-
sessionFileForIndex: (idx?: number) => string | undefined,
|
|
252
|
-
): (string | undefined)[] {
|
|
253
|
-
const sessionFiles: (string | undefined)[] = [];
|
|
254
|
-
let flatIndex = 0;
|
|
255
|
-
for (const step of chain) {
|
|
256
|
-
if (isParallelStep(step)) {
|
|
257
|
-
for (let i = 0; i < step.parallel.length; i++) {
|
|
258
|
-
sessionFiles.push(sessionFileForIndex(flatIndex));
|
|
259
|
-
flatIndex++;
|
|
260
|
-
}
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
if (isDynamicParallelStep(step)) {
|
|
264
|
-
sessionFiles.push(undefined);
|
|
265
|
-
continue;
|
|
266
|
-
}
|
|
267
|
-
sessionFiles.push(sessionFileForIndex(flatIndex));
|
|
268
|
-
flatIndex++;
|
|
269
|
-
}
|
|
270
|
-
return sessionFiles;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export function wrapChainTasksForFork(chain: ChainStep[], context: SubagentParamsLike["context"]): ChainStep[] {
|
|
274
|
-
if (context !== "fork") return chain;
|
|
275
|
-
return chain.map((step, stepIndex) => {
|
|
276
|
-
if (isParallelStep(step)) {
|
|
277
|
-
return {
|
|
278
|
-
...step,
|
|
279
|
-
parallel: step.parallel.map((task) => ({
|
|
280
|
-
...task,
|
|
281
|
-
task: wrapForkTask(task.task ?? "{previous}"),
|
|
282
|
-
})),
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
if (isDynamicParallelStep(step)) {
|
|
286
|
-
return {
|
|
287
|
-
...step,
|
|
288
|
-
parallel: {
|
|
289
|
-
...step.parallel,
|
|
290
|
-
task: wrapForkTask(step.parallel.task ?? "{previous}"),
|
|
291
|
-
},
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
const sequential = step as SequentialStep;
|
|
295
|
-
return {
|
|
296
|
-
...sequential,
|
|
297
|
-
task: wrapForkTask(sequential.task ?? (stepIndex === 0 ? "{task}" : "{previous}")),
|
|
298
|
-
};
|
|
299
|
-
});
|
|
300
|
-
}
|
|
@@ -2,7 +2,7 @@ import type { ExtensionContext } from "@bastani/atomic";
|
|
|
2
2
|
import type { AgentConfig } from "../../agents/agents.ts";
|
|
3
3
|
import { INTERCOM_BRIDGE_MARKER } from "../../intercom/intercom-bridge.ts";
|
|
4
4
|
import type { ModelInfo } from "../../shared/model-info.ts";
|
|
5
|
-
import {
|
|
5
|
+
import { buildTaskInstructions, type ResolvedStepBehavior } from "../../shared/settings.ts";
|
|
6
6
|
import type {
|
|
7
7
|
AgentProgress,
|
|
8
8
|
ArtifactConfig,
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
} from "../../shared/types.ts";
|
|
16
16
|
import { workflowSessionMetadataFromContext } from "../../shared/types-depth.ts";
|
|
17
17
|
import { mapConcurrent } from "../../shared/utils.ts";
|
|
18
|
-
import { inheritedIntercomGroup, resolveChildIntercomGroup } from "../shared/intercom-group.
|
|
18
|
+
import { inheritedIntercomGroup, resolveChildIntercomGroup } from "../shared/intercom-group.js";
|
|
19
19
|
import { currentModelFullId } from "../shared/model-fallback.ts";
|
|
20
20
|
import { injectSingleOutputInstruction, resolveSingleOutputPath } from "../shared/single-output.ts";
|
|
21
21
|
import type { WorktreeSetup } from "../shared/worktree.ts";
|
|
@@ -38,6 +38,7 @@ interface ForegroundParallelRunInput {
|
|
|
38
38
|
maxOutput?: MaxOutputConfig;
|
|
39
39
|
paramsCwd: string;
|
|
40
40
|
maxSubagentDepths: number[];
|
|
41
|
+
parentDepth?: number;
|
|
41
42
|
workflowStageSubagentGuard?: boolean;
|
|
42
43
|
availableModels: ModelInfo[];
|
|
43
44
|
knownModelProviders: string[];
|
|
@@ -77,10 +78,10 @@ export async function runForegroundParallelTasks(input: ForegroundParallelRunInp
|
|
|
77
78
|
const effectiveSkills = behavior?.skills;
|
|
78
79
|
const taskCwd = resolveParallelTaskCwd(task, input.paramsCwd, input.worktreeSetup, index);
|
|
79
80
|
const readInstructions = behavior
|
|
80
|
-
?
|
|
81
|
+
? buildTaskInstructions({ ...behavior, output: false, progress: false }, taskCwd, false)
|
|
81
82
|
: { prefix: "", suffix: "" };
|
|
82
83
|
const progressInstructions = behavior
|
|
83
|
-
?
|
|
84
|
+
? buildTaskInstructions(
|
|
84
85
|
{ ...behavior, output: false, reads: false },
|
|
85
86
|
input.paramsCwd,
|
|
86
87
|
index === input.firstProgressIndex,
|
|
@@ -124,6 +125,7 @@ export async function runForegroundParallelTasks(input: ForegroundParallelRunInp
|
|
|
124
125
|
outputPath,
|
|
125
126
|
outputMode: behavior?.outputMode,
|
|
126
127
|
maxSubagentDepth: input.maxSubagentDepths[index],
|
|
128
|
+
parentDepth: input.parentDepth,
|
|
127
129
|
workflowStageSubagentGuard: input.workflowStageSubagentGuard,
|
|
128
130
|
workflowSessionMetadata: workflowSessionMetadataFromContext(input.ctx),
|
|
129
131
|
controlConfig: input.controlConfig,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "../../shared/types.ts";
|
|
22
22
|
import { compactForegroundDetails, getSingleResultOutput } from "../../shared/utils.ts";
|
|
23
23
|
import { updateForegroundNestedProjection } from "../inprocess/runtime-support/nested-api.ts";
|
|
24
|
-
import { sharedAutoGroupForSet } from "../shared/intercom-group.
|
|
24
|
+
import { sharedAutoGroupForSet } from "../shared/intercom-group.js";
|
|
25
25
|
import { resolveModelCandidate } from "../shared/model-fallback.ts";
|
|
26
26
|
import { aggregateParallelOutputs } from "../shared/parallel-utils.ts";
|
|
27
27
|
import { recordRun } from "../shared/run-history.ts";
|
|
@@ -226,6 +226,7 @@ export async function runParallelPath(
|
|
|
226
226
|
foregroundControl,
|
|
227
227
|
concurrencyLimit: parallelConcurrency,
|
|
228
228
|
maxSubagentDepths,
|
|
229
|
+
parentDepth: data.parentDepth,
|
|
229
230
|
liveResults,
|
|
230
231
|
liveProgress,
|
|
231
232
|
onUpdate,
|
|
@@ -250,7 +251,13 @@ export async function runParallelPath(
|
|
|
250
251
|
progress: params.includeProgress ? allProgress : undefined,
|
|
251
252
|
artifacts: allArtifactPaths.length ? { dir: artifactsDir, files: allArtifactPaths } : undefined,
|
|
252
253
|
});
|
|
253
|
-
rememberForegroundRun(deps.state, {
|
|
254
|
+
rememberForegroundRun(deps.state, {
|
|
255
|
+
runId,
|
|
256
|
+
mode: "parallel",
|
|
257
|
+
cwd: effectiveCwd,
|
|
258
|
+
results: details.results,
|
|
259
|
+
maxSubagentDepths,
|
|
260
|
+
});
|
|
254
261
|
if (interrupted) {
|
|
255
262
|
return {
|
|
256
263
|
content: [
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "../../shared/types.ts";
|
|
21
21
|
import { compactForegroundDetails, getSingleResultOutput } from "../../shared/utils.ts";
|
|
22
22
|
import { updateForegroundNestedProjection } from "../inprocess/runtime-support/nested-api.ts";
|
|
23
|
-
import { inheritedIntercomGroup, resolveChildIntercomGroup } from "../shared/intercom-group.
|
|
23
|
+
import { inheritedIntercomGroup, resolveChildIntercomGroup } from "../shared/intercom-group.js";
|
|
24
24
|
import { currentModelFullId, resolveModelCandidate } from "../shared/model-fallback.ts";
|
|
25
25
|
import { recordRun } from "../shared/run-history.ts";
|
|
26
26
|
import {
|
|
@@ -196,6 +196,7 @@ export async function runSinglePath(
|
|
|
196
196
|
outputPath,
|
|
197
197
|
outputMode: effectiveOutputMode,
|
|
198
198
|
maxSubagentDepth,
|
|
199
|
+
parentDepth: data.parentDepth,
|
|
199
200
|
workflowStageSubagentGuard,
|
|
200
201
|
workflowSessionMetadata: workflowSessionMetadataFromContext(ctx),
|
|
201
202
|
onUpdate: forwardSingleUpdate,
|
|
@@ -262,7 +263,13 @@ export async function runSinglePath(
|
|
|
262
263
|
artifacts: allArtifactPaths.length ? { dir: artifactsDir, files: allArtifactPaths } : undefined,
|
|
263
264
|
truncation: r.truncation,
|
|
264
265
|
});
|
|
265
|
-
rememberForegroundRun(deps.state, {
|
|
266
|
+
rememberForegroundRun(deps.state, {
|
|
267
|
+
runId,
|
|
268
|
+
mode: "single",
|
|
269
|
+
cwd: effectiveCwd,
|
|
270
|
+
results: details.results,
|
|
271
|
+
maxSubagentDepths: [maxSubagentDepth],
|
|
272
|
+
});
|
|
266
273
|
|
|
267
274
|
if (!r.detached && !r.interrupted) {
|
|
268
275
|
if (foregroundControl) updateForegroundNestedProjection(foregroundControl);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExtensionAPI, isStaleExtensionContextError } from "@bastani/atomic";
|
|
2
2
|
import { type IntercomBridgeState, resolveSubagentIntercomTarget } from "../../intercom/intercom-bridge.ts";
|
|
3
3
|
import {
|
|
4
4
|
attachNestedChildrenToResultChildren,
|
|
@@ -127,7 +127,14 @@ function takeEarlyDetachedResult(state: SubagentState, runId: string, index: num
|
|
|
127
127
|
|
|
128
128
|
export function rememberForegroundRun(
|
|
129
129
|
state: SubagentState,
|
|
130
|
-
input: {
|
|
130
|
+
input: {
|
|
131
|
+
runId: string;
|
|
132
|
+
mode: "single" | "parallel";
|
|
133
|
+
cwd: string;
|
|
134
|
+
results: SingleResult[];
|
|
135
|
+
/** Effective delegation limit per child, aligned with `results` by index. */
|
|
136
|
+
maxSubagentDepths?: readonly (number | undefined)[];
|
|
137
|
+
},
|
|
131
138
|
): void {
|
|
132
139
|
state.foregroundRuns ??= new Map();
|
|
133
140
|
state.foregroundRuns.set(input.runId, {
|
|
@@ -137,6 +144,7 @@ export function rememberForegroundRun(
|
|
|
137
144
|
updatedAt: Date.now(),
|
|
138
145
|
children: input.results.map((originalResult, index) => {
|
|
139
146
|
const result = takeEarlyDetachedResult(state, input.runId, index) ?? originalResult;
|
|
147
|
+
const maxSubagentDepth = input.maxSubagentDepths?.[index];
|
|
140
148
|
return {
|
|
141
149
|
agent: result.agent,
|
|
142
150
|
index,
|
|
@@ -146,6 +154,7 @@ export function rememberForegroundRun(
|
|
|
146
154
|
detached: result.detached,
|
|
147
155
|
}),
|
|
148
156
|
...(result.sessionFile ? { sessionFile: result.sessionFile } : {}),
|
|
157
|
+
...(maxSubagentDepth === undefined ? {} : { maxSubagentDepth }),
|
|
149
158
|
result,
|
|
150
159
|
};
|
|
151
160
|
}),
|
|
@@ -218,7 +227,12 @@ export function emitControlNotification(input: {
|
|
|
218
227
|
noticeText: formatControlNoticeMessage(input.event, childIntercomTarget),
|
|
219
228
|
};
|
|
220
229
|
if (input.controlConfig.notifyChannels.includes("event")) {
|
|
221
|
-
|
|
230
|
+
try {
|
|
231
|
+
input.pi.events.emit(SUBAGENT_CONTROL_EVENT, payload);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
if (!isStaleExtensionContextError(error)) throw error;
|
|
234
|
+
// Control notices are best effort after a parent runtime replacement.
|
|
235
|
+
}
|
|
222
236
|
}
|
|
223
237
|
if (
|
|
224
238
|
input.event.type !== "active_long_running" &&
|
|
@@ -226,11 +240,16 @@ export function emitControlNotification(input: {
|
|
|
226
240
|
input.intercomBridge.active &&
|
|
227
241
|
input.intercomBridge.orchestratorTarget
|
|
228
242
|
) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
243
|
+
try {
|
|
244
|
+
input.pi.events.emit(SUBAGENT_CONTROL_INTERCOM_EVENT, {
|
|
245
|
+
...payload,
|
|
246
|
+
to: input.intercomBridge.orchestratorTarget,
|
|
247
|
+
message: formatControlIntercomMessage(input.event, childIntercomTarget),
|
|
248
|
+
});
|
|
249
|
+
} catch (error) {
|
|
250
|
+
if (!isStaleExtensionContextError(error)) throw error;
|
|
251
|
+
// Intercom control notices are best effort after a parent runtime replacement.
|
|
252
|
+
}
|
|
234
253
|
}
|
|
235
254
|
}
|
|
236
255
|
|
|
@@ -290,7 +309,11 @@ export function notifyDetachedForegroundChildExit(input: {
|
|
|
290
309
|
noticeLabel: "Detached subagent task",
|
|
291
310
|
},
|
|
292
311
|
`foreground-detach-${runId}-${index}`,
|
|
293
|
-
)
|
|
312
|
+
).catch((error) => {
|
|
313
|
+
if (!isStaleExtensionContextError(error)) {
|
|
314
|
+
console.error("Failed to emit detached subagent completion notification:", error);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
294
317
|
}
|
|
295
318
|
|
|
296
319
|
async function emitForegroundResultIntercom(input: {
|
|
@@ -299,7 +322,6 @@ async function emitForegroundResultIntercom(input: {
|
|
|
299
322
|
runId: string;
|
|
300
323
|
mode: SubagentRunMode;
|
|
301
324
|
results: SingleResult[];
|
|
302
|
-
chainSteps?: number;
|
|
303
325
|
nestedChildren?: NestedRunSummary[];
|
|
304
326
|
}): Promise<ReturnType<typeof buildSubagentResultIntercomPayload> | null> {
|
|
305
327
|
if (!input.intercomBridge.active || !input.intercomBridge.orchestratorTarget) return null;
|
|
@@ -329,7 +351,6 @@ async function emitForegroundResultIntercom(input: {
|
|
|
329
351
|
mode: input.mode,
|
|
330
352
|
source: "foreground",
|
|
331
353
|
children: attachNestedChildrenToResultChildren(input.runId, children, input.nestedChildren),
|
|
332
|
-
...(typeof input.chainSteps === "number" ? { chainSteps: input.chainSteps } : {}),
|
|
333
354
|
});
|
|
334
355
|
const delivered = await deliverSubagentResultIntercomEvent(input.pi.events, payload);
|
|
335
356
|
if (!delivered) return null;
|
|
@@ -350,7 +371,6 @@ export async function maybeBuildForegroundIntercomReceipt(input: {
|
|
|
350
371
|
runId: input.runId,
|
|
351
372
|
mode: input.mode,
|
|
352
373
|
results: input.details.results,
|
|
353
|
-
...(typeof input.details.totalSteps === "number" ? { chainSteps: input.details.totalSteps } : {}),
|
|
354
374
|
...(input.nestedChildren?.length ? { nestedChildren: input.nestedChildren } : {}),
|
|
355
375
|
});
|
|
356
376
|
if (!payload) return null;
|