pi-subagents 0.88.1 → 0.89.1
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 +51 -1
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-4QFZZV3O.js → chunk-4AL6LDBY.js} +3 -1
- package/bundle/{chunk-5EMPFFO4.js → chunk-4FFKVLBG.js} +4 -4
- package/bundle/{chunk-L4YY2TOE.js → chunk-5TXWZB73.js} +1 -1
- package/bundle/{chunk-ZJ2BT5TI.js → chunk-6D54VW3E.js} +56 -34
- package/bundle/{chunk-YDZ7BZD5.js → chunk-77VQEATI.js} +1 -1
- package/bundle/{chunk-7OX6O7DQ.js → chunk-BERAWSQQ.js} +5 -5
- package/bundle/{chunk-LV3CPYXJ.js → chunk-C22YEYFZ.js} +4 -4
- package/bundle/{chunk-VTUUOLM4.js → chunk-CASL47ST.js} +34 -5
- package/bundle/{chunk-YQSTGPEU.js → chunk-F6PTAPQ3.js} +75 -32
- package/bundle/{chunk-FLNDHNPE.js → chunk-IGZTXGPG.js} +98 -29
- package/bundle/{chunk-CPSUJHZE.js → chunk-KCDPTXHT.js} +39 -10
- package/bundle/{chunk-PCZEQQAQ.js → chunk-LUNVS6KP.js} +26 -15
- package/bundle/{chunk-4MVDMA5C.js → chunk-LWH7IGI3.js} +21 -7
- package/bundle/{chunk-DSHQWGHO.js → chunk-MIX3MCIF.js} +96 -96
- package/bundle/{chunk-2DIEL4WG.js → chunk-OUM6SEVD.js} +2 -2
- package/bundle/{chunk-XIA5GSEU.js → chunk-Q4VH72JI.js} +2 -2
- package/bundle/{chunk-D32H53HM.js → chunk-R3NH5XAL.js} +1 -1
- package/bundle/{chunk-6OWNDN7R.js → chunk-ROJH7KPK.js} +2 -2
- package/bundle/{chunk-4ZQBZDF3.js → chunk-SG3NCWZW.js} +86 -20
- package/bundle/{chunk-KXW62VBU.js → chunk-SWGB2P5J.js} +1 -1
- package/bundle/{chunk-N6TAAIB3.js → chunk-TDXVQPZW.js} +5 -5
- package/bundle/{chunk-6CG2VAG4.js → chunk-TRN65L4F.js} +1 -1
- package/bundle/{chunk-GDR2ILWY.js → chunk-TXC7WIPL.js} +51 -22
- package/bundle/{chunk-PYKBTBY6.js → chunk-URKQZHVH.js} +9 -9
- package/bundle/{chunk-W6HIYD2Z.js → chunk-UUW7P6KJ.js} +1 -1
- package/bundle/{chunk-CYKNHFXB.js → chunk-VEEUXJDO.js} +1 -1
- package/bundle/{chunk-47ZN7NKR.js → chunk-YJIU5WF4.js} +1 -1
- package/bundle/{chunk-RMZAAXIR.js → chunk-YLU5JFW2.js} +2 -2
- package/bundle/control-channel.js +2 -2
- package/bundle/index.js +2 -2
- package/bundle/intercom-bridge.js +2 -2
- package/bundle/preflight.js +8 -8
- package/bundle/project-panes.js +3 -3
- package/docs/agents.md +10 -4
- package/docs/configuration.md +2 -0
- package/docs/extension-api.md +1 -1
- package/docs/tool-reference.md +1 -1
- package/docs/workflows.md +5 -3
- package/package.json +1 -1
- package/src/extension/herdr-pi-bridge.js +79 -23
- package/src/extension/schemas.js +1 -1
- package/src/extension/subagent-options.js +5 -0
- package/src/intercom/result-intercom.js +3 -2
- package/src/runs/background/async-job-tracker.js +85 -9
- package/src/runs/background/async-status.d.ts +2 -0
- package/src/runs/background/async-status.js +8 -3
- package/src/runs/background/notify.d.ts +3 -0
- package/src/runs/background/notify.js +7 -2
- package/src/runs/background/run-status.js +3 -2
- package/src/runs/background/runner-child-launch.js +1 -0
- package/src/runs/background/subagent-runner.js +11 -8
- package/src/runs/foreground/execution.js +8 -7
- package/src/runs/foreground/subagent-executor.js +31 -5
- package/src/runs/shared/child-launch.d.ts +2 -0
- package/src/runs/shared/child-launch.js +1 -1
- package/src/runs/shared/child-session.d.ts +2 -1
- package/src/runs/shared/herdr-connection.d.ts +6 -0
- package/src/runs/shared/herdr-connection.js +11 -1
- package/src/runs/shared/herdr-machine.d.ts +2 -2
- package/src/runs/shared/herdr-machine.js +49 -22
- package/src/runs/shared/herdr-pane-host.d.ts +7 -19
- package/src/runs/shared/herdr-pane-host.js +48 -33
- package/src/runs/shared/herdr-pi-protocol.d.ts +1 -0
- package/src/runs/shared/herdr-pi-protocol.js +3 -2
- package/src/runs/shared/herdr-placed-run.d.ts +2 -12
- package/src/runs/shared/herdr-placed-run.js +10 -8
- package/src/runs/shared/kept-branch-text.d.ts +8 -0
- package/src/runs/shared/kept-branch-text.js +24 -0
- package/src/runs/shared/local-machine-access.d.ts +4 -1
- package/src/runs/shared/local-machine-access.js +6 -3
- package/src/runs/shared/mutation-evidence.d.ts +7 -1
- package/src/runs/shared/mutation-evidence.js +18 -2
- package/src/runs/shared/parallel-handoff.js +19 -7
- package/src/runs/shared/placed-run-owner.d.ts +4 -2
- package/src/runs/shared/placed-run-owner.js +15 -7
- package/src/runs/shared/rex-machine.d.ts +7 -3
- package/src/runs/shared/rex-machine.js +12 -9
- package/src/runs/shared/rex-pane-host.js +7 -27
- package/src/runs/shared/single-output.js +2 -2
- package/src/runs/shared/subagent-prompt-runtime.js +34 -0
- package/src/runs/shared/tool-availability.d.ts +4 -0
- package/src/runs/shared/tool-availability.js +7 -0
- package/src/runs/shared/worktree-cleanup-plan.js +2 -2
- package/src/runs/shared/worktree.d.ts +4 -14
- package/src/runs/shared/worktree.js +38 -8
- package/src/shared/types.d.ts +26 -2
- package/src/shared/utils.d.ts +2 -0
- package/src/shared/utils.js +9 -0
- package/src/workflows/workflow-child-summary.d.ts +2 -1
- package/src/workflows/workflow-child-summary.js +14 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.89.1] - 2026-11-18
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- Subagents limited to a list of `tools` work again alongside extensions that keep a tool switched off on purpose, such as pi-web-access.
|
|
10
|
+
- A background subagent keeps showing as running when its status file can't be read, instead of being marked failed and dropped.
|
|
11
|
+
- Stopping a subagent in a Herdr or Rex pane now actually stops it.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- A subagent limited to a list of `tools` no longer stops before its first request when an extension keeps one of those tools inactive on purpose, as pi-web-access does with `web_enable`. 0.89.0 treated that tool as replaced by another extension and failed the child with a misleading error. The check now fails the child only when a tool it can call is missing from the request, so a child whose tools pi-fabric's code mode swapped out still stops early. Thanks to [@chpock](https://github.com/chpock) for the report (#3296).
|
|
16
|
+
- A background subagent whose status file can't be read, for example after its permissions changed, now still counts as running. Before, a session that reopened while the subagent was working showed no active subagents and told hosts such as pi-web it was idle, and a session already open marked the subagent failed and dropped it about 10 seconds later. The run is kept until its status can be read again, then tracked normally, or dropped if it belongs to another session. Thanks to [@jordan-quan](https://github.com/jordan-quan) for the report (#3295).
|
|
17
|
+
- Stopping a subagent that runs in a Herdr or Rex pane now stops its current turn. Before, the stop request failed in the subagent's Pi with `api.abort is not a function`. Thanks to [@guneriu](https://github.com/guneriu) for the report (#3300).
|
|
18
|
+
- `machine: "local"` from a Pi running in a Herdr Core terminal (`hc`, the Herdr app's terminal server) now fails with an error that says Herdr Core is not supported. Before, the error said Pi was not running in Herdr, which was confusing inside the Herdr app. Only the herdr terminal multiplexer and Rex are supported. Thanks to [@guneriu](https://github.com/guneriu) for the report (#3300).
|
|
19
|
+
|
|
20
|
+
## [0.89.0] - 2026-11-16
|
|
21
|
+
|
|
22
|
+
### Highlights
|
|
23
|
+
|
|
24
|
+
- From a Pi running inside Herdr, `machine: "local"` opens the subagent in a new tab of your own Herdr session, with no saved machine or SSH.
|
|
25
|
+
- Subagents in Herdr or Rex panes are much more dependable: they get time to load a heavy set of extensions, report their tool calls, keep large messages, and no longer end as failed after doing their job.
|
|
26
|
+
- Editors and other hosts can now show a subagent's transcript while it runs, for foreground subagents and for every child of a workflow.
|
|
27
|
+
- A subagent limited to a list of `tools` now stops right away with a clear error when another extension, such as pi-fabric's code mode, swaps out its tools, instead of wasting turns on tools it can't call.
|
|
28
|
+
- Models such as GLM-5.3 that fill unused options with `"null"` can call `subagent`, and `machine: "local"` works on NixOS.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Workflow progress now names each child's session file. The `workflowChildren` rows of a workflow's progress updates, status and results carry `sessionFile` from the child's launch, and a finished child keeps it while its siblings still run, so an editor or other host can show any child's transcript during the workflow. Before, a host following a workflow could see a child's state but had no way to read what it was doing until the workflow returned. Thanks to [@zeishr](https://github.com/zeishr) for #3290.
|
|
33
|
+
- Foreground progress updates now name the child's session file. Each `details.progress[]` row of a `subagent` tool update carries `sessionFile` from the first update, when the child has one, so an editor or other host can show the child's transcript as it runs. Before, the path appeared only in the final result, once the child had finished. Thanks to [@zeishr](https://github.com/zeishr) for #3289.
|
|
34
|
+
- From a Pi running inside a Herdr pane, `machine: "local"` now opens the subagent in a new tab of your own Herdr session, with no saved machine or SSH. Before, `local` worked only inside Rex, and placing a child in Herdr on the same machine meant a saved machine and SSH to yourself. When Herdr runs inside a Rex tab, the Herdr session wins, and outside both terminals `local` fails before anything starts. Thanks to [@mystery4f](https://github.com/mystery4f) for #3266.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- A child that times out or is stopped in a folder outside Git now gets a one-line note in its recovery summary ("changed tracked files: unavailable (not a Git work tree)"). Before, the summary and the child's output file held git's entire `git diff` option reference. Thanks to [@sternnick](https://github.com/sternnick) for #3287.
|
|
39
|
+
- A child with a `tools` allowlist now fails before its first model request when an extension loaded in the child replaces the tools sent to the model, and the error names the tools that were left out and the ones added in their place. Before, a background child that inherited pi-fabric's code mode started with no usable tool: the model saw only `fabric_exec`, every call to it failed with "Tool fabric_exec not found", and the child spent turns finding that out. Thanks to [@VasantLong](https://github.com/VasantLong) for #3291.
|
|
40
|
+
- The `worktreeSetupHook` docs now say that a new worktree already has a `node_modules` link to the main checkout when the hook runs, and that a hook which installs dependencies must remove the link first. Before, the link was undocumented, so a hook running `pnpm install` wrote into the main checkout's `node_modules` and could break it. Thanks to [@yxlimo](https://github.com/yxlimo) for #3288.
|
|
41
|
+
- `subagent` calls from models that fill every unset optional parameter with the string `"null"` and `workflow` with `"false"`, such as GLM-5.3, now work. Before, those placeholders counted as real values, so every call failed with errors such as "Named workflow resource execution must omit action". Only exact `"null"` values and `workflow: "false"` are ignored; a task that merely contains the word null is unchanged. Thanks to [@AlexKucera](https://github.com/AlexKucera) for #3285.
|
|
42
|
+
- `machine: "local"` in Herdr or Rex now works on hosts whose basic tools are not in `/usr/bin` or `/bin`, such as NixOS. Before, its setup scripts ran with the fixed `PATH` used for remote machines instead of Pi's own, so `rm`, `mkdir`, `mktemp` and `cat` were not found and the child never started. Remote machines keep the fixed `PATH`. Thanks to [@yxlimo](https://github.com/yxlimo) for #3284.
|
|
43
|
+
- The worktree handoff line in a subagent's result now says, when the child changed files, that its work is in the saved patches and was not applied to your checkout, and after a partial cleanup it points at the task entries that say what was left behind. When the handoff file itself can't be written, the error now points at `git worktree list`. Before, the line gave only counts, so a parent reading "1 changed patches" could take the change as already landed. Thanks to [@yxlimo](https://github.com/yxlimo) for #3283.
|
|
44
|
+
- When `worktree: true` refuses to start because the checkout has uncommitted changes, the error now names that checkout and lists the changed files (up to 10). Before, it said only "requires a clean git working tree" and named neither the checkout nor the files. Thanks to [@samclams](https://github.com/samclams) for #3276.
|
|
45
|
+
- A workflow given an `output` file no longer writes its error into that file when it fails, stops, or pauses. The workflow now removes any earlier file at that path when it starts and writes the file only when it completes; the error stays in the tool result, the completion notice, and `status.json`. Before, the file appeared even when the workflow failed within milliseconds of starting, so a script or parent that waited for the file treated the failure as a delivered report. Thanks to [@samclams](https://github.com/samclams) for #3275.
|
|
46
|
+
- When a subagent in a managed worktree commits its work, cleanup now keeps its branch instead of deleting it. Single, chain and parallel runs name the kept branch and its last commit in their result or completion notice; for a workflow child it is recorded in the worktree handoff file listed in the child's `artifactPaths`. Before, cleanup force-deleted the branch, so the commits' messages and authorship survived only as unreachable objects you had to find with `git fsck`. A branch whose commits are already on another branch, a remote branch, or a tag is still deleted. Thanks to [@samclams](https://github.com/samclams) for #3274.
|
|
47
|
+
- A subagent placed in a Herdr or Rex pane no longer loses a large message or crashes when the parent reconnects. Before, a message too big to send to the parent in one piece, such as a screenshot it read or a very large file it wrote, never reached the parent, and the next time the parent reconnected to that pane the subagent's Pi crashed. Now the parent gets the message shortened: images and very long text are replaced by a note saying what was left out, and very long tool arguments are cut. Two large messages sent back to back also no longer break the connection.
|
|
48
|
+
- A subagent with `outputSchema` placed in a Herdr or Rex pane is now refused before any pane opens, with an error naming `outputSchema` among the options a placed Pi can't use yet. Before, it started, could never call `structured_output`, and failed at the end with an error telling it to call a tool it didn't have.
|
|
49
|
+
- A subagent placed in a Herdr or Rex pane no longer fails to start when another extension in that pane opens its own Pi session at startup. Before, the pane was closed with "did not start the pi-subagents bridge" or the launch timed out, because loading pi-subagents a second time in the same Pi cut the connection to the first copy. Thanks to [@mystery4f](https://github.com/mystery4f) for finding and fixing this in #3263.
|
|
50
|
+
- A subagent placed in a Herdr or Rex pane now gets 30 seconds to start. Before, the parent gave up after 100 checks, about 6 seconds for a local Rex pane, so a Pi with many extensions was closed as "did not start the pi-subagents bridge" while it was still loading. Thanks to [@mystery4f](https://github.com/mystery4f) for finding and fixing this in #3263.
|
|
51
|
+
- When a subagent in a Herdr pane fails after its Pi started, for example on a version mismatch or a missing required tool, the error now says why. Before, it could say only "Could not remove the exact owned remote runtime directory", because the closing Pi had already removed that folder. Thanks to [@mystery4f](https://github.com/mystery4f) for finding and fixing this in #3263.
|
|
52
|
+
- Subagents placed in a Herdr or Rex pane now report their tool calls. Status, the fleet view and results show their tool count and current tool, per-tool timeouts apply to them, and time spent waiting on your answer no longer counts against their `timeoutMs`. Before, the parent saw none of a placed subagent's tool calls, so it showed 0 tools, a stuck tool was never stopped, and a wait on your answer used up the subagent's time. Thanks to [@mystery4f](https://github.com/mystery4f) for the report in #3263.
|
|
53
|
+
- A subagent placed in a Herdr or Rex pane (`machine`) no longer ends as failed when it did its job. It now gets the same instructions for reporting its result as other subagents. Before, it never saw them, so it could not write the acceptance report and every run under the default acceptance was rejected. Thanks to [@mystery4f](https://github.com/mystery4f) for the report in #3263.
|
|
54
|
+
|
|
5
55
|
## [0.88.1] - 2026-11-12
|
|
6
56
|
|
|
7
57
|
### Highlights
|
|
@@ -258,7 +308,7 @@
|
|
|
258
308
|
### Added
|
|
259
309
|
|
|
260
310
|
- Background workflows cut off by Pi exiting, crashing or reloading now resume on their own when you reopen or reload their session within a day, and steps that already finished are not run again. You can also resume one yourself with `subagent({ action: "resume", id })`, or set `autoResume: false` to resume them only by hand. A stopped workflow is resumed only once, and its notice says how it resumed. If you start a new Pi in the same folder instead, it tells you which session to reopen. See [docs/workflows.md](docs/workflows.md).
|
|
261
|
-
- `machine: "local"` runs a native Pi child in a new background tab of your own Rex session, with the same controls as a Herdr-placed Pi child: prompts, steering, follow-ups, abort, `contact_supervisor` and results. The launch fails if the parent Pi is not running inside Rex, and Claude Code, Codex, Cursor and generic `external-cli` agents are rejected. A finished child's tab stays open until you close it; an aborted or stopped child's tab is closed. See [docs/agents.md](docs/agents.md#running-a-pi-child-in-a-
|
|
311
|
+
- `machine: "local"` runs a native Pi child in a new background tab of your own Rex session, with the same controls as a Herdr-placed Pi child: prompts, steering, follow-ups, abort, `contact_supervisor` and results. The launch fails if the parent Pi is not running inside Rex, and Claude Code, Codex, Cursor and generic `external-cli` agents are rejected. A finished child's tab stays open until you close it; an aborted or stopped child's tab is closed. See [docs/agents.md](docs/agents.md#running-a-pi-child-in-a-new-tab-on-this-machine-rex-or-herdr).
|
|
262
312
|
- A native Pi child can also run in a Rex tab on another Mac over SSH. Name the Mac in your user settings with `subagents.machines.<name>.rex.ssh`, then pass `machine: "<name>"`. The child opens in that Mac's `subagents` Rex session, which is created the first time it is needed. These machines do not need Herdr, and project settings cannot name a Rex host. See [docs/agents.md](docs/agents.md#running-a-pi-child-in-a-rex-pane-on-another-mac).
|
|
263
313
|
|
|
264
314
|
### Changed
|
package/bundle/agents.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
RUNTIME_AGENT_REGISTER_EVENT,
|
|
3
3
|
RUNTIME_AGENT_REGISTER_VERSION,
|
|
4
4
|
registerAgentViaEvents
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5TXWZB73.js";
|
|
6
6
|
import {
|
|
7
7
|
registerRuntimeAgent
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-SWGB2P5J.js";
|
|
9
|
+
import "./chunk-LWH7IGI3.js";
|
|
10
10
|
import "./chunk-JEZOSEWG.js";
|
|
11
11
|
import "./chunk-YFCK7H2S.js";
|
|
12
12
|
import "./chunk-QXASAHIA.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolvePiLaunchToolPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R3NH5XAL.js";
|
|
4
4
|
import "./chunk-YARY7JWU.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-LWH7IGI3.js";
|
|
6
6
|
import "./chunk-JEZOSEWG.js";
|
|
7
7
|
import "./chunk-YFCK7H2S.js";
|
|
8
8
|
import "./chunk-QXASAHIA.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/runs/shared/herdr-pi-protocol.ts
|
|
2
2
|
var HERDR_PI_PROTOCOL = 1;
|
|
3
3
|
var HERDR_PI_MAX_FRAME_BYTES = 1024 * 1024;
|
|
4
|
+
var HERDR_PI_MAX_ACCEPTANCE_PROMPT_BYTES = 256 * 1024;
|
|
4
5
|
var HERDR_PI_MODE_ENV = "PI_SUBAGENTS_HERDR_BRIDGE";
|
|
5
6
|
var HERDR_PI_RUN_ENV = "PI_SUBAGENTS_HERDR_RUN_ID";
|
|
6
7
|
var HERDR_PI_RUNTIME_DIR_ENV = "PI_SUBAGENTS_HERDR_RUNTIME_DIR";
|
|
@@ -19,10 +20,10 @@ var HerdrPiFrameDecoder = class {
|
|
|
19
20
|
#buffer = Buffer.alloc(0);
|
|
20
21
|
push(chunk) {
|
|
21
22
|
this.#buffer = Buffer.concat([this.#buffer, chunk]);
|
|
22
|
-
if (this.#buffer.byteLength > HERDR_PI_MAX_FRAME_BYTES) throw new Error(`Herdr Pi frame exceeds ${HERDR_PI_MAX_FRAME_BYTES} bytes.`);
|
|
23
23
|
const frames = [];
|
|
24
24
|
for (; ; ) {
|
|
25
25
|
const newline = this.#buffer.indexOf(10);
|
|
26
|
+
if ((newline < 0 ? this.#buffer.byteLength : newline) >= HERDR_PI_MAX_FRAME_BYTES) throw new Error(`Herdr Pi frame exceeds ${HERDR_PI_MAX_FRAME_BYTES} bytes.`);
|
|
26
27
|
if (newline < 0) break;
|
|
27
28
|
const line = this.#buffer.subarray(0, newline);
|
|
28
29
|
this.#buffer = this.#buffer.subarray(newline + 1);
|
|
@@ -48,6 +49,7 @@ var HerdrPiFrameDecoder = class {
|
|
|
48
49
|
export {
|
|
49
50
|
HERDR_PI_PROTOCOL,
|
|
50
51
|
HERDR_PI_MAX_FRAME_BYTES,
|
|
52
|
+
HERDR_PI_MAX_ACCEPTANCE_PROMPT_BYTES,
|
|
51
53
|
HERDR_PI_MODE_ENV,
|
|
52
54
|
HERDR_PI_RUN_ENV,
|
|
53
55
|
HERDR_PI_RUNTIME_DIR_ENV,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildWorkflowChatProgressRows
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C22YEYFZ.js";
|
|
4
4
|
import {
|
|
5
5
|
aggregateStepStatus,
|
|
6
6
|
contextModeBadge,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
projectAsyncWorkflowRows,
|
|
23
23
|
projectWorkflowChecklist,
|
|
24
24
|
workflowGraphStageNodes
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SG3NCWZW.js";
|
|
26
26
|
import {
|
|
27
27
|
isStaleExtensionContextError,
|
|
28
28
|
isUnboundExtensionRuntimeError,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
formatWorkflowJsonPreview,
|
|
35
35
|
hostStepReportName,
|
|
36
36
|
hostStepVerdictLabel
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KCDPTXHT.js";
|
|
38
38
|
import {
|
|
39
39
|
snapshotExternalRuns
|
|
40
40
|
} from "./chunk-UKG4V45O.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
getSingleResultOutput,
|
|
53
53
|
shortenPath,
|
|
54
54
|
unresolvedChildWatchdogBlockers
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-LWH7IGI3.js";
|
|
56
56
|
import {
|
|
57
57
|
MAX_WIDGET_JOBS,
|
|
58
58
|
WIDGET_ANIMATION_INTERVAL_MS,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
projectRuntimeAcknowledgedExtensions,
|
|
4
4
|
registerSubagentPromptBoundary,
|
|
5
5
|
registerSubagentPromptRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CASL47ST.js";
|
|
7
7
|
import {
|
|
8
8
|
INSPECTOR_ACTIONS,
|
|
9
9
|
canQueueRetainedAsyncFollowUp,
|
|
@@ -25,12 +25,12 @@ import {
|
|
|
25
25
|
updateSteeringTarget,
|
|
26
26
|
waitForSteeringAction,
|
|
27
27
|
workflowAsyncChildSteeringGuidance
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BERAWSQQ.js";
|
|
29
29
|
import {
|
|
30
30
|
PLACED_RESTORE_UNSUPPORTED,
|
|
31
31
|
formatHerdrMachineRunnerUnsupported,
|
|
32
32
|
resolveMachinePlacement
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TXC7WIPL.js";
|
|
34
34
|
import {
|
|
35
35
|
COMPLETION_ACTION,
|
|
36
36
|
DEFAULT_CONTROL_CONFIG,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
workflowScriptDigest,
|
|
120
120
|
workflowStopCause,
|
|
121
121
|
writeWorkflowReceipt
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-LUNVS6KP.js";
|
|
123
123
|
import {
|
|
124
124
|
SUBAGENT_PARENT_SESSION_ENV,
|
|
125
125
|
applyWatchdogLaunchRules,
|
|
@@ -132,7 +132,7 @@ import {
|
|
|
132
132
|
resolveWatchdogConfig,
|
|
133
133
|
sendRuleViolationWarning,
|
|
134
134
|
writeWatchdogModelSettings
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-TDXVQPZW.js";
|
|
136
136
|
import {
|
|
137
137
|
MAX_REMEMBERED_FOREGROUND_RUNS,
|
|
138
138
|
discardRunningForegroundRun,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
resolveSubagentRunId,
|
|
146
146
|
resolveWorkflowChatProgress,
|
|
147
147
|
stopAsyncRun
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-C22YEYFZ.js";
|
|
149
149
|
import {
|
|
150
150
|
RunFanoutLimitError,
|
|
151
151
|
annotateWorkflowPreflightTrace,
|
|
@@ -165,6 +165,7 @@ import {
|
|
|
165
165
|
formatAsyncRunProgressLabel,
|
|
166
166
|
formatNestedRunStatusLines,
|
|
167
167
|
formatParallelHandoffError,
|
|
168
|
+
formatParallelHandoffLines,
|
|
168
169
|
formatParallelHandoffReference,
|
|
169
170
|
formatRunFanoutBudget,
|
|
170
171
|
formatStoredParallelHandoffCleanup,
|
|
@@ -191,6 +192,8 @@ import {
|
|
|
191
192
|
recordParallelHandoffMerge,
|
|
192
193
|
recordParallelHandoffSupersession,
|
|
193
194
|
recoveryDescriptorPath,
|
|
195
|
+
remoteMutationEvidence,
|
|
196
|
+
remoteMutationSnapshot,
|
|
194
197
|
resolveAsyncResumeTarget,
|
|
195
198
|
resolveAsyncRunLocation,
|
|
196
199
|
resolveAsyncStatusChild,
|
|
@@ -206,12 +209,12 @@ import {
|
|
|
206
209
|
writeRunFanoutBudgetDescriptor,
|
|
207
210
|
writeWorkflowLaunchRecord,
|
|
208
211
|
writeWorktreeSetupHandoff
|
|
209
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-SG3NCWZW.js";
|
|
210
213
|
import {
|
|
211
214
|
NATIVE_SUPERVISOR_TOOL_NAME,
|
|
212
215
|
createNativeSupervisorChannel,
|
|
213
216
|
resolveSupervisorChannelDir
|
|
214
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-VEEUXJDO.js";
|
|
215
218
|
import {
|
|
216
219
|
MODEL_ONLY_TOOL,
|
|
217
220
|
inheritedSessionIds,
|
|
@@ -234,10 +237,10 @@ import {
|
|
|
234
237
|
canPreferFork,
|
|
235
238
|
createForkContextResolver,
|
|
236
239
|
resolveSubagentLaunchContext
|
|
237
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-ROJH7KPK.js";
|
|
238
241
|
import {
|
|
239
242
|
handleRefinementAction
|
|
240
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-Q4VH72JI.js";
|
|
241
244
|
import {
|
|
242
245
|
ActiveAsyncCapacityError,
|
|
243
246
|
acquireActiveAsyncCapacity,
|
|
@@ -253,7 +256,7 @@ import {
|
|
|
253
256
|
resolveDisabledFeatureSurface,
|
|
254
257
|
resolveMaxActiveAsyncRunsPerSession,
|
|
255
258
|
transferActiveAsyncCapacity
|
|
256
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-YLU5JFW2.js";
|
|
257
260
|
import {
|
|
258
261
|
DEFAULT_STALE_TERMINAL_ACTIVE_MARKER_MS,
|
|
259
262
|
MACHINE_DIFF_OPTIONS,
|
|
@@ -290,6 +293,7 @@ import {
|
|
|
290
293
|
inheritedNestedParentAddressOf,
|
|
291
294
|
inheritedNestedRouteOf,
|
|
292
295
|
initializeProcessTerminal,
|
|
296
|
+
isWorktreeCleanupTaskDone,
|
|
293
297
|
lookupRunnerLauncher,
|
|
294
298
|
missionAcceptanceStatus,
|
|
295
299
|
nestedResultsPath,
|
|
@@ -339,7 +343,7 @@ import {
|
|
|
339
343
|
writeNestedControlRequest,
|
|
340
344
|
writeNestedControlResult,
|
|
341
345
|
writeNestedEvent
|
|
342
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-KCDPTXHT.js";
|
|
343
347
|
import {
|
|
344
348
|
closeSteerInbox,
|
|
345
349
|
consumeSteerRequests,
|
|
@@ -347,7 +351,7 @@ import {
|
|
|
347
351
|
readRevivalBriefs,
|
|
348
352
|
requestAsyncSteer,
|
|
349
353
|
watchAsyncControlInbox
|
|
350
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-UUW7P6KJ.js";
|
|
351
355
|
import "./chunk-NIXWDZZV.js";
|
|
352
356
|
import {
|
|
353
357
|
INTERCOM_BRIDGE_MARKER,
|
|
@@ -356,7 +360,7 @@ import {
|
|
|
356
360
|
resolveIntercomBridge,
|
|
357
361
|
resolveIntercomSessionTarget,
|
|
358
362
|
resolveSubagentIntercomTarget
|
|
359
|
-
} from "./chunk-
|
|
363
|
+
} from "./chunk-YJIU5WF4.js";
|
|
360
364
|
import {
|
|
361
365
|
agentDefinitionDigest,
|
|
362
366
|
resolveLaunchBinding,
|
|
@@ -371,7 +375,7 @@ import {
|
|
|
371
375
|
resolvePiLaunchToolPlan,
|
|
372
376
|
resolveRuntimeModulePath,
|
|
373
377
|
supervisorChannelDir
|
|
374
|
-
} from "./chunk-
|
|
378
|
+
} from "./chunk-R3NH5XAL.js";
|
|
375
379
|
import {
|
|
376
380
|
assertRequiredChildExtensionsAdmitted,
|
|
377
381
|
createRequiredChildExtensionIdentity,
|
|
@@ -383,7 +387,7 @@ import {
|
|
|
383
387
|
import {
|
|
384
388
|
HERDR_PROJECT_PANE_ACTIONS,
|
|
385
389
|
handleHerdrProjectPaneAction
|
|
386
|
-
} from "./chunk-
|
|
390
|
+
} from "./chunk-OUM6SEVD.js";
|
|
387
391
|
import "./chunk-7J4ZXMY7.js";
|
|
388
392
|
import {
|
|
389
393
|
PROJECT_SUBAGENTS_RELATIVE_DIR,
|
|
@@ -397,12 +401,12 @@ import {
|
|
|
397
401
|
missingForkCopyNote,
|
|
398
402
|
writeArtifact,
|
|
399
403
|
writeMetadata
|
|
400
|
-
} from "./chunk-
|
|
404
|
+
} from "./chunk-77VQEATI.js";
|
|
401
405
|
import "./chunk-XA3DY6UG.js";
|
|
402
406
|
import {
|
|
403
407
|
getExternalJobProvider
|
|
404
408
|
} from "./chunk-YYREO77V.js";
|
|
405
|
-
import "./chunk-
|
|
409
|
+
import "./chunk-SWGB2P5J.js";
|
|
406
410
|
import {
|
|
407
411
|
ChainOutputValidationError,
|
|
408
412
|
DEFAULT_WAIT_TOOL_NAME,
|
|
@@ -449,6 +453,7 @@ import {
|
|
|
449
453
|
discoverAgentsAll,
|
|
450
454
|
discoverAvailableSkills,
|
|
451
455
|
editDistance,
|
|
456
|
+
editsLocalDisk,
|
|
452
457
|
encodeExtensionBindings,
|
|
453
458
|
evaluateAcceptance,
|
|
454
459
|
externalCliReceiptMetadata,
|
|
@@ -486,7 +491,6 @@ import {
|
|
|
486
491
|
isDynamicRunnerGroup,
|
|
487
492
|
isParallelGroup,
|
|
488
493
|
isParallelStep,
|
|
489
|
-
isRexLocalMachine,
|
|
490
494
|
isSettlementFatalOutputError,
|
|
491
495
|
isStorageCapacityError,
|
|
492
496
|
isToolBudgetBlockedMessage,
|
|
@@ -556,7 +560,7 @@ import {
|
|
|
556
560
|
writeAtomicJson,
|
|
557
561
|
writeInitialProgressFile,
|
|
558
562
|
writePrivateAtomicJson
|
|
559
|
-
} from "./chunk-
|
|
563
|
+
} from "./chunk-LWH7IGI3.js";
|
|
560
564
|
import {
|
|
561
565
|
CHAIN_RUNS_DIR,
|
|
562
566
|
DEFAULT_ARTIFACT_CONFIG,
|
|
@@ -1370,7 +1374,7 @@ ${input.systemPrompt}` : void 0;
|
|
|
1370
1374
|
cwd: input.cwd,
|
|
1371
1375
|
...input.machine ? { machine: input.machine } : {},
|
|
1372
1376
|
...input.projectTrusted !== void 0 ? { projectTrusted: input.projectTrusted } : {},
|
|
1373
|
-
...input.machine ? { remoteResources: { agent: input.childAgentName, ...input.remoteSkillNames ? { skills: input.remoteSkillNames } : {}, ...input.remoteReads !== void 0 ? { reads: input.remoteReads } : {}, ...toolPlan.explicitToolAllowlist ? { toolCeiling: [...toolPlan.effectiveToolAllowlist] } : toolPlan.capabilityCeiling?.allowedTools ? { toolCeiling: [...toolPlan.capabilityCeiling.allowedTools] } : {} } } : {},
|
|
1377
|
+
...input.machine ? { remoteResources: { agent: input.childAgentName, ...input.remoteSkillNames ? { skills: input.remoteSkillNames } : {}, ...input.remoteReads !== void 0 ? { reads: input.remoteReads } : {}, ...toolPlan.explicitToolAllowlist ? { toolCeiling: [...toolPlan.effectiveToolAllowlist] } : toolPlan.capabilityCeiling?.allowedTools ? { toolCeiling: [...toolPlan.capabilityCeiling.allowedTools] } : {}, ...input.acceptancePrompt ? { acceptancePrompt: input.acceptancePrompt } : {} } } : {},
|
|
1374
1378
|
storage: childStorage(input),
|
|
1375
1379
|
...input.parentSessionFile ? { parentSessionFile: input.parentSessionFile } : {},
|
|
1376
1380
|
...input.model ? { model: input.model } : {},
|
|
@@ -5393,6 +5397,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
5393
5397
|
machine: options.machine,
|
|
5394
5398
|
remoteSkillNames: options.skills ?? agent.skills,
|
|
5395
5399
|
remoteReads: options.remoteReads,
|
|
5400
|
+
acceptancePrompt: shared.acceptancePrompt,
|
|
5396
5401
|
extensionBindings: options.extensionBindings,
|
|
5397
5402
|
requiredExtensions: options.requiredExtensions,
|
|
5398
5403
|
sessionEnabled: shared.sessionEnabled,
|
|
@@ -5511,6 +5516,7 @@ ${shared.acceptancePrompt}` : shared.systemPrompt,
|
|
|
5511
5516
|
index: options.index ?? 0,
|
|
5512
5517
|
agent: agent.name,
|
|
5513
5518
|
...childSessionName ? { sessionName: childSessionName } : {},
|
|
5519
|
+
...options.sessionFile ? { sessionFile: options.sessionFile } : {},
|
|
5514
5520
|
status: "running",
|
|
5515
5521
|
task,
|
|
5516
5522
|
skills: shared.resolvedSkillNames,
|
|
@@ -5550,8 +5556,8 @@ ${shared.acceptancePrompt}` : shared.systemPrompt,
|
|
|
5550
5556
|
};
|
|
5551
5557
|
return result2;
|
|
5552
5558
|
}
|
|
5553
|
-
const mutationCwd =
|
|
5554
|
-
const mutationSnapshot = options.machine && !
|
|
5559
|
+
const mutationCwd = editsLocalDisk(options.machine) ? options.machine.cwd : options.cwd ?? runtimeCwd;
|
|
5560
|
+
const mutationSnapshot = options.machine && !editsLocalDisk(options.machine) ? remoteMutationSnapshot(mutationCwd) : snapshotTrackedMutations(mutationCwd);
|
|
5555
5561
|
let structuredOutputToolInvoked = false;
|
|
5556
5562
|
let structuredOutputMessageStartIndex;
|
|
5557
5563
|
let toolAvailabilityError;
|
|
@@ -6499,8 +6505,7 @@ ${formatInheritedProviderDiagnostic({ agent: agent.name, model: launch.session.m
|
|
|
6499
6505
|
tokens: progress.tokens,
|
|
6500
6506
|
durationMs: progress.durationMs
|
|
6501
6507
|
};
|
|
6502
|
-
const
|
|
6503
|
-
const mutationEvidence = result2.nativeMachine && !isRexLocalMachine(options.machine) ? { source: "tracked-files", trackedOnly: true, changedFiles: [], attemptedMutation: remoteGitChanged === true, ...remoteGitChanged === void 0 ? { unavailable: "Remote Git before/after evidence was incomplete." } : {} } : await collectTrackedMutationEvidence(mutationSnapshot, mutationCwd);
|
|
6508
|
+
const mutationEvidence = result2.nativeMachine && !editsLocalDisk(options.machine) ? remoteMutationEvidence(result2.nativeMachine) : await collectTrackedMutationEvidence(mutationSnapshot, mutationCwd);
|
|
6504
6509
|
const acceptanceOutput = getFinalOutput(result2.messages ?? []);
|
|
6505
6510
|
const structuredText = result2.structuredOutput === void 0 ? void 0 : JSON.stringify(result2.structuredOutput, null, 2);
|
|
6506
6511
|
let fullOutput = stripAcceptanceReport(acceptanceOutput);
|
|
@@ -6592,7 +6597,7 @@ function writeStructuredOutputArtifacts(runtime, value, acceptanceReport) {
|
|
|
6592
6597
|
}
|
|
6593
6598
|
async function runSyncCompletionInner(runtimeCwd, agents, agentName, task, options) {
|
|
6594
6599
|
const effectiveCwd = options.cwd ?? runtimeCwd;
|
|
6595
|
-
const cwdError = options.machine && !
|
|
6600
|
+
const cwdError = options.machine && !editsLocalDisk(options.machine) ? void 0 : preflightLaunchCwd(options.requestedCwd ?? effectiveCwd, effectiveCwd);
|
|
6596
6601
|
if (cwdError) {
|
|
6597
6602
|
return redactResultPrompt(withRunContext({
|
|
6598
6603
|
index: options.index ?? 0,
|
|
@@ -8926,7 +8931,7 @@ Extensions denied: ${status.capabilityCeiling.denyExtensions ? "yes" : "no"} (so
|
|
|
8926
8931
|
status.turnBudget ? `Turn budget: ${status.turnBudget.turnCount}/${status.turnBudget.maxTurns}+${status.turnBudget.graceTurns} (${status.turnBudget.outcome})` : void 0,
|
|
8927
8932
|
`Dir: ${asyncDir}`,
|
|
8928
8933
|
outputPath ? `Output: ${outputPath}` : void 0,
|
|
8929
|
-
status.parallelHandoff ?
|
|
8934
|
+
...status.parallelHandoff ? formatParallelHandoffLines(status.parallelHandoff.path, status.parallelHandoff.keptBranches) : [],
|
|
8930
8935
|
reconciliation.message ? `Diagnosis: ${reconciliation.message}` : void 0,
|
|
8931
8936
|
reconciliation.resultPath && fs17.existsSync(reconciliation.resultPath) ? `Result: ${reconciliation.resultPath}` : void 0
|
|
8932
8937
|
].filter((line) => Boolean(line));
|
|
@@ -9062,7 +9067,7 @@ Extensions denied: ${status.capabilityCeiling.denyExtensions ? "yes" : "no"} (so
|
|
|
9062
9067
|
const status = data.state === "stopped" || data.stopped === true || childStatuses.includes("stopped") ? "stopped" : data.success ? "complete" : data.state === "paused" || data.exitCode === 0 ? "paused" : "failed";
|
|
9063
9068
|
const runId = data.runId ?? data.id ?? resolvedId;
|
|
9064
9069
|
const lines = [`Run: ${runId}`, data.toolCallId ? `Tool call: ${data.toolCallId}` : void 0, `State: ${status}`, `Result: ${resultPath}`].filter((line) => Boolean(line));
|
|
9065
|
-
if (data.parallelHandoff?.path) lines.push(
|
|
9070
|
+
if (data.parallelHandoff?.path) lines.push(...formatParallelHandoffLines(data.parallelHandoff.path, data.parallelHandoff.keptBranches));
|
|
9066
9071
|
const receipt = data.workflowReceipt;
|
|
9067
9072
|
const receiptPath = receipt && typeof receipt === "object" && !Array.isArray(receipt) ? receipt.path : void 0;
|
|
9068
9073
|
const workflowReceiptPath2 = typeof receiptPath === "string" && receiptPath ? receiptPath : void 0;
|
|
@@ -9650,7 +9655,7 @@ function buildUnknownGitEntry(input) {
|
|
|
9650
9655
|
return blockedEntry(entry, "unknown", "unknown", "no matching extension-owned handoff metadata was found");
|
|
9651
9656
|
}
|
|
9652
9657
|
function buildMissingMetadataEntry(input) {
|
|
9653
|
-
if (input.record.task
|
|
9658
|
+
if (isWorktreeCleanupTaskDone(input.record.task)) return void 0;
|
|
9654
9659
|
const pathValue = metadataRecordPath(input.record);
|
|
9655
9660
|
const entry = buildEntryBase({ path: pathValue, branch: input.record.task.branch, source: "metadata", metadata: input.record, targetHead: input.targetHead });
|
|
9656
9661
|
return blockedEntry(entry, "stale", "unknown", "handoff metadata records a worktree that is not present in Git worktree state");
|
|
@@ -12807,6 +12812,16 @@ function writeWorkflowAggregateOutput(outputPath, text, producedChildOutputPaths
|
|
|
12807
12812
|
${error instanceof Error ? error.message : String(error)}`;
|
|
12808
12813
|
}
|
|
12809
12814
|
}
|
|
12815
|
+
function removeEarlierWorkflowOutput(outputPath) {
|
|
12816
|
+
if (!outputPath) return void 0;
|
|
12817
|
+
try {
|
|
12818
|
+
fs20.rmSync(outputPath, { force: true });
|
|
12819
|
+
return void 0;
|
|
12820
|
+
} catch (error) {
|
|
12821
|
+
return `Output file error: ${outputPath}
|
|
12822
|
+
${error instanceof Error ? error.message : String(error)}`;
|
|
12823
|
+
}
|
|
12824
|
+
}
|
|
12810
12825
|
function appendWorkflowOutputWarning(text, warning) {
|
|
12811
12826
|
return warning ? `${text}
|
|
12812
12827
|
|
|
@@ -14908,6 +14923,7 @@ Parent action: ${STATUS_ACTION}`,
|
|
|
14908
14923
|
step.async = runId2 !== void 0 && path18.basename(runId2) === runId2 && fs20.existsSync(path18.join(path18.dirname(asyncDir), runId2));
|
|
14909
14924
|
persist({ tolerateStatusWriteFailure: true });
|
|
14910
14925
|
};
|
|
14926
|
+
const earlierOutputWarning2 = workflowReuseSource ? void 0 : removeEarlierWorkflowOutput(workflowAggregateOutputPath2);
|
|
14911
14927
|
try {
|
|
14912
14928
|
const workflow = await runWorkflowScript({
|
|
14913
14929
|
script: workflowScript,
|
|
@@ -15216,7 +15232,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
15216
15232
|
}
|
|
15217
15233
|
const errorPreview = status.error && status.error.length > 1e3 ? `${status.error.slice(0, 1e3)}\u2026 (truncated; full error: ${statusPath} (error))` : status.error;
|
|
15218
15234
|
const terminalSummary = `${status.state === "complete" ? "Workflow completed after detached child finished." : errorPreview ?? (pauseForDetached ? "Workflow paused." : "Workflow failed.")}${stopCause ? ` ${WORKFLOW_RUNTIME_REPLACED_STOP_NOTICE}` : ""}${workflowOutputPathMappingSummary2(partial.children)}${finalPreflightWarnings.length ? ` ${finalPreflightWarnings.join(" ")}` : ""}`;
|
|
15219
|
-
const outputWarning = writeWorkflowAggregateOutput(workflowAggregateOutputPath2, terminalSummary, producedChildOutputPaths2);
|
|
15235
|
+
const outputWarning = status.state === "complete" ? writeWorkflowAggregateOutput(workflowAggregateOutputPath2, terminalSummary, producedChildOutputPaths2) : earlierOutputWarning2;
|
|
15220
15236
|
const resultSummary = appendWorkflowOutputWarning(terminalSummary, outputWarning);
|
|
15221
15237
|
const receiptState = status.state === "complete" ? "complete" : status.state === "paused" ? "paused" : status.state === "stopped" ? "stopped" : "failed";
|
|
15222
15238
|
const terminalOutcome = workflowFailureTerminalOutcome(error, partial.children, usageBudgetState(workflowUsageBudget.budget, sumResultsCost(workflowResults2)));
|
|
@@ -15292,6 +15308,7 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
15292
15308
|
const liveWorkflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "running", inventoryComplete: false, trace: liveWorkflow.trace, progress: childProgress, launches: childLaunches });
|
|
15293
15309
|
onUpdate?.(workflowProgressUpdate(foregroundWorkflowRunId, chatProgress, liveWorkflow, liveWorkflowChildren, workflowPreflight));
|
|
15294
15310
|
};
|
|
15311
|
+
const earlierOutputWarning = removeEarlierWorkflowOutput(workflowAggregateOutputPath);
|
|
15295
15312
|
try {
|
|
15296
15313
|
const workflow = await runWorkflowScript({
|
|
15297
15314
|
script: requestParams.workflowScript,
|
|
@@ -15373,7 +15390,11 @@ Parent action: ${COMPLETION_ACTION}` : content,
|
|
|
15373
15390
|
(deps2.state.blockingWorkflowChildren ??= /* @__PURE__ */ new Set()).add(launch.runId);
|
|
15374
15391
|
blockingWorkflowChildren.add(launch.runId);
|
|
15375
15392
|
}
|
|
15376
|
-
childLaunches.set(key, {
|
|
15393
|
+
childLaunches.set(key, {
|
|
15394
|
+
agent: launch.agent,
|
|
15395
|
+
...launch.runId ? { runId: launch.runId } : {},
|
|
15396
|
+
...launch.sessionFile ? { sessionFile: launch.sessionFile } : {}
|
|
15397
|
+
});
|
|
15377
15398
|
try {
|
|
15378
15399
|
sendWorkflowProgress();
|
|
15379
15400
|
} catch (error) {
|
|
@@ -15466,7 +15487,7 @@ ${workflow.console.map((entry) => `[${entry.level}] ${entry.text}`).join("\n")}`
|
|
|
15466
15487
|
const finalPreflightTrace = annotateWorkflowPreflightTrace(partial.trace, workflowPreflight);
|
|
15467
15488
|
const trace = finalPreflightTrace.map((entry) => ({ line: `- ${entry.operation} ${entry.key}: ${entry.state}${entry.runId ? ` (${entry.runId})` : ""}${entry.warning ? ` \u2014 ${entry.warning}` : ""}`, error: entry.error }));
|
|
15468
15489
|
const outputMappings = workflowOutputPathMappingSummary2(partial.children).trim();
|
|
15469
|
-
const displayText = formatWorkflowResultText({
|
|
15490
|
+
const displayText = appendWorkflowOutputWarning(formatWorkflowResultText({
|
|
15470
15491
|
head: workflowPreflight ? [formatWorkflowPreflight(workflowPreflight)] : [],
|
|
15471
15492
|
script: [
|
|
15472
15493
|
`Workflow failed: ${text}`,
|
|
@@ -15481,10 +15502,11 @@ ${partial.console.map((entry) => `[${entry.level}] ${entry.text}`).join("\n")}`]
|
|
|
15481
15502
|
...outputMappings ? [outputMappings] : []
|
|
15482
15503
|
],
|
|
15483
15504
|
maxOutput: requestParams.maxOutput,
|
|
15484
|
-
|
|
15505
|
+
// A failed workflow's text never goes to the declared output file; truncated text goes to the full-result file.
|
|
15506
|
+
aggregateOutputPath: void 0,
|
|
15485
15507
|
fullResultPath: workflowFullResultPath,
|
|
15486
15508
|
producedChildOutputPaths
|
|
15487
|
-
});
|
|
15509
|
+
}), earlierOutputWarning);
|
|
15488
15510
|
const workflowChildren = workflowChildSummary({ parentToolCallId: _id, workflowRunId: foregroundWorkflowRunId, workflowState: "failed", inventoryComplete: true, trace: partial.trace, children: partial.children });
|
|
15489
15511
|
const terminalOutcome = workflowFailureTerminalOutcome(error, partial.children, usageBudgetState(workflowUsageBudget.budget, sumResultsCost(workflowResults)));
|
|
15490
15512
|
const receipt = terminalWorkflowReceipt(foregroundWorkflowRunId, "failed", partial.children, workflowChildren, terminalOutcome, [...workflowHostSteps.values()], workflowResource?.provenance, workflowArgsDigest);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isTrustedRecordedSessionFile,
|
|
3
3
|
resolveSubagentRunId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-C22YEYFZ.js";
|
|
5
5
|
import {
|
|
6
6
|
agentStreamOptions,
|
|
7
7
|
opencodeSessionHeaders,
|
|
8
8
|
resolveAsyncResumeTarget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SG3NCWZW.js";
|
|
10
10
|
import {
|
|
11
11
|
ownsRun
|
|
12
12
|
} from "./chunk-HXRB42AF.js";
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
reconcileAsyncRun,
|
|
19
19
|
resolveAuthorityDecision,
|
|
20
20
|
resolveMissionStoreLocation
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-KCDPTXHT.js";
|
|
22
22
|
import {
|
|
23
23
|
deliverInterruptRequest,
|
|
24
24
|
queueRevivalBrief,
|
|
25
25
|
requestAsyncSteer
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-UUW7P6KJ.js";
|
|
27
27
|
import {
|
|
28
28
|
formatShellCommand
|
|
29
29
|
} from "./chunk-7J4ZXMY7.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
tryLease,
|
|
35
35
|
writeAtomicJson,
|
|
36
36
|
writePrivateAtomicJson
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LWH7IGI3.js";
|
|
38
38
|
import {
|
|
39
39
|
DIRS
|
|
40
40
|
} from "./chunk-JEZOSEWG.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
summarizeContextModes,
|
|
13
13
|
utf8Tail,
|
|
14
14
|
workflowPreflightLaneForRuntimeKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SG3NCWZW.js";
|
|
16
16
|
import {
|
|
17
17
|
ownsRun
|
|
18
18
|
} from "./chunk-HXRB42AF.js";
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
updateActiveRunIndex,
|
|
35
35
|
validateModelResponseAliases,
|
|
36
36
|
writeAsyncResultFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KCDPTXHT.js";
|
|
38
38
|
import {
|
|
39
39
|
deliverStopRequest,
|
|
40
40
|
stopInboxClosedPath
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UUW7P6KJ.js";
|
|
42
42
|
import {
|
|
43
43
|
SUBAGENT_STOPPED_MESSAGE,
|
|
44
44
|
formatDuration,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
waitToolName,
|
|
51
51
|
writeAtomicJson,
|
|
52
52
|
writePrivateAtomicJson
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-LWH7IGI3.js";
|
|
54
54
|
import {
|
|
55
55
|
DIRS
|
|
56
56
|
} from "./chunk-JEZOSEWG.js";
|