pi-subagents 0.76.1 → 0.78.0
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 +115 -0
- package/README.md +1 -1
- package/agents/evidence-auditor.md +1 -0
- package/agents/oracle.md +9 -19
- package/agents/researcher.md +0 -3
- package/agents/reviewer.md +18 -61
- package/agents/scout.md +1 -4
- package/agents/worker.md +8 -25
- package/docs/agents.md +71 -4
- package/docs/configuration.md +75 -10
- package/docs/extension-api.md +38 -9
- package/docs/missions.md +24 -17
- package/docs/models.md +1 -1
- package/docs/observability.md +12 -5
- package/docs/tool-reference.md +103 -85
- package/docs/watchdog.md +8 -6
- package/docs/workflows.md +17 -8
- package/package.json +1 -1
- package/prompts/council.md +1 -1
- package/skills/pi-subagents/SKILL.md +2 -2
- package/skills/pi-subagents/references/constraints-and-recipes.md +1 -1
- package/skills/pi-subagents/references/execution-controls.md +16 -16
- package/skills/pi-subagents/references/management-authoring-rpc.md +16 -12
- package/skills/pi-subagents/references/multi-lane-orchestration.md +1 -1
- package/skills/pi-subagents/references/prompting-and-roles.md +3 -3
- package/src/agents/advertised-agent-prompt.d.ts +5 -1
- package/src/agents/advertised-agent-prompt.d.ts.map +1 -1
- package/src/agents/advertised-agent-prompt.js +8 -2
- package/src/agents/advertised-agent-prompt.js.map +1 -1
- package/src/agents/agent-management.d.ts.map +1 -1
- package/src/agents/agent-management.js +5 -0
- package/src/agents/agent-management.js.map +1 -1
- package/src/agents/agent-scope.d.ts +1 -0
- package/src/agents/agent-scope.d.ts.map +1 -1
- package/src/agents/agent-scope.js +3 -0
- package/src/agents/agent-scope.js.map +1 -1
- package/src/agents/agent-serializer.d.ts.map +1 -1
- package/src/agents/agent-serializer.js +3 -0
- package/src/agents/agent-serializer.js.map +1 -1
- package/src/agents/agents.d.ts +14 -2
- package/src/agents/agents.d.ts.map +1 -1
- package/src/agents/agents.js +94 -36
- package/src/agents/agents.js.map +1 -1
- package/src/api/external-runs.d.ts.map +1 -1
- package/src/api/external-runs.js +5 -4
- package/src/api/external-runs.js.map +1 -1
- package/src/api/preflight.d.ts +2 -0
- package/src/api/preflight.d.ts.map +1 -1
- package/src/api/preflight.js +7 -3
- package/src/api/preflight.js.map +1 -1
- package/src/extension/active-runs-prompt.d.ts +8 -0
- package/src/extension/active-runs-prompt.d.ts.map +1 -0
- package/src/extension/active-runs-prompt.js +30 -0
- package/src/extension/active-runs-prompt.js.map +1 -0
- package/src/extension/config.d.ts.map +1 -1
- package/src/extension/config.js +29 -2
- package/src/extension/config.js.map +1 -1
- package/src/extension/control-notices.d.ts +0 -2
- package/src/extension/control-notices.d.ts.map +1 -1
- package/src/extension/control-notices.js +1 -7
- package/src/extension/control-notices.js.map +1 -1
- package/src/extension/declaration-pinning.d.ts +19 -0
- package/src/extension/declaration-pinning.d.ts.map +1 -0
- package/src/extension/declaration-pinning.js +154 -0
- package/src/extension/declaration-pinning.js.map +1 -0
- package/src/extension/fanout-child.d.ts.map +1 -1
- package/src/extension/fanout-child.js +6 -8
- package/src/extension/fanout-child.js.map +1 -1
- package/src/extension/index.d.ts +1 -2
- package/src/extension/index.d.ts.map +1 -1
- package/src/extension/index.js +104 -121
- package/src/extension/index.js.map +1 -1
- package/src/extension/rpc.d.ts.map +1 -1
- package/src/extension/rpc.js +12 -6
- package/src/extension/rpc.js.map +1 -1
- package/src/extension/schemas.d.ts +137 -1
- package/src/extension/schemas.d.ts.map +1 -1
- package/src/extension/schemas.js +22 -22
- package/src/extension/schemas.js.map +1 -1
- package/src/extension/subagent-guide.d.ts +1 -0
- package/src/extension/subagent-guide.d.ts.map +1 -1
- package/src/extension/subagent-guide.js +80 -6
- package/src/extension/subagent-guide.js.map +1 -1
- package/src/extension/subagent-options.d.ts +8 -0
- package/src/extension/subagent-options.d.ts.map +1 -0
- package/src/extension/subagent-options.js +52 -0
- package/src/extension/subagent-options.js.map +1 -0
- package/src/extension/tool-activation.d.ts.map +1 -1
- package/src/extension/tool-activation.js +7 -4
- package/src/extension/tool-activation.js.map +1 -1
- package/src/extension/tool-description.d.ts +4 -7
- package/src/extension/tool-description.d.ts.map +1 -1
- package/src/extension/tool-description.js +45 -59
- package/src/extension/tool-description.js.map +1 -1
- package/src/inspectors/actions.d.ts +2 -0
- package/src/inspectors/actions.d.ts.map +1 -1
- package/src/inspectors/actions.js +41 -13
- package/src/inspectors/actions.js.map +1 -1
- package/src/inspectors/plugins.d.ts.map +1 -1
- package/src/inspectors/plugins.js +3 -2
- package/src/inspectors/plugins.js.map +1 -1
- package/src/inspectors/tmux/actions.d.ts +26 -0
- package/src/inspectors/tmux/actions.d.ts.map +1 -0
- package/src/inspectors/tmux/actions.js +182 -0
- package/src/inspectors/tmux/actions.js.map +1 -0
- package/src/inspectors/tmux/client.d.ts +28 -0
- package/src/inspectors/tmux/client.d.ts.map +1 -0
- package/src/inspectors/tmux/client.js +65 -0
- package/src/inspectors/tmux/client.js.map +1 -0
- package/src/inspectors/tmux/plugin.d.ts +8 -0
- package/src/inspectors/tmux/plugin.d.ts.map +1 -0
- package/src/inspectors/tmux/plugin.js +15 -0
- package/src/inspectors/tmux/plugin.js.map +1 -0
- package/src/integrations/program-status.d.ts +31 -0
- package/src/integrations/program-status.d.ts.map +1 -0
- package/src/integrations/program-status.js +189 -0
- package/src/integrations/program-status.js.map +1 -0
- package/src/intercom/native-supervisor-channel.d.ts +16 -1
- package/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/src/intercom/native-supervisor-channel.js +101 -8
- package/src/intercom/native-supervisor-channel.js.map +1 -1
- package/src/intercom/result-intercom.js +1 -1
- package/src/intercom/result-intercom.js.map +1 -1
- package/src/intercom/supervisor-ui.d.ts +2 -12
- package/src/intercom/supervisor-ui.d.ts.map +1 -1
- package/src/intercom/supervisor-ui.js +2 -154
- package/src/intercom/supervisor-ui.js.map +1 -1
- package/src/missions/store.d.ts.map +1 -1
- package/src/missions/store.js +27 -5
- package/src/missions/store.js.map +1 -1
- package/src/runs/background/active-async-capacity.d.ts +2 -1
- package/src/runs/background/active-async-capacity.d.ts.map +1 -1
- package/src/runs/background/active-async-capacity.js +10 -6
- package/src/runs/background/active-async-capacity.js.map +1 -1
- package/src/runs/background/async-execution.d.ts +9 -1
- package/src/runs/background/async-execution.d.ts.map +1 -1
- package/src/runs/background/async-execution.js +253 -144
- package/src/runs/background/async-execution.js.map +1 -1
- package/src/runs/background/async-job-tracker.d.ts +4 -1
- package/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/src/runs/background/async-job-tracker.js +3 -2
- package/src/runs/background/async-job-tracker.js.map +1 -1
- package/src/runs/background/async-resume.d.ts.map +1 -1
- package/src/runs/background/async-resume.js +9 -3
- package/src/runs/background/async-resume.js.map +1 -1
- package/src/runs/background/await-async-run.d.ts +8 -4
- package/src/runs/background/await-async-run.d.ts.map +1 -1
- package/src/runs/background/await-async-run.js +14 -8
- package/src/runs/background/await-async-run.js.map +1 -1
- package/src/runs/background/binary-bootstrap.d.ts.map +1 -1
- package/src/runs/background/binary-bootstrap.js +2 -1
- package/src/runs/background/binary-bootstrap.js.map +1 -1
- package/src/runs/background/chain-root-attachment.d.ts +2 -0
- package/src/runs/background/chain-root-attachment.d.ts.map +1 -1
- package/src/runs/background/chain-root-attachment.js +9 -6
- package/src/runs/background/chain-root-attachment.js.map +1 -1
- package/src/runs/background/control-channel.d.ts +1 -0
- package/src/runs/background/control-channel.d.ts.map +1 -1
- package/src/runs/background/control-channel.js +27 -3
- package/src/runs/background/control-channel.js.map +1 -1
- package/src/runs/background/fleet-view.js +5 -5
- package/src/runs/background/fleet-view.js.map +1 -1
- package/src/runs/background/notify.d.ts +6 -1
- package/src/runs/background/notify.d.ts.map +1 -1
- package/src/runs/background/notify.js +130 -14
- package/src/runs/background/notify.js.map +1 -1
- package/src/runs/background/result-files.d.ts +27 -0
- package/src/runs/background/result-files.d.ts.map +1 -1
- package/src/runs/background/result-files.js +100 -6
- package/src/runs/background/result-files.js.map +1 -1
- package/src/runs/background/result-watcher.d.ts.map +1 -1
- package/src/runs/background/result-watcher.js +60 -64
- package/src/runs/background/result-watcher.js.map +1 -1
- package/src/runs/background/resume-guidance.js +2 -2
- package/src/runs/background/resume-guidance.js.map +1 -1
- package/src/runs/background/run-child-session.d.ts.map +1 -1
- package/src/runs/background/run-child-session.js +9 -15
- package/src/runs/background/run-child-session.js.map +1 -1
- package/src/runs/background/run-id-resolver.d.ts.map +1 -1
- package/src/runs/background/run-id-resolver.js +9 -6
- package/src/runs/background/run-id-resolver.js.map +1 -1
- package/src/runs/background/run-status.d.ts.map +1 -1
- package/src/runs/background/run-status.js +19 -15
- package/src/runs/background/run-status.js.map +1 -1
- package/src/runs/background/runner-aliases.d.ts.map +1 -1
- package/src/runs/background/runner-aliases.js +11 -8
- package/src/runs/background/runner-aliases.js.map +1 -1
- package/src/runs/background/runner-child-launch.d.ts.map +1 -1
- package/src/runs/background/runner-child-launch.js +1 -0
- package/src/runs/background/runner-child-launch.js.map +1 -1
- package/src/runs/background/runner-http-dispatcher.d.ts +3 -0
- package/src/runs/background/runner-http-dispatcher.d.ts.map +1 -1
- package/src/runs/background/runner-http-dispatcher.js +2 -0
- package/src/runs/background/runner-http-dispatcher.js.map +1 -1
- package/src/runs/background/scheduled-runs.d.ts +9 -0
- package/src/runs/background/scheduled-runs.d.ts.map +1 -1
- package/src/runs/background/scheduled-runs.js +124 -36
- package/src/runs/background/scheduled-runs.js.map +1 -1
- package/src/runs/background/subagent-runner-bootstrap.d.ts.map +1 -1
- package/src/runs/background/subagent-runner-bootstrap.js +5 -1
- package/src/runs/background/subagent-runner-bootstrap.js.map +1 -1
- package/src/runs/background/subagent-runner.d.ts +3 -1
- package/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/src/runs/background/subagent-runner.js +211 -283
- package/src/runs/background/subagent-runner.js.map +1 -1
- package/src/runs/background/subagent-wait.d.ts +2 -0
- package/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/src/runs/background/subagent-wait.js +34 -20
- package/src/runs/background/subagent-wait.js.map +1 -1
- package/src/runs/background/terminal-run-index.d.ts +1 -0
- package/src/runs/background/terminal-run-index.d.ts.map +1 -1
- package/src/runs/background/terminal-run-index.js +47 -1
- package/src/runs/background/terminal-run-index.js.map +1 -1
- package/src/runs/background/wait-tool.d.ts.map +1 -1
- package/src/runs/background/wait-tool.js +36 -23
- package/src/runs/background/wait-tool.js.map +1 -1
- package/src/runs/background/workflow-terminal-proof.d.ts +1 -1
- package/src/runs/background/workflow-terminal-proof.d.ts.map +1 -1
- package/src/runs/background/workflow-terminal-proof.js +12 -3
- package/src/runs/background/workflow-terminal-proof.js.map +1 -1
- package/src/runs/foreground/async-stop-action.d.ts +7 -1
- package/src/runs/foreground/async-stop-action.d.ts.map +1 -1
- package/src/runs/foreground/async-stop-action.js +27 -23
- package/src/runs/foreground/async-stop-action.js.map +1 -1
- package/src/runs/foreground/execution.d.ts.map +1 -1
- package/src/runs/foreground/execution.js +91 -69
- package/src/runs/foreground/execution.js.map +1 -1
- package/src/runs/foreground/subagent-executor.d.ts +4 -1
- package/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/src/runs/foreground/subagent-executor.js +174 -79
- package/src/runs/foreground/subagent-executor.js.map +1 -1
- package/src/runs/shared/child-hooks.js +6 -5
- package/src/runs/shared/child-hooks.js.map +1 -1
- package/src/runs/shared/child-launch.d.ts +2 -0
- package/src/runs/shared/child-launch.d.ts.map +1 -1
- package/src/runs/shared/child-launch.js +1 -0
- package/src/runs/shared/child-launch.js.map +1 -1
- package/src/runs/shared/child-session.d.ts +4 -0
- package/src/runs/shared/child-session.d.ts.map +1 -1
- package/src/runs/shared/child-session.js +28 -23
- package/src/runs/shared/child-session.js.map +1 -1
- package/src/runs/shared/child-tool-plan.d.ts.map +1 -1
- package/src/runs/shared/child-tool-plan.js +11 -10
- package/src/runs/shared/child-tool-plan.js.map +1 -1
- package/src/runs/shared/dynamic-fanout.js +1 -1
- package/src/runs/shared/dynamic-fanout.js.map +1 -1
- package/src/runs/shared/effective-system-prompt.d.ts +4 -4
- package/src/runs/shared/effective-system-prompt.d.ts.map +1 -1
- package/src/runs/shared/effective-system-prompt.js +5 -4
- package/src/runs/shared/effective-system-prompt.js.map +1 -1
- package/src/runs/shared/external-cli-runner.d.ts.map +1 -1
- package/src/runs/shared/external-cli-runner.js +3 -2
- package/src/runs/shared/external-cli-runner.js.map +1 -1
- package/src/runs/shared/herdr-placed-run.d.ts +1 -0
- package/src/runs/shared/herdr-placed-run.d.ts.map +1 -1
- package/src/runs/shared/herdr-placed-run.js +10 -6
- package/src/runs/shared/herdr-placed-run.js.map +1 -1
- package/src/runs/shared/model-resolution-diagnostic.d.ts +17 -5
- package/src/runs/shared/model-resolution-diagnostic.d.ts.map +1 -1
- package/src/runs/shared/model-resolution-diagnostic.js +37 -10
- package/src/runs/shared/model-resolution-diagnostic.js.map +1 -1
- package/src/runs/shared/model-resolution.d.ts.map +1 -1
- package/src/runs/shared/model-resolution.js +29 -1
- package/src/runs/shared/model-resolution.js.map +1 -1
- package/src/runs/shared/nested-events.d.ts +2 -0
- package/src/runs/shared/nested-events.d.ts.map +1 -1
- package/src/runs/shared/nested-events.js +4 -0
- package/src/runs/shared/nested-events.js.map +1 -1
- package/src/runs/shared/orca-progress-tabs.js +1 -1
- package/src/runs/shared/orca-progress-tabs.js.map +1 -1
- package/src/runs/shared/parallel-handoff.js +2 -2
- package/src/runs/shared/parallel-handoff.js.map +1 -1
- package/src/runs/shared/parallel-utils.d.ts +2 -0
- package/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/src/runs/shared/parallel-utils.js.map +1 -1
- package/src/runs/shared/partial-output.d.ts +7 -0
- package/src/runs/shared/partial-output.d.ts.map +1 -1
- package/src/runs/shared/partial-output.js +7 -0
- package/src/runs/shared/partial-output.js.map +1 -1
- package/src/runs/shared/runner-launcher.d.ts +12 -0
- package/src/runs/shared/runner-launcher.d.ts.map +1 -0
- package/src/runs/shared/runner-launcher.js +25 -0
- package/src/runs/shared/runner-launcher.js.map +1 -0
- package/src/runs/shared/single-output.d.ts +31 -1
- package/src/runs/shared/single-output.d.ts.map +1 -1
- package/src/runs/shared/single-output.js +100 -21
- package/src/runs/shared/single-output.js.map +1 -1
- package/src/runs/shared/structured-output.d.ts +2 -0
- package/src/runs/shared/structured-output.d.ts.map +1 -1
- package/src/runs/shared/structured-output.js +26 -8
- package/src/runs/shared/structured-output.js.map +1 -1
- package/src/runs/shared/subagent-control.js +3 -3
- package/src/runs/shared/subagent-control.js.map +1 -1
- package/src/runs/shared/subagent-prompt-runtime.d.ts +37 -2
- package/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/src/runs/shared/subagent-prompt-runtime.js +127 -20
- package/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/src/runs/shared/tool-budget.js +1 -1
- package/src/runs/shared/tool-budget.js.map +1 -1
- package/src/runs/shared/workflow-async-child-guidance.js +1 -1
- package/src/runs/shared/workflow-async-child-guidance.js.map +1 -1
- package/src/runs/shared/worktree-cleanup-plan.js +1 -1
- package/src/runs/shared/worktree-cleanup-plan.js.map +1 -1
- package/src/shared/atomic-json.d.ts +4 -3
- package/src/shared/atomic-json.d.ts.map +1 -1
- package/src/shared/atomic-json.js +3 -1
- package/src/shared/atomic-json.js.map +1 -1
- package/src/shared/child-transcript.js +1 -1
- package/src/shared/child-transcript.js.map +1 -1
- package/src/shared/edit-distance.d.ts +5 -0
- package/src/shared/edit-distance.d.ts.map +1 -0
- package/src/shared/edit-distance.js +33 -0
- package/src/shared/edit-distance.js.map +1 -0
- package/src/shared/extension-context.d.ts +5 -0
- package/src/shared/extension-context.d.ts.map +1 -1
- package/src/shared/extension-context.js +7 -0
- package/src/shared/extension-context.js.map +1 -1
- package/src/shared/formatters.d.ts.map +1 -1
- package/src/shared/formatters.js +1 -6
- package/src/shared/formatters.js.map +1 -1
- package/src/shared/model-info.d.ts +8 -0
- package/src/shared/model-info.d.ts.map +1 -1
- package/src/shared/model-info.js +22 -0
- package/src/shared/model-info.js.map +1 -1
- package/src/shared/parent-wake.d.ts +7 -1
- package/src/shared/parent-wake.d.ts.map +1 -1
- package/src/shared/parent-wake.js +36 -12
- package/src/shared/parent-wake.js.map +1 -1
- package/src/shared/pruned-fork.d.ts +1 -1
- package/src/shared/pruned-fork.d.ts.map +1 -1
- package/src/shared/pruned-fork.js +6 -0
- package/src/shared/pruned-fork.js.map +1 -1
- package/src/shared/runtime-module-path.d.ts +11 -0
- package/src/shared/runtime-module-path.d.ts.map +1 -0
- package/src/shared/runtime-module-path.js +17 -0
- package/src/shared/runtime-module-path.js.map +1 -0
- package/src/shared/types.d.ts +33 -10
- package/src/shared/types.d.ts.map +1 -1
- package/src/shared/types.js +7 -4
- package/src/shared/types.js.map +1 -1
- package/src/shared/utils.d.ts +2 -0
- package/src/shared/utils.d.ts.map +1 -1
- package/src/shared/utils.js +10 -7
- package/src/shared/utils.js.map +1 -1
- package/src/slash/slash-commands.d.ts.map +1 -1
- package/src/slash/slash-commands.js +21 -10
- package/src/slash/slash-commands.js.map +1 -1
- package/src/slash/subagents-admin.d.ts.map +1 -1
- package/src/slash/subagents-admin.js +3 -1
- package/src/slash/subagents-admin.js.map +1 -1
- package/src/tui/fleet-status.d.ts +5 -0
- package/src/tui/fleet-status.d.ts.map +1 -1
- package/src/tui/fleet-status.js +24 -3
- package/src/tui/fleet-status.js.map +1 -1
- package/src/tui/fleet-transcript.d.ts +2 -0
- package/src/tui/fleet-transcript.d.ts.map +1 -1
- package/src/tui/fleet-transcript.js +7 -2
- package/src/tui/fleet-transcript.js.map +1 -1
- package/src/tui/fleet.d.ts.map +1 -1
- package/src/tui/fleet.js +11 -6
- package/src/tui/fleet.js.map +1 -1
- package/src/tui/render.d.ts +2 -2
- package/src/tui/render.d.ts.map +1 -1
- package/src/tui/render.js +19 -17
- package/src/tui/render.js.map +1 -1
- package/src/tui/subagent-messages.d.ts +23 -0
- package/src/tui/subagent-messages.d.ts.map +1 -0
- package/src/tui/subagent-messages.js +270 -0
- package/src/tui/subagent-messages.js.map +1 -0
- package/src/watchdog/change-signature.d.ts.map +1 -1
- package/src/watchdog/change-signature.js +1 -3
- package/src/watchdog/change-signature.js.map +1 -1
- package/src/watchdog/register-main.d.ts.map +1 -1
- package/src/watchdog/register-main.js +1 -19
- package/src/watchdog/register-main.js.map +1 -1
- package/src/watchdog/render.d.ts +2 -10
- package/src/watchdog/render.d.ts.map +1 -1
- package/src/watchdog/render.js +1 -19
- package/src/watchdog/render.js.map +1 -1
- package/src/watchdog/tool-actions.js +2 -2
- package/src/watchdog/tool-actions.js.map +1 -1
- package/src/workflows/scripted-workflow.d.ts.map +1 -1
- package/src/workflows/scripted-workflow.js +33 -10
- package/src/workflows/scripted-workflow.js.map +1 -1
- package/src/workflows/workflow-resources.d.ts.map +1 -1
- package/src/workflows/workflow-resources.js +12 -0
- package/src/workflows/workflow-resources.js.map +1 -1
- package/src/runs/shared/run-history.d.ts +0 -67
- package/src/runs/shared/run-history.d.ts.map +0 -1
- package/src/runs/shared/run-history.js +0 -270
- package/src/runs/shared/run-history.js.map +0 -1
|
@@ -24,7 +24,16 @@ export function readWorkflowChildProcessEvidence(workflowAsyncDir, steps) {
|
|
|
24
24
|
}
|
|
25
25
|
return { state: "observed", children };
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The host records an async child's run id before launching it, so a launch that fails before any runner
|
|
29
|
+
* exists leaves a failed roster step whose run directory has no status and no runner artifacts.
|
|
30
|
+
*/
|
|
31
|
+
function launchFailedBeforeRunner(step, childDir) {
|
|
32
|
+
if (step.status !== "failed" || !step.error)
|
|
33
|
+
return false;
|
|
34
|
+
return !childDir || !["process-terminal.json", "runner-startup.json"].some((file) => fs.existsSync(path.join(childDir, file)));
|
|
35
|
+
}
|
|
36
|
+
/** Evidence for one roster entry; undefined for synchronous children, which run inside the workflow host and have no process of their own, and for async children whose launch failed before a runner existed. */
|
|
28
37
|
export function readWorkflowChildEvidence(workflowAsyncDir, step) {
|
|
29
38
|
const label = step.workflowKey ?? step.agent;
|
|
30
39
|
if (typeof step.async !== "boolean")
|
|
@@ -35,10 +44,10 @@ export function readWorkflowChildEvidence(workflowAsyncDir, step) {
|
|
|
35
44
|
return { state: "unknown", reason: `async workflow child ${label} is missing run id` };
|
|
36
45
|
const childDir = path.join(path.dirname(workflowAsyncDir), step.runId);
|
|
37
46
|
if (!fs.existsSync(childDir))
|
|
38
|
-
return { state: "unknown", reason: `async workflow child ${label} directory is missing` };
|
|
47
|
+
return launchFailedBeforeRunner(step) ? undefined : { state: "unknown", reason: `async workflow child ${label} directory is missing` };
|
|
39
48
|
const childStatus = readStatus(childDir);
|
|
40
49
|
if (!childStatus)
|
|
41
|
-
return { state: "unknown", reason: `async workflow child ${label} status is missing or unreadable` };
|
|
50
|
+
return launchFailedBeforeRunner(step, childDir) ? undefined : { state: "unknown", reason: `async workflow child ${label} status is missing or unreadable` };
|
|
42
51
|
if (!isTerminalAsyncState(childStatus.state))
|
|
43
52
|
return { state: "pending", reason: `async workflow child ${label} is still ${childStatus.state}` };
|
|
44
53
|
const recorded = childStatus.processTerminal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-terminal-proof.js","sourceRoot":"","sources":["../../../../src/runs/background/workflow-terminal-proof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAwC,CAAC,WAAW,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAEpH,MAAM,UAAU,oBAAoB,CAAC,KAA2B;IAC/D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,QAAQ,CAAC;A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,CAAC;AAClI,CAAC"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { AgentToolResult } from "@earendil-works/pi-agent-core";
|
|
2
|
-
import { type Details, type SubagentState } from "../../shared/types.ts";
|
|
2
|
+
import { type AsyncStatus, type Details, type SubagentState } from "../../shared/types.ts";
|
|
3
|
+
import { deliverStopRequest } from "../background/control-channel.ts";
|
|
4
|
+
/** After ownership/state checks, deliver stop and seal paused whole runs only with native terminal proof. */
|
|
5
|
+
export declare function deliverAsyncRunStop(input: Parameters<typeof deliverStopRequest>[0] & {
|
|
6
|
+
status: AsyncStatus;
|
|
7
|
+
resultsDir?: string;
|
|
8
|
+
}): string | undefined;
|
|
3
9
|
export declare function stopAsyncRun(state: SubagentState, runId: string | undefined, kill?: (pid: number, signal?: NodeJS.Signals | 0) => boolean, location?: {
|
|
4
10
|
asyncDir: string | null;
|
|
5
11
|
resolvedId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-stop-action.d.ts","sourceRoot":"","sources":["../../../../src/runs/foreground/async-stop-action.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,
|
|
1
|
+
{"version":3,"file":"async-stop-action.d.ts","sourceRoot":"","sources":["../../../../src/runs/foreground/async-stop-action.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAQ,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjG,OAAO,EAAE,kBAAkB,EAAuB,MAAM,kCAAkC,CAAC;AAkH3F,6GAA6G;AAC7G,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5F,MAAM,GAAG,SAAS,CAMpB;AAED,wBAAgB,YAAY,CAC3B,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,GAAG,CAAC,KAAK,OAAO,EAC5D,QAAQ,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3D,OAAO,CAAC,EAAE,MAAM,GACd,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CA4EjC"}
|
|
@@ -7,7 +7,7 @@ import { deliverStopRequest, stopInboxClosedPath } from "../background/control-c
|
|
|
7
7
|
import { readProcessTerminal } from "../background/process-terminal.js";
|
|
8
8
|
import { resultFilePath, resultPayloadFileForSessionRun, resultPayloadPathForSessionRun, writeAsyncResultFile } from "../background/result-files.js";
|
|
9
9
|
import { reconcileAsyncRun } from "../background/stale-run-reconciler.js";
|
|
10
|
-
import { readStatus } from "../../shared/utils.js";
|
|
10
|
+
import { SUBAGENT_STOPPED_MESSAGE, readStatus } from "../../shared/utils.js";
|
|
11
11
|
import { isStoppableAsyncStatusStep, resolveAsyncStatusChild, stopStoppableAsyncStatusChildren } from "../shared/child-identity.js";
|
|
12
12
|
function getAsyncStopTarget(state, runId, location) {
|
|
13
13
|
if (location?.asyncDir) {
|
|
@@ -21,8 +21,7 @@ function getAsyncStopTarget(state, runId, location) {
|
|
|
21
21
|
const direct = state.asyncJobs.get(runId);
|
|
22
22
|
return direct ? { asyncId: direct.asyncId, asyncDir: direct.asyncDir } : undefined;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
function sealPausedRun(asyncDir, status) {
|
|
24
|
+
function sealPausedRun(asyncDir, status, resultsDir) {
|
|
26
25
|
const runnerProcessInstanceId = status.processTerminal?.runnerProcessInstanceId;
|
|
27
26
|
if (!runnerProcessInstanceId)
|
|
28
27
|
return "runner process identity is missing";
|
|
@@ -33,8 +32,8 @@ function sealPausedRun(asyncDir, status) {
|
|
|
33
32
|
if (!status.sessionId)
|
|
34
33
|
return "session identity is missing";
|
|
35
34
|
// The validated lookup skips unreadable or foreign files; those must be refused below, not replaced.
|
|
36
|
-
const existingResultPath = resultPayloadPathForSessionRun(
|
|
37
|
-
?? resultPayloadFileForSessionRun(
|
|
35
|
+
const existingResultPath = resultPayloadPathForSessionRun(resultsDir, status.sessionId, status.runId)
|
|
36
|
+
?? resultPayloadFileForSessionRun(resultsDir, status.sessionId, status.runId);
|
|
38
37
|
let existingResult;
|
|
39
38
|
if (!existingResultPath) {
|
|
40
39
|
// Delivery deletes the paused result, and an interrupted parent may never have received one; seal from status.
|
|
@@ -76,7 +75,7 @@ function sealPausedRun(asyncDir, status) {
|
|
|
76
75
|
return {
|
|
77
76
|
...rest,
|
|
78
77
|
status: "stopped",
|
|
79
|
-
error:
|
|
78
|
+
error: SUBAGENT_STOPPED_MESSAGE,
|
|
80
79
|
exitCode: 1,
|
|
81
80
|
stopped: true,
|
|
82
81
|
endedAt: now,
|
|
@@ -90,15 +89,15 @@ function sealPausedRun(asyncDir, status) {
|
|
|
90
89
|
if ((stepState !== "pending" && stepState !== "running" && stepState !== "paused") || !entry || typeof entry !== "object" || Array.isArray(entry))
|
|
91
90
|
return entry;
|
|
92
91
|
const { interrupted: _interrupted, ...result } = entry;
|
|
93
|
-
return { ...result, output:
|
|
92
|
+
return { ...result, output: SUBAGENT_STOPPED_MESSAGE, error: SUBAGENT_STOPPED_MESSAGE, success: false, exitCode: 1, stopped: true };
|
|
94
93
|
})
|
|
95
94
|
: existingResult.results;
|
|
96
95
|
const stoppedResult = {
|
|
97
96
|
...existingResult,
|
|
98
97
|
success: false,
|
|
99
98
|
state: "stopped",
|
|
100
|
-
summary:
|
|
101
|
-
error:
|
|
99
|
+
summary: SUBAGENT_STOPPED_MESSAGE,
|
|
100
|
+
error: SUBAGENT_STOPPED_MESSAGE,
|
|
102
101
|
stopped: true,
|
|
103
102
|
exitCode: 1,
|
|
104
103
|
timestamp: now,
|
|
@@ -108,16 +107,26 @@ function sealPausedRun(asyncDir, status) {
|
|
|
108
107
|
...status,
|
|
109
108
|
state: "stopped",
|
|
110
109
|
stopped: true,
|
|
111
|
-
error:
|
|
110
|
+
error: SUBAGENT_STOPPED_MESSAGE,
|
|
112
111
|
endedAt: now,
|
|
113
112
|
lastUpdate: now,
|
|
114
113
|
steps,
|
|
115
114
|
};
|
|
116
115
|
delete stoppedStatus.activityState;
|
|
117
|
-
writeAsyncResultFile(resultFilePath(
|
|
116
|
+
writeAsyncResultFile(resultFilePath(resultsDir, status.runId), stoppedResult);
|
|
118
117
|
writeAtomicJson(path.join(asyncDir, "status.json"), stoppedStatus);
|
|
119
118
|
updateActiveRunIndex(asyncDir, "stopped", status.toolCallId, { retryCapacityErrors: true, terminalIndexBeforeRelease: true });
|
|
120
119
|
}
|
|
120
|
+
/** After ownership/state checks, deliver stop and seal paused whole runs only with native terminal proof. */
|
|
121
|
+
export function deliverAsyncRunStop(input) {
|
|
122
|
+
const { status, resultsDir = DIRS.results, ...delivery } = input;
|
|
123
|
+
const pausedWholeRun = status.state === "paused" && delivery.childId === undefined && delivery.targetIndex === undefined;
|
|
124
|
+
// A paused run whose runner closed its inbox can only be sealed from exact exit proof below.
|
|
125
|
+
if (!(pausedWholeRun && fs.existsSync(stopInboxClosedPath(delivery.asyncDir))))
|
|
126
|
+
deliverStopRequest(delivery);
|
|
127
|
+
if (pausedWholeRun)
|
|
128
|
+
return sealPausedRun(delivery.asyncDir, status, resultsDir);
|
|
129
|
+
}
|
|
121
130
|
export function stopAsyncRun(state, runId, kill, location, childId) {
|
|
122
131
|
const target = getAsyncStopTarget(state, runId, location);
|
|
123
132
|
// An async workflow runs in this process: it has no runner to read a stop request, so stop it through its controller.
|
|
@@ -171,18 +180,13 @@ export function stopAsyncRun(state, runId, kill, location, childId) {
|
|
|
171
180
|
}
|
|
172
181
|
}
|
|
173
182
|
try {
|
|
174
|
-
|
|
175
|
-
if (
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
content: [{ type: "text", text: `Stop request persisted for paused async run ${target.asyncId}, but terminal proof is not ready (${failure}). Retry stop after runner shutdown is observed.` }],
|
|
182
|
-
isError: true,
|
|
183
|
-
details: { mode: "management", results: [] },
|
|
184
|
-
};
|
|
185
|
-
}
|
|
183
|
+
const failure = deliverAsyncRunStop({ asyncDir: target.asyncDir, status, pid: typeof status.pid === "number" ? status.pid : undefined, kill, source: "stop-action", targetIndex: child?.index, childId: child?.id ?? childId });
|
|
184
|
+
if (failure) {
|
|
185
|
+
return {
|
|
186
|
+
content: [{ type: "text", text: `Stop request persisted for paused async run ${target.asyncId}, but terminal proof is not ready (${failure}). Retry stop after runner shutdown is observed.` }],
|
|
187
|
+
isError: true,
|
|
188
|
+
details: { mode: "management", results: [] },
|
|
189
|
+
};
|
|
186
190
|
}
|
|
187
191
|
const tracked = state.asyncJobs.get(target.asyncId);
|
|
188
192
|
if (tracked) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-stop-action.js","sourceRoot":"","sources":["../../../../src/runs/foreground/async-stop-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAsD,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,8BAA8B,EAAE,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C,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,4BAA4B,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,4BAA4B,KAAK,CAAC,EAAE,iBAAiB,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,gCAAgC,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;YACtO,OAAO,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE;SAC5C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,4BAA4B,MAAM,CAAC,OAAO,KAAK,OAAO,EAAE,EAAE,CAAC;YAC3F,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE;SAC5C,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../../src/runs/foreground/execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAA0E,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWlI,OAAO,EAIN,KAAK,cAAc,EACnB,KAAK,YAAY,EAQjB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../../src/runs/foreground/execution.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAA0E,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAWlI,OAAO,EAIN,KAAK,cAAc,EACnB,KAAK,YAAY,EAQjB,MAAM,uBAAuB,CAAC;AAoiE/B;;;GAGG;AACH,wBAAsB,OAAO,CAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,WAAW,EAAE,EACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,YAAY,CAAC,CAyHvB"}
|
|
@@ -21,15 +21,15 @@ import { resolvePermissionRules } from "../shared/permissions.js";
|
|
|
21
21
|
import { applyThinkingSuffix, deriveForkPromptCacheKey } from "../shared/child-tool-plan.js";
|
|
22
22
|
import { deriveChildSessionName } from "../../shared/child-session-name.js";
|
|
23
23
|
import { assertAgentAllowedByCapabilityCeiling, intersectSubagentCapabilityCeilings, resolveCurrentSubagentCapabilityCeiling } from "../shared/capability-ceiling.js";
|
|
24
|
-
import { resolveEffectiveThinking } from "../../shared/model-info.js";
|
|
24
|
+
import { qualifyModelWithProvider, resolveEffectiveThinking } from "../../shared/model-info.js";
|
|
25
25
|
import { assertThinkingWithinCeiling, intersectThinkingCeilings } from "../../shared/thinking-ceiling.js";
|
|
26
26
|
import { formatStructuredOutputRejectionError, MISSING_STRUCTURED_ACCEPTANCE_REPORT_ERROR, MISSING_STRUCTURED_OUTPUT_CALL_ERROR } from "../shared/structured-output.js";
|
|
27
27
|
import { formatMidToolExitError, isOrdinaryToolForMidToolExit } from "../shared/process-signal.js";
|
|
28
28
|
import { formatChildToolDiagnostic } from "../shared/tool-availability.js";
|
|
29
|
-
import { formatChildModelResolutionDiagnostic, isChildModelResolutionFailure } from "../shared/model-resolution-diagnostic.js";
|
|
29
|
+
import { formatChildModelResolutionDiagnostic, formatInheritedProviderDiagnostic, isChildModelResolutionFailure } from "../shared/model-resolution-diagnostic.js";
|
|
30
30
|
import { planAbortRecovery } from "../shared/abort-recovery.js";
|
|
31
31
|
import { buildTimeoutRecoverySummary, collectTrackedMutationEvidence, snapshotTrackedMutations } from "../shared/mutation-evidence.js";
|
|
32
|
-
import { captureSingleOutputSnapshot, extractChildWrittenOutput, finalizeSingleOutput, formatSavedOutputReference, hasSingleOutputChangedSinceSnapshot, resolveSingleOutput, validateFileOnlyOutputMode } from "../shared/single-output.js";
|
|
32
|
+
import { captureSingleOutputSnapshot, extractChildWrittenOutput, finalizeSingleOutput, formatSavedOutputReference, hasSingleOutputChangedSinceSnapshot, isSettlementFatalOutputError, resolveSingleOutput, validateFileOnlyOutputMode } from "../shared/single-output.js";
|
|
33
33
|
import { formatSubagentModelVerificationError, isContextOverflow, resolveModelSelection, } from "../shared/model-resolution.js";
|
|
34
34
|
import { createMutatingFailureState, didMutatingToolFail, isMutatingTool, nextLongRunningTrigger, recordMutatingFailure, resetMutatingFailureState, resolveCurrentPath, shouldEscalateMutatingFailures, summarizeRecentMutatingFailures, } from "../shared/long-running-guard.js";
|
|
35
35
|
import { acceptanceFailureMessage, buildSkippedAcceptanceLedger, captureStagedIndexBaseline, evaluateAcceptance, formatAcceptancePrompt, resolveEffectiveAcceptance, stripAcceptanceReport, validateAcceptanceInput, typedVerifyOutput } from "../shared/acceptance.js";
|
|
@@ -75,6 +75,7 @@ function persistSingleResultMetadata(input) {
|
|
|
75
75
|
const target = input.result;
|
|
76
76
|
writeMetadata(input.metadataPath, {
|
|
77
77
|
runId: input.runId,
|
|
78
|
+
parentSessionId: input.parentSessionId,
|
|
78
79
|
agent: input.agent,
|
|
79
80
|
task: PROMPT_REDACTED,
|
|
80
81
|
exitCode: target.exitCode,
|
|
@@ -190,8 +191,7 @@ function snapshotResult(result, progress) {
|
|
|
190
191
|
* foreground detach receipts and terminal consumers use snapshotResult directly.
|
|
191
192
|
*/
|
|
192
193
|
function snapshotStreamResult(result, progress) {
|
|
193
|
-
const snapshot = snapshotResult(result, progress);
|
|
194
|
-
snapshot.messages = undefined;
|
|
194
|
+
const snapshot = snapshotResult({ ...result, messages: undefined }, progress);
|
|
195
195
|
snapshot.toolCalls = boundStreamedToolCalls(result);
|
|
196
196
|
return snapshot;
|
|
197
197
|
}
|
|
@@ -297,6 +297,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
297
297
|
nestedRoute: options.nestedRoute,
|
|
298
298
|
runFanoutBudget: options.runFanoutBudget,
|
|
299
299
|
parentSessionId: options.parentSessionId,
|
|
300
|
+
parentSessionFile: options.parentSessionFile,
|
|
300
301
|
forkCacheKey: options.context === "fork" ? deriveForkPromptCacheKey(options.parentSessionId) : undefined,
|
|
301
302
|
structuredOutput: options.structuredOutput,
|
|
302
303
|
fast: options.fast ?? agent.fast,
|
|
@@ -466,6 +467,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
466
467
|
let sessionSettled = false;
|
|
467
468
|
let lifecycleFinished = false;
|
|
468
469
|
let detached = false;
|
|
470
|
+
let hostStopReason;
|
|
469
471
|
let intercomStarted = false;
|
|
470
472
|
let assistantError;
|
|
471
473
|
let removeAbortListener;
|
|
@@ -705,6 +707,9 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
705
707
|
return events;
|
|
706
708
|
};
|
|
707
709
|
let activeLongRunningNotified = false;
|
|
710
|
+
// Pi's parallel tool execution emits every tool_execution_start before the first result message,
|
|
711
|
+
// so results are matched to their call by toolCallId; the last-started slot covers events without one.
|
|
712
|
+
const pendingToolResultsByCallId = new Map();
|
|
708
713
|
let pendingToolResult;
|
|
709
714
|
let activeToolSequence = 0;
|
|
710
715
|
const activeToolCalls = new Map();
|
|
@@ -978,10 +983,12 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
978
983
|
}
|
|
979
984
|
progress.toolCount++;
|
|
980
985
|
if (options.toolBudget) {
|
|
981
|
-
result.toolBudget = toolBudgetState(options.toolBudget, progress.toolCount);
|
|
986
|
+
result.toolBudget = toolBudgetState(options.toolBudget, progress.toolCount, result.toolBudget?.blockedTool);
|
|
982
987
|
}
|
|
983
988
|
const mutates = isMutatingTool(evt.toolName, toolArgs, agent.mutationTools);
|
|
984
989
|
pendingToolResult = { tool: evt.toolName ?? "tool", path: activeTool?.path, mutates, startedAt: now };
|
|
990
|
+
if (typeof evt.toolCallId === "string" && evt.toolCallId)
|
|
991
|
+
pendingToolResultsByCallId.set(evt.toolCallId, pendingToolResult);
|
|
985
992
|
fireUpdate();
|
|
986
993
|
}
|
|
987
994
|
if (evt.type === "tool_execution_end") {
|
|
@@ -1030,9 +1037,10 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1030
1037
|
}
|
|
1031
1038
|
projectCompleteUsage();
|
|
1032
1039
|
if (evt.message.model) {
|
|
1033
|
-
|
|
1040
|
+
const observedModel = qualifyModelWithProvider(evt.message.model, evt.message.provider, options.availableModels);
|
|
1041
|
+
progress.model = observedModel;
|
|
1034
1042
|
if (!result.model)
|
|
1035
|
-
result.model =
|
|
1043
|
+
result.model = observedModel;
|
|
1036
1044
|
if (expectedModelForVerification && !hasToolCall) {
|
|
1037
1045
|
const modelVerificationError = formatSubagentModelVerificationError(expectedModelForVerification, evt.message.model, options.availableModels, options.modelResponseAliases, session?.virtualModelId);
|
|
1038
1046
|
if (modelVerificationError && !result.error)
|
|
@@ -1059,59 +1067,48 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1059
1067
|
applyChildLifecycle(projectChildLifecycle(evt, true, childLifecycleState));
|
|
1060
1068
|
}
|
|
1061
1069
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
if (shouldEscalateMutatingFailures(mutatingFailures, controlConfig.failedToolAttemptsBeforeAttention)) {
|
|
1102
|
-
emitNeedsAttention(now, {
|
|
1103
|
-
message: `${agent.name} needs attention after repeated mutating tool failures`,
|
|
1104
|
-
reason: "tool_failures",
|
|
1105
|
-
currentTool: toolSnapshot.tool,
|
|
1106
|
-
currentPath: toolSnapshot.path,
|
|
1107
|
-
currentToolDurationMs: toolSnapshot.startedAt ? Math.max(0, now - toolSnapshot.startedAt) : undefined,
|
|
1108
|
-
recentFailureSummary: summarizeRecentMutatingFailures(mutatingFailures),
|
|
1109
|
-
});
|
|
1070
|
+
// Pi delivers every tool result, including a call blocked by a tool_call handler, as a
|
|
1071
|
+
// toolResult message after tool_execution_end; it emits no separate result event.
|
|
1072
|
+
if (evt.message.role === "toolResult") {
|
|
1073
|
+
const resultText = extractTextFromContent(evt.message.content);
|
|
1074
|
+
const resultCallId = evt.message.toolCallId;
|
|
1075
|
+
const keyedSnapshot = typeof resultCallId === "string" ? pendingToolResultsByCallId.get(resultCallId) : undefined;
|
|
1076
|
+
if (keyedSnapshot)
|
|
1077
|
+
pendingToolResultsByCallId.delete(resultCallId);
|
|
1078
|
+
const toolSnapshot = keyedSnapshot ?? pendingToolResult;
|
|
1079
|
+
if (!keyedSnapshot || pendingToolResult === keyedSnapshot)
|
|
1080
|
+
pendingToolResult = undefined;
|
|
1081
|
+
// The result message's own tool name is authoritative; the pending snapshot is only a fallback.
|
|
1082
|
+
const resultToolName = evt.message.toolName;
|
|
1083
|
+
const blockedTool = (typeof resultToolName === "string" && resultToolName.length > 0 ? resultToolName : undefined) ?? toolSnapshot?.tool;
|
|
1084
|
+
if (options.toolBudget && isToolBudgetBlockedMessage(options.toolBudget, resultText, blockedTool)) {
|
|
1085
|
+
result.toolBudgetBlocked = true;
|
|
1086
|
+
result.toolBudget = toolBudgetState(options.toolBudget, Math.max(progress.toolCount, options.toolBudget.hard + 1), blockedTool);
|
|
1087
|
+
}
|
|
1088
|
+
appendRecentOutput(progress, resultText.split("\n").slice(-10));
|
|
1089
|
+
if (toolSnapshot?.mutates && didMutatingToolFail(resultText)) {
|
|
1090
|
+
recordMutatingFailure(mutatingFailures, {
|
|
1091
|
+
tool: toolSnapshot.tool,
|
|
1092
|
+
path: toolSnapshot.path,
|
|
1093
|
+
error: resultText.split("\n").find((line) => line.trim())?.trim().slice(0, 180) ?? "mutating tool failed",
|
|
1094
|
+
ts: now,
|
|
1095
|
+
}, mutatingFailureWindowMs);
|
|
1096
|
+
if (shouldEscalateMutatingFailures(mutatingFailures, controlConfig.failedToolAttemptsBeforeAttention)) {
|
|
1097
|
+
emitNeedsAttention(now, {
|
|
1098
|
+
message: `${agent.name} needs attention after repeated mutating tool failures`,
|
|
1099
|
+
reason: "tool_failures",
|
|
1100
|
+
currentTool: toolSnapshot.tool,
|
|
1101
|
+
currentPath: toolSnapshot.path,
|
|
1102
|
+
currentToolDurationMs: toolSnapshot.startedAt ? Math.max(0, now - toolSnapshot.startedAt) : undefined,
|
|
1103
|
+
recentFailureSummary: summarizeRecentMutatingFailures(mutatingFailures),
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
else if (toolSnapshot?.mutates) {
|
|
1108
|
+
resetMutatingFailureState(mutatingFailures);
|
|
1110
1109
|
}
|
|
1111
1110
|
}
|
|
1112
|
-
|
|
1113
|
-
resetMutatingFailureState(mutatingFailures);
|
|
1114
|
-
}
|
|
1111
|
+
updateActivityState(now);
|
|
1115
1112
|
fireUpdate();
|
|
1116
1113
|
}
|
|
1117
1114
|
};
|
|
@@ -1244,10 +1241,11 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1244
1241
|
if (!closeError && promptErrorMessage !== undefined) {
|
|
1245
1242
|
closeError = promptErrorMessage;
|
|
1246
1243
|
}
|
|
1247
|
-
// A foreground child never loads the parent's ambient extensions
|
|
1248
|
-
// provider
|
|
1249
|
-
//
|
|
1250
|
-
//
|
|
1244
|
+
// A foreground child never loads the parent's ambient extensions. A model
|
|
1245
|
+
// whose provider the parent registry does not serve resolves as "not found"
|
|
1246
|
+
// before the child starts; a provider it does serve is inherited without its
|
|
1247
|
+
// extension's session hooks and can fail the first request. Keep the
|
|
1248
|
+
// original error first and add the host rule and remedies after it.
|
|
1251
1249
|
if (promptErrorMessage !== undefined
|
|
1252
1250
|
&& closeError === promptErrorMessage
|
|
1253
1251
|
&& isChildModelResolutionFailure(promptErrorMessage)
|
|
@@ -1256,11 +1254,20 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1256
1254
|
&& !launch.session.ambientExtensions) {
|
|
1257
1255
|
closeError = `${promptErrorMessage}\n\n${formatChildModelResolutionDiagnostic({ agent: agent.name, model: launch.session.model, host: "parent", capabilityCeiling: launch.toolPlan.capabilityCeiling })}`;
|
|
1258
1256
|
}
|
|
1257
|
+
else if (session?.inheritedProvider
|
|
1258
|
+
&& closeError !== undefined
|
|
1259
|
+
&& (closeError === promptErrorMessage || closeError === assistantError)
|
|
1260
|
+
&& progress.toolCount === 0
|
|
1261
|
+
&& (result.messages ?? []).every((message) => message.role !== "assistant" || message.stopReason === "error")) {
|
|
1262
|
+
closeError = `${closeError}\n\n${formatInheritedProviderDiagnostic({ agent: agent.name, model: launch.session.model, provider: session.inheritedProvider, capabilityCeiling: launch.toolPlan.capabilityCeiling })}`;
|
|
1263
|
+
}
|
|
1259
1264
|
const forcedDrainAfterFinalSuccess = (forced || forcedTermination) && (cleanTerminalAssistantStopReceived || agentSettledReceived) && !closeError;
|
|
1260
1265
|
const forcedDrainAfterEmptyTerminal = forcedDrainAfterFinalSuccess && hasEmptyTerminalAssistantResponse(result.messages ?? []);
|
|
1261
|
-
if (!closeError && (abortedBySignal || session?.shutDown) && !result.interrupted && !result.timedOut) {
|
|
1262
|
-
closeError = session?.shutDown ? "Subagent stopped because the parent session shut down." : STOPPED_BEFORE_COMPLETION_ERROR;
|
|
1266
|
+
if (!closeError && (abortedBySignal || session?.shutDown || hostStopReason) && !result.interrupted && !result.timedOut) {
|
|
1267
|
+
closeError = hostStopReason ?? (session?.shutDown ? "Subagent stopped because the parent session shut down." : STOPPED_BEFORE_COMPLETION_ERROR);
|
|
1263
1268
|
}
|
|
1269
|
+
if (hostStopReason && !result.interrupted && !result.timedOut)
|
|
1270
|
+
result.stopped = true;
|
|
1264
1271
|
// A workflow child ended by the workflow's abort signal was stopped, not failed.
|
|
1265
1272
|
if (options.abortedAsStopped && abortedBySignal && !session?.shutDown && !result.interrupted && !result.timedOut)
|
|
1266
1273
|
result.stopped = true;
|
|
@@ -1364,9 +1371,20 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1364
1371
|
if (abortedBySignal || interruptedByControl || result.timedOut) {
|
|
1365
1372
|
abortChild();
|
|
1366
1373
|
}
|
|
1367
|
-
options.onChildSession?.({
|
|
1374
|
+
options.onChildSession?.({
|
|
1375
|
+
steer: (text) => created.steer(text),
|
|
1376
|
+
followUp: (text) => created.followUp(text),
|
|
1377
|
+
stop: (reason) => {
|
|
1378
|
+
if (sessionSettled || lifecycleFinished)
|
|
1379
|
+
return;
|
|
1380
|
+
hostStopReason = reason;
|
|
1381
|
+
abortChild();
|
|
1382
|
+
},
|
|
1383
|
+
});
|
|
1368
1384
|
messageBaseline = created.messages.length;
|
|
1369
|
-
|
|
1385
|
+
// A runtime replacement can stop a child that detached while it was still being created.
|
|
1386
|
+
if (!hostStopReason)
|
|
1387
|
+
await created.prompt(`Task: ${task}`);
|
|
1370
1388
|
settle(undefined);
|
|
1371
1389
|
}
|
|
1372
1390
|
catch (error) {
|
|
@@ -1517,9 +1535,11 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
1517
1535
|
fullOutput = stripAcceptanceReport(resolvedOutput.fullOutput);
|
|
1518
1536
|
result.savedOutputPath = resolvedOutput.savedPath;
|
|
1519
1537
|
result.outputSaveError = resolvedOutput.saveError;
|
|
1520
|
-
if (resolvedOutput.
|
|
1538
|
+
if (isSettlementFatalOutputError(resolvedOutput, options.outputMode)) {
|
|
1521
1539
|
result.exitCode = 1;
|
|
1522
1540
|
result.error = result.error ? `${result.error}\n${resolvedOutput.saveError}` : resolvedOutput.saveError;
|
|
1541
|
+
progress.status = "failed";
|
|
1542
|
+
progress.error = result.error;
|
|
1523
1543
|
}
|
|
1524
1544
|
if (resolvedOutput.savedPath) {
|
|
1525
1545
|
result.outputReference = formatSavedOutputReference(resolvedOutput.savedPath, fullOutput);
|
|
@@ -1697,7 +1717,7 @@ async function runSyncCompletionInner(runtimeCwd, agents, agentName, task, optio
|
|
|
1697
1717
|
error: "Skills not found: pi-subagents",
|
|
1698
1718
|
}, options.context));
|
|
1699
1719
|
}
|
|
1700
|
-
const systemPrompt = buildEffectiveSystemPrompt({ agent, resolvedSkills, cwd: skillCwd
|
|
1720
|
+
const systemPrompt = buildEffectiveSystemPrompt({ agent, resolvedSkills, cwd: skillCwd });
|
|
1701
1721
|
const { model: selectedModel, requestedModel } = resolveModelSelection(options.modelOverride ?? agent.model, options.availableModels, agent.modelProvider ?? options.preferredModelProvider, {
|
|
1702
1722
|
scope: options.modelScope,
|
|
1703
1723
|
primaryModelFromParent: options.modelOverrideFromParent,
|
|
@@ -1760,6 +1780,7 @@ async function runSyncCompletionInner(runtimeCwd, agents, agentName, task, optio
|
|
|
1760
1780
|
metadataPath: artifactPathsResult?.metadataPath,
|
|
1761
1781
|
enabled: options.artifactConfig?.enabled !== false && options.artifactConfig?.includeMetadata !== false,
|
|
1762
1782
|
runId: options.runId,
|
|
1783
|
+
parentSessionId: options.parentSessionId,
|
|
1763
1784
|
agent: agentName,
|
|
1764
1785
|
task,
|
|
1765
1786
|
result: target,
|
|
@@ -2124,6 +2145,7 @@ export async function runSync(runtimeCwd, agents, agentName, task, options) {
|
|
|
2124
2145
|
metadataPath: failedResult.artifactPaths?.metadataPath,
|
|
2125
2146
|
enabled: options.artifactConfig?.enabled !== false && options.artifactConfig?.includeMetadata !== false,
|
|
2126
2147
|
runId: options.runId,
|
|
2148
|
+
parentSessionId: options.parentSessionId,
|
|
2127
2149
|
agent: failedResult.agent,
|
|
2128
2150
|
task: failedResult.task,
|
|
2129
2151
|
result: failedResult,
|