@vicary/pi-subagents 0.88.1 → 0.89.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 +36 -1
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-7OX6O7DQ.js → chunk-443LPCRI.js} +5 -5
- package/bundle/{chunk-4QFZZV3O.js → chunk-4AL6LDBY.js} +3 -1
- package/bundle/{chunk-6CG2VAG4.js → chunk-4ALRHKGE.js} +1 -1
- package/bundle/{chunk-4ZQBZDF3.js → chunk-6JD4XCA4.js} +76 -18
- package/bundle/{chunk-CGWNA6EJ.js → chunk-7JLNWAMO.js} +21 -21
- package/bundle/{chunk-LV3CPYXJ.js → chunk-7W2IQFP4.js} +4 -4
- package/bundle/{chunk-W6HIYD2Z.js → chunk-A3INCQ6Z.js} +1 -1
- package/bundle/{chunk-IYT7X46U.js → chunk-CFIYO2IV.js} +5 -5
- package/bundle/{chunk-CYKNHFXB.js → chunk-EPMRDKQT.js} +1 -1
- package/bundle/{chunk-RMZAAXIR.js → chunk-ETDE2VYK.js} +2 -2
- package/bundle/{chunk-4MVDMA5C.js → chunk-GHJ6BH5U.js} +13 -7
- package/bundle/{chunk-PYKBTBY6.js → chunk-HSHLPYCQ.js} +9 -9
- package/bundle/{chunk-D32H53HM.js → chunk-HZDLR73C.js} +1 -1
- package/bundle/{chunk-2DIEL4WG.js → chunk-JFACGAJT.js} +2 -2
- package/bundle/{chunk-L4YY2TOE.js → chunk-JRO2CU4D.js} +1 -1
- package/bundle/{chunk-KXW62VBU.js → chunk-KOLLMZ2X.js} +1 -1
- package/bundle/{chunk-AZPP3G4N.js → chunk-LEPIY76E.js} +34 -5
- package/bundle/{chunk-BKISQ5CJ.js → chunk-MJHQIUU7.js} +56 -34
- package/bundle/{chunk-47ZN7NKR.js → chunk-NONHDYXE.js} +1 -1
- package/bundle/{chunk-DSHQWGHO.js → chunk-NQ26PJSQ.js} +96 -96
- package/bundle/{chunk-2HKPEANZ.js → chunk-OVBUEVOT.js} +26 -15
- package/bundle/{chunk-JQTHG2ID.js → chunk-PFZZMVD5.js} +74 -31
- package/bundle/{chunk-YDZ7BZD5.js → chunk-S77ZKDLS.js} +1 -1
- package/bundle/{chunk-CPSUJHZE.js → chunk-SLLZJ5EC.js} +39 -10
- package/bundle/{chunk-V7SZMS6W.js → chunk-SWL2EITY.js} +2 -2
- package/bundle/{chunk-XIA5GSEU.js → chunk-UQT2EQ4U.js} +2 -2
- package/bundle/{chunk-5EMPFFO4.js → chunk-WW6GQBBS.js} +4 -4
- package/bundle/{chunk-GDR2ILWY.js → chunk-ZSCIHMUI.js} +50 -22
- 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 +2 -2
- package/src/extension/herdr-pi-bridge.js +78 -22
- 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/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 +47 -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 +33 -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/workflows/workflow-child-summary.d.ts +2 -1
- package/src/workflows/workflow-child-summary.js +14 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.89.0] - 2026-11-16
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- 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.
|
|
10
|
+
- 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.
|
|
11
|
+
- Editors and other hosts can now show a subagent's transcript while it runs, for foreground subagents and for every child of a workflow.
|
|
12
|
+
- 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.
|
|
13
|
+
- Models such as GLM-5.3 that fill unused options with `"null"` can call `subagent`, and `machine: "local"` works on NixOS.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- 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.
|
|
18
|
+
- 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.
|
|
19
|
+
- 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.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- 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.
|
|
24
|
+
- 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.
|
|
25
|
+
- 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.
|
|
26
|
+
- `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.
|
|
27
|
+
- `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.
|
|
28
|
+
- 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.
|
|
29
|
+
- 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.
|
|
30
|
+
- 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.
|
|
31
|
+
- 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.
|
|
32
|
+
- 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.
|
|
33
|
+
- 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.
|
|
34
|
+
- 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.
|
|
35
|
+
- 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.
|
|
36
|
+
- 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.
|
|
37
|
+
- 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.
|
|
38
|
+
- 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.
|
|
39
|
+
|
|
5
40
|
## [0.88.1] - 2026-11-12
|
|
6
41
|
|
|
7
42
|
### Highlights
|
|
@@ -258,7 +293,7 @@
|
|
|
258
293
|
### Added
|
|
259
294
|
|
|
260
295
|
- 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-
|
|
296
|
+
- `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
297
|
- 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
298
|
|
|
264
299
|
### 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-JRO2CU4D.js";
|
|
6
6
|
import {
|
|
7
7
|
registerRuntimeAgent
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-KOLLMZ2X.js";
|
|
9
|
+
import "./chunk-GHJ6BH5U.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-HZDLR73C.js";
|
|
4
4
|
import "./chunk-YARY7JWU.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-GHJ6BH5U.js";
|
|
6
6
|
import "./chunk-JEZOSEWG.js";
|
|
7
7
|
import "./chunk-YFCK7H2S.js";
|
|
8
8
|
import "./chunk-QXASAHIA.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isTrustedRecordedSessionFile,
|
|
3
3
|
resolveSubagentRunId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7W2IQFP4.js";
|
|
5
5
|
import {
|
|
6
6
|
agentStreamOptions,
|
|
7
7
|
opencodeSessionHeaders,
|
|
8
8
|
resolveAsyncResumeTarget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6JD4XCA4.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-SLLZJ5EC.js";
|
|
22
22
|
import {
|
|
23
23
|
deliverInterruptRequest,
|
|
24
24
|
queueRevivalBrief,
|
|
25
25
|
requestAsyncSteer
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-A3INCQ6Z.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-GHJ6BH5U.js";
|
|
38
38
|
import {
|
|
39
39
|
DIRS
|
|
40
40
|
} from "./chunk-JEZOSEWG.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,
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
hostStepVerdictLabel,
|
|
29
29
|
isActiveAsyncState,
|
|
30
30
|
isComparablePathInside,
|
|
31
|
+
isWorktreeCleanupTaskDone,
|
|
31
32
|
normalizeParallelGroups,
|
|
32
33
|
normalizeWorktreeBaseRef,
|
|
33
34
|
parseHostStepNode,
|
|
@@ -46,10 +47,10 @@ import {
|
|
|
46
47
|
validateModelResponseAliases,
|
|
47
48
|
withWorkflowChildRunModel,
|
|
48
49
|
withWorktreeTransaction
|
|
49
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-SLLZJ5EC.js";
|
|
50
51
|
import {
|
|
51
52
|
validateIntercomBridgeConfig
|
|
52
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-NONHDYXE.js";
|
|
53
54
|
import {
|
|
54
55
|
stableJsonDigest
|
|
55
56
|
} from "./chunk-7F6RKT6W.js";
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
} from "./chunk-YARY7JWU.js";
|
|
59
60
|
import {
|
|
60
61
|
missingForkCopyNote
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-S77ZKDLS.js";
|
|
62
63
|
import {
|
|
63
64
|
DEFAULT_FILE_SYSTEM_RETRY_DELAYS_MS,
|
|
64
65
|
assertWorkflowLaneKey,
|
|
@@ -83,7 +84,7 @@ import {
|
|
|
83
84
|
validateToolBudgetConfig,
|
|
84
85
|
waitForFileSystemRetry,
|
|
85
86
|
writeAtomicJson
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-GHJ6BH5U.js";
|
|
87
88
|
import {
|
|
88
89
|
DIRS,
|
|
89
90
|
RUNNER_LAUNCHER_NAME_PATTERN,
|
|
@@ -545,6 +546,7 @@ function stopStoppableAsyncStatusChildren(status, stopChild, message) {
|
|
|
545
546
|
var KEY_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
546
547
|
var TERMINAL_STATES = /* @__PURE__ */ new Set(["completed", "failed", "paused", "stopped", "rejected", "detached"]);
|
|
547
548
|
var MAX_REQUIRED_ID_BYTES = 4096;
|
|
549
|
+
var MAX_SESSION_FILE_BYTES = 4096;
|
|
548
550
|
var ACTIVITY_COUNTERS = ["currentToolStartedAt", "lastActivityAt", "durationMs", "toolCount", "turnCount", "tokens", "inputTokens", "outputTokens"];
|
|
549
551
|
function workflowChildProgress(progress) {
|
|
550
552
|
return {
|
|
@@ -599,6 +601,7 @@ function workflowChildSummary(input) {
|
|
|
599
601
|
...bounded(entry.runId, 256) ? { runId: bounded(entry.runId, 256) } : {},
|
|
600
602
|
...previous?.agent ? { agent: previous.agent } : {},
|
|
601
603
|
...previous?.sessionName ? { sessionName: previous.sessionName } : {},
|
|
604
|
+
...previous?.sessionFile ? { sessionFile: previous.sessionFile } : {},
|
|
602
605
|
...previous?.model ? { model: previous.model } : {},
|
|
603
606
|
...previous?.thinking ? { thinking: previous.thinking } : {}
|
|
604
607
|
});
|
|
@@ -615,6 +618,7 @@ function workflowChildSummary(input) {
|
|
|
615
618
|
...bounded(step.runId, 256) ? { runId: bounded(step.runId, 256) } : {},
|
|
616
619
|
...launchResolved && bounded(step.agent, 256) ? { agent: bounded(step.agent, 256) } : {},
|
|
617
620
|
...bounded(step.sessionName, 256) ? { sessionName: bounded(step.sessionName, 256) } : {},
|
|
621
|
+
...bounded(step.sessionFile, MAX_SESSION_FILE_BYTES) ? { sessionFile: step.sessionFile } : {},
|
|
618
622
|
...bounded(step.model, 256) ? { model: bounded(step.model, 256) } : {},
|
|
619
623
|
...bounded(step.thinking, 32) ? { thinking: bounded(step.thinking, 32) } : {}
|
|
620
624
|
});
|
|
@@ -629,6 +633,7 @@ function workflowChildSummary(input) {
|
|
|
629
633
|
...bounded(child.runId, 256) ? { runId: bounded(child.runId, 256) } : {},
|
|
630
634
|
...bounded(child.agent, 256) ? { agent: bounded(child.agent, 256) } : {},
|
|
631
635
|
...bounded(result?.sessionName, 256) ? { sessionName: bounded(result?.sessionName, 256) } : {},
|
|
636
|
+
...bounded(result?.sessionFile, MAX_SESSION_FILE_BYTES) ? { sessionFile: result?.sessionFile } : {},
|
|
632
637
|
...bounded(result?.model, 256) ? { model: bounded(result?.model, 256) } : {},
|
|
633
638
|
...bounded(result?.thinking, 32) ? { thinking: bounded(result?.thinking, 32) } : {}
|
|
634
639
|
});
|
|
@@ -640,11 +645,14 @@ function workflowChildSummary(input) {
|
|
|
640
645
|
}
|
|
641
646
|
for (const [key, launch] of input.launches ?? []) {
|
|
642
647
|
const row = rows.get(key);
|
|
643
|
-
if (!row
|
|
648
|
+
if (!row) continue;
|
|
649
|
+
const running = row.state === "running";
|
|
644
650
|
rows.set(key, {
|
|
645
651
|
...row,
|
|
646
|
-
|
|
647
|
-
|
|
652
|
+
...running && !row.runId && bounded(launch.runId, 256) ? { runId: launch.runId } : {},
|
|
653
|
+
...running && !row.agent && bounded(launch.agent, 256) ? { agent: launch.agent } : {},
|
|
654
|
+
// Finished rows keep it too: live updates carry no child results, so this is a settled child's only transcript link until the workflow returns.
|
|
655
|
+
...!row.sessionFile && bounded(launch.sessionFile, MAX_SESSION_FILE_BYTES) ? { sessionFile: launch.sessionFile } : {}
|
|
648
656
|
});
|
|
649
657
|
}
|
|
650
658
|
for (const [key, progress] of input.progress ?? []) {
|
|
@@ -680,16 +688,16 @@ function parseWorkflowChildSummary(value) {
|
|
|
680
688
|
const children = input.children.map((row) => {
|
|
681
689
|
if (!row || typeof row !== "object" || Array.isArray(row)) throw new Error("workflowChildren child row is invalid.");
|
|
682
690
|
const child = row;
|
|
683
|
-
if (Object.keys(child).some((key) => !["childId", "runId", "agent", "sessionName", "model", "thinking", "state", "activity"].includes(key))) throw new Error("workflowChildren child row has unsupported fields.");
|
|
691
|
+
if (Object.keys(child).some((key) => !["childId", "runId", "agent", "sessionName", "sessionFile", "model", "thinking", "state", "activity"].includes(key))) throw new Error("workflowChildren child row has unsupported fields.");
|
|
684
692
|
if (typeof child.childId !== "string" || !KEY_PATTERN.test(child.childId)) throw new Error("workflowChildren childId is invalid.");
|
|
685
693
|
const state = child.state;
|
|
686
694
|
if (state !== "pending" && state !== "running" && state !== "completed" && state !== "failed" && state !== "paused" && state !== "stopped" && state !== "rejected" && state !== "detached") throw new Error("workflowChildren child state is invalid.");
|
|
687
|
-
for (const [field, maxBytes] of [["runId", 256], ["agent", 256], ["sessionName", 256], ["model", 256], ["thinking", 32]]) {
|
|
695
|
+
for (const [field, maxBytes] of [["runId", 256], ["agent", 256], ["sessionName", 256], ["sessionFile", MAX_SESSION_FILE_BYTES], ["model", 256], ["thinking", 32]]) {
|
|
688
696
|
if (child[field] !== void 0 && bounded(child[field], maxBytes) === void 0) throw new Error(`workflowChildren child ${field} is invalid.`);
|
|
689
697
|
}
|
|
690
698
|
const activity = parseActivity(child.activity);
|
|
691
699
|
if (activity && state !== "running") throw new Error("workflowChildren child activity requires running state.");
|
|
692
|
-
return { childId: child.childId, state, ...activity ? { activity } : {}, ...child.runId ? { runId: child.runId } : {}, ...child.agent ? { agent: child.agent } : {}, ...child.sessionName ? { sessionName: child.sessionName } : {}, ...child.model ? { model: child.model } : {}, ...child.thinking ? { thinking: child.thinking } : {} };
|
|
700
|
+
return { childId: child.childId, state, ...activity ? { activity } : {}, ...child.runId ? { runId: child.runId } : {}, ...child.agent ? { agent: child.agent } : {}, ...child.sessionName ? { sessionName: child.sessionName } : {}, ...child.sessionFile ? { sessionFile: child.sessionFile } : {}, ...child.model ? { model: child.model } : {}, ...child.thinking ? { thinking: child.thinking } : {} };
|
|
693
701
|
});
|
|
694
702
|
if (new Set(children.map((child) => child.childId)).size !== children.length) throw new Error("workflowChildren has duplicate childId values.");
|
|
695
703
|
if (typeof input.parentToolCallId !== "string") throw new Error("workflowChildren.parentToolCallId is invalid.");
|
|
@@ -1683,6 +1691,12 @@ async function hashFileAsync(diffPath) {
|
|
|
1683
1691
|
function splitNul(output) {
|
|
1684
1692
|
return output.split("\0").filter((part) => part.length > 0);
|
|
1685
1693
|
}
|
|
1694
|
+
function gitFailureReason(error) {
|
|
1695
|
+
const stderr = error && typeof error === "object" && "stderr" in error ? String(error.stderr ?? "") : "";
|
|
1696
|
+
if (/not a git repository/i.test(stderr)) return "not a Git work tree";
|
|
1697
|
+
const firstLine = (stderr || (error instanceof Error ? error.message : String(error))).split("\n").find((line) => line.trim().length > 0);
|
|
1698
|
+
return firstLine?.trim() ?? "git failed";
|
|
1699
|
+
}
|
|
1686
1700
|
function hashLargeDiff(cwd, relativePath) {
|
|
1687
1701
|
const tempDir = fs2.mkdtempSync(path2.join(os.tmpdir(), "pi-subagents-tracked-diff-"));
|
|
1688
1702
|
const diffPath = path2.join(tempDir, "diff.patch");
|
|
@@ -1729,7 +1743,7 @@ function snapshotTrackedMutations(cwd) {
|
|
|
1729
1743
|
for (const file of changed.paths) fingerprints[file] = fingerprintPath(cwd, file);
|
|
1730
1744
|
return { source: "tracked-files", trackedOnly: true, cwd, dirtyFiles: changed.paths, fingerprints, truncated: changed.truncated };
|
|
1731
1745
|
} catch (error) {
|
|
1732
|
-
return { source: "tracked-files", trackedOnly: true, cwd, dirtyFiles: [], fingerprints: {}, unavailable:
|
|
1746
|
+
return { source: "tracked-files", trackedOnly: true, cwd, dirtyFiles: [], fingerprints: {}, unavailable: gitFailureReason(error) };
|
|
1733
1747
|
}
|
|
1734
1748
|
}
|
|
1735
1749
|
async function fingerprintPathAsync(cwd, relativePath) {
|
|
@@ -1747,6 +1761,13 @@ async function fingerprintPathAsync(cwd, relativePath) {
|
|
|
1747
1761
|
}
|
|
1748
1762
|
}
|
|
1749
1763
|
}
|
|
1764
|
+
function remoteMutationSnapshot(cwd) {
|
|
1765
|
+
return { source: "tracked-files", trackedOnly: true, cwd, dirtyFiles: [], fingerprints: {}, unavailable: "Local Git evidence is not authoritative for a pane-native remote run." };
|
|
1766
|
+
}
|
|
1767
|
+
function remoteMutationEvidence(machine) {
|
|
1768
|
+
const changed = machine.initialGit && machine.finalGit ? machine.initialGit.head !== machine.finalGit.head || machine.initialGit.dirty !== machine.finalGit.dirty : void 0;
|
|
1769
|
+
return { source: "tracked-files", trackedOnly: true, changedFiles: [], attemptedMutation: changed === true, ...changed === void 0 ? { unavailable: "Remote Git before/after evidence was incomplete." } : {} };
|
|
1770
|
+
}
|
|
1750
1771
|
async function collectTrackedMutationEvidence(snapshot, cwd = snapshot.cwd) {
|
|
1751
1772
|
if (snapshot.unavailable) {
|
|
1752
1773
|
return { source: "tracked-files", trackedOnly: true, changedFiles: [], attemptedMutation: false, unavailable: snapshot.unavailable };
|
|
@@ -1772,7 +1793,7 @@ async function collectTrackedMutationEvidence(snapshot, cwd = snapshot.cwd) {
|
|
|
1772
1793
|
truncated: snapshot.truncated || current.truncated || void 0
|
|
1773
1794
|
};
|
|
1774
1795
|
} catch (error) {
|
|
1775
|
-
return { source: "tracked-files", trackedOnly: true, changedFiles: [], attemptedMutation: false, unavailable:
|
|
1796
|
+
return { source: "tracked-files", trackedOnly: true, changedFiles: [], attemptedMutation: false, unavailable: gitFailureReason(error) };
|
|
1776
1797
|
}
|
|
1777
1798
|
}
|
|
1778
1799
|
function formatPathList(paths) {
|
|
@@ -2745,6 +2766,30 @@ async function withRepositoryWorktreeLock(repo, action, options = {}) {
|
|
|
2745
2766
|
// src/runs/shared/parallel-handoff.ts
|
|
2746
2767
|
import * as fs5 from "node:fs";
|
|
2747
2768
|
import * as path5 from "node:path";
|
|
2769
|
+
|
|
2770
|
+
// src/runs/shared/kept-branch-text.ts
|
|
2771
|
+
var KEPT_BRANCH_LINE = /^Kept branch (\S+) at ([0-9a-f]+): its commits are on no other branch\.$/;
|
|
2772
|
+
function readKeptBranches(value) {
|
|
2773
|
+
if (!Array.isArray(value)) return [];
|
|
2774
|
+
return value.filter((entry) => typeof entry?.branch === "string" && typeof entry?.tip === "string");
|
|
2775
|
+
}
|
|
2776
|
+
function formatKeptBranchLines(keptBranches) {
|
|
2777
|
+
return keptBranches.map(({ branch, tip }) => `Kept branch ${branch} at ${tip.slice(0, 12)}: its commits are on no other branch.`);
|
|
2778
|
+
}
|
|
2779
|
+
function formatParallelHandoffLines(handoffPath, keptBranches) {
|
|
2780
|
+
return [`Parallel handoff: ${handoffPath}`, ...formatKeptBranchLines(readKeptBranches(keptBranches))];
|
|
2781
|
+
}
|
|
2782
|
+
function parseKeptBranchLines(lines) {
|
|
2783
|
+
const kept = [];
|
|
2784
|
+
for (const line of lines) {
|
|
2785
|
+
const match = line.match(KEPT_BRANCH_LINE);
|
|
2786
|
+
if (!match) break;
|
|
2787
|
+
kept.push({ branch: match[1], tip: match[2] });
|
|
2788
|
+
}
|
|
2789
|
+
return kept;
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
// src/runs/shared/parallel-handoff.ts
|
|
2748
2793
|
function optionalIdentity(value, label) {
|
|
2749
2794
|
if (value === void 0) return void 0;
|
|
2750
2795
|
if (typeof value !== "string" || !value.trim()) throw new Error(`${label} must be a non-empty string.`);
|
|
@@ -2890,6 +2935,7 @@ function resolveRetainedWorktreeCwd(manifestPath, runId, childIndex, recordedWor
|
|
|
2890
2935
|
}
|
|
2891
2936
|
function referenceFor(manifestPath, manifest) {
|
|
2892
2937
|
const children = manifest.groups.flatMap((group) => group.children);
|
|
2938
|
+
const keptBranches = manifest.groups.flatMap((group) => group.cleanup.tasks.flatMap((task) => task.keptBranchTip ? [{ branch: task.branch, tip: task.keptBranchTip }] : []));
|
|
2893
2939
|
return {
|
|
2894
2940
|
version: 1,
|
|
2895
2941
|
path: manifestPath,
|
|
@@ -2897,6 +2943,7 @@ function referenceFor(manifestPath, manifest) {
|
|
|
2897
2943
|
childCount: children.length,
|
|
2898
2944
|
changedPatches: children.filter((child) => child.patch.changed).length,
|
|
2899
2945
|
cleanupState: manifest.groups.every((group) => group.cleanup.state === "complete") ? "complete" : "partial",
|
|
2946
|
+
...keptBranches.length ? { keptBranches } : {},
|
|
2900
2947
|
...Object.prototype.hasOwnProperty.call(manifest, "cleanupEligibility") ? { cleanupEligibility: trustedStoredCleanupEligibility(manifest) } : {}
|
|
2901
2948
|
};
|
|
2902
2949
|
}
|
|
@@ -3242,6 +3289,7 @@ function writeParallelHandoffGroupUnlocked(input) {
|
|
|
3242
3289
|
const previous = existing?.groups.flatMap((item) => item.cleanup.tasks).find((item) => item.path === task.path && item.branch === task.branch);
|
|
3243
3290
|
if (previous?.worktreeRemoved) task.worktreeRemoved = true;
|
|
3244
3291
|
if (previous?.branchRemoved) task.branchRemoved = true;
|
|
3292
|
+
if (previous?.keptBranchTip) task.keptBranchTip = previous.keptBranchTip;
|
|
3245
3293
|
if (!task.worktreeRemoved && previous?.reason?.includes("retained child resume")) {
|
|
3246
3294
|
task.preserved = true;
|
|
3247
3295
|
task.reason = previous.reason;
|
|
@@ -3349,10 +3397,15 @@ function writeWorktreeSetupHandoff(input) {
|
|
|
3349
3397
|
});
|
|
3350
3398
|
}
|
|
3351
3399
|
function formatParallelHandoffReference(reference) {
|
|
3352
|
-
|
|
3400
|
+
const patches = reference.changedPatches > 0 ? "; the work is in groups[].children[].patch, not applied to this checkout" : "";
|
|
3401
|
+
const kept = reference.cleanupState === "complete" ? "" : "; groups[].cleanup.tasks[] (reason, errors) says what stayed behind";
|
|
3402
|
+
return [
|
|
3403
|
+
`Worktree handoff: ${reference.path} (${reference.childCount} children, ${reference.changedPatches} changed patches, cleanup ${reference.cleanupState})${patches}${kept}`,
|
|
3404
|
+
...formatKeptBranchLines(reference.keptBranches ?? [])
|
|
3405
|
+
].join("\n");
|
|
3353
3406
|
}
|
|
3354
3407
|
function formatParallelHandoffError(error) {
|
|
3355
|
-
return `Worktree handoff unavailable: ${error instanceof Error ? error.message : String(error)}`;
|
|
3408
|
+
return `Worktree handoff unavailable: ${error instanceof Error ? error.message : String(error)}; check \`git worktree list\` for worktrees left behind`;
|
|
3356
3409
|
}
|
|
3357
3410
|
function discardPreservedWorktrees(...args) {
|
|
3358
3411
|
return withHandoffWriteLock(args[0], () => discardPreservedWorktreesUnlocked(...args));
|
|
@@ -3363,7 +3416,7 @@ function discardPreservedWorktreesUnlocked(manifestPath, authorization) {
|
|
|
3363
3416
|
if (!manifest) throw new Error(`Parallel handoff manifest not found: ${resolvedPath}`);
|
|
3364
3417
|
let attempted = 0;
|
|
3365
3418
|
for (const group of manifest.groups) {
|
|
3366
|
-
const pending = group.cleanup.tasks.filter((task) => task.preserved && (
|
|
3419
|
+
const pending = group.cleanup.tasks.filter((task) => task.preserved && !isWorktreeCleanupTaskDone(task));
|
|
3367
3420
|
if (pending.length === 0) continue;
|
|
3368
3421
|
attempted += pending.length;
|
|
3369
3422
|
const report = cleanupWorktrees({
|
|
@@ -3381,11 +3434,11 @@ function discardPreservedWorktreesUnlocked(manifestPath, authorization) {
|
|
|
3381
3434
|
syntheticPaths: []
|
|
3382
3435
|
}))
|
|
3383
3436
|
}, { kind: "discard", authorization });
|
|
3384
|
-
const updates = new Map(report.tasks.map((task) => [task.index, task
|
|
3437
|
+
const updates = new Map(report.tasks.map((task) => [task.index, isWorktreeCleanupTaskDone(task) ? task : { ...task, preserved: true, reason: task.reason ?? "discard cleanup remains incomplete" }]));
|
|
3385
3438
|
group.cleanup = {
|
|
3386
3439
|
state: group.cleanup.tasks.every((task) => {
|
|
3387
3440
|
const next = updates.get(task.index) ?? task;
|
|
3388
|
-
return next
|
|
3441
|
+
return isWorktreeCleanupTaskDone(next);
|
|
3389
3442
|
}) && report.pruned ? "complete" : "partial",
|
|
3390
3443
|
tasks: group.cleanup.tasks.map((task) => updates.get(task.index) ?? task),
|
|
3391
3444
|
pruned: report.pruned,
|
|
@@ -3394,7 +3447,7 @@ function discardPreservedWorktreesUnlocked(manifestPath, authorization) {
|
|
|
3394
3447
|
}
|
|
3395
3448
|
manifest.updatedAt = Date.now();
|
|
3396
3449
|
writeAtomicJson(resolvedPath, manifest);
|
|
3397
|
-
const remaining = manifest.groups.flatMap((group) => group.cleanup.tasks.map((task) => ({ group, task }))).filter(({ task }) => task.preserved && (
|
|
3450
|
+
const remaining = manifest.groups.flatMap((group) => group.cleanup.tasks.map((task) => ({ group, task }))).filter(({ task }) => task.preserved && !isWorktreeCleanupTaskDone(task));
|
|
3398
3451
|
const lines = attempted === 0 ? [`No preserved worktrees remain in ${resolvedPath}.`] : [`Discard processed ${attempted} preserved worktree${attempted === 1 ? "" : "s"}.`, `Manifest: ${resolvedPath}`];
|
|
3399
3452
|
if (remaining.length > 0) {
|
|
3400
3453
|
lines.push("", "Some worktrees remain. Inspect and remove them manually if appropriate:");
|
|
@@ -4164,6 +4217,8 @@ export {
|
|
|
4164
4217
|
projectAsyncWorkflowRows,
|
|
4165
4218
|
projectAsyncStatusSnapshot,
|
|
4166
4219
|
snapshotTrackedMutations,
|
|
4220
|
+
remoteMutationSnapshot,
|
|
4221
|
+
remoteMutationEvidence,
|
|
4167
4222
|
collectTrackedMutationEvidence,
|
|
4168
4223
|
projectTimeoutRecovery,
|
|
4169
4224
|
formatTimeoutRecoveryLines,
|
|
@@ -4182,6 +4237,9 @@ export {
|
|
|
4182
4237
|
utf8Tail,
|
|
4183
4238
|
withHandoffWriteLock,
|
|
4184
4239
|
withRepositoryWorktreeLock,
|
|
4240
|
+
readKeptBranches,
|
|
4241
|
+
formatParallelHandoffLines,
|
|
4242
|
+
parseKeptBranchLines,
|
|
4185
4243
|
readParallelHandoffManifest,
|
|
4186
4244
|
protectRetainedWorktreeForResume,
|
|
4187
4245
|
resolveRetainedWorktreeCwd,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
setInlineWorkflowCoverage,
|
|
11
11
|
setMainThinkingLevelSource,
|
|
12
12
|
widgetRenderKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WW6GQBBS.js";
|
|
14
14
|
import {
|
|
15
15
|
package_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4ALRHKGE.js";
|
|
17
17
|
import {
|
|
18
18
|
EXTERNAL_JOB_BRIDGE_REQUEST_DIR,
|
|
19
19
|
REVIVAL_ORIGIN_FILE,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
takeCompactionAbort,
|
|
67
67
|
workflowResumeClaimState,
|
|
68
68
|
workflowResumeRefusal
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-OVBUEVOT.js";
|
|
70
70
|
import {
|
|
71
71
|
SUBAGENT_CHILD_ENV,
|
|
72
72
|
SUBAGENT_PARENT_SESSION_ENV,
|
|
@@ -86,14 +86,14 @@ import {
|
|
|
86
86
|
resolvePiSessionId,
|
|
87
87
|
resolveWaitToolConfig,
|
|
88
88
|
setDeclarationPinning
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-CFIYO2IV.js";
|
|
90
90
|
import {
|
|
91
91
|
deliverAsyncRunStop,
|
|
92
92
|
ownerConfirmedDead,
|
|
93
93
|
readSessionMessagesTail,
|
|
94
94
|
resolveSubagentRunId,
|
|
95
95
|
restoreForegroundRunHistory
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-7W2IQFP4.js";
|
|
97
97
|
import {
|
|
98
98
|
ASYNC_STATUS_SNAPSHOT_KIND,
|
|
99
99
|
ASYNC_STATUS_SNAPSHOT_VERSION,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
resolveAsyncStatusChild,
|
|
110
110
|
runLaunchDir,
|
|
111
111
|
stopStoppableAsyncStatusChildren
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-6JD4XCA4.js";
|
|
113
113
|
import {
|
|
114
114
|
CONTACT_SUPERVISOR_TOOL_NAME,
|
|
115
115
|
NATIVE_SUPERVISOR_TOOL_NAME,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
parseSupervisorReplyData,
|
|
120
120
|
parseSupervisorRequestDetails,
|
|
121
121
|
topLevelSupervisorTool
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-EPMRDKQT.js";
|
|
123
123
|
import {
|
|
124
124
|
MODEL_ONLY_TOOL,
|
|
125
125
|
canRenderComponents,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
resolveDisabledFeatureSurface,
|
|
146
146
|
resolveMaxActiveAsyncRunsPerSession,
|
|
147
147
|
resolveScheduledStoreRoot
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-ETDE2VYK.js";
|
|
149
149
|
import {
|
|
150
150
|
ACTIVE_RUN_INDEX_DIR,
|
|
151
151
|
MissionNotFoundError,
|
|
@@ -196,28 +196,28 @@ import {
|
|
|
196
196
|
withWorkflowChildRunModel,
|
|
197
197
|
writeAsyncResultFile,
|
|
198
198
|
writeResultIndexForData
|
|
199
|
-
} from "./chunk-
|
|
200
|
-
import "./chunk-
|
|
199
|
+
} from "./chunk-SLLZJ5EC.js";
|
|
200
|
+
import "./chunk-A3INCQ6Z.js";
|
|
201
201
|
import {
|
|
202
202
|
shouldUseNativeFsWatch
|
|
203
203
|
} from "./chunk-NIXWDZZV.js";
|
|
204
204
|
import {
|
|
205
205
|
validateIntercomBridgeConfig
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-NONHDYXE.js";
|
|
207
207
|
import "./chunk-7F6RKT6W.js";
|
|
208
|
-
import "./chunk-
|
|
208
|
+
import "./chunk-HZDLR73C.js";
|
|
209
209
|
import "./chunk-YARY7JWU.js";
|
|
210
210
|
import {
|
|
211
211
|
listHerdrProjectPaneRoots,
|
|
212
212
|
restoreHerdrProjectPaneSnapshots
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-JFACGAJT.js";
|
|
214
214
|
import "./chunk-7J4ZXMY7.js";
|
|
215
215
|
import {
|
|
216
216
|
cleanupAllArtifactDirs,
|
|
217
217
|
cleanupOldArtifacts,
|
|
218
218
|
getArtifactPaths,
|
|
219
219
|
getArtifactsDir
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-S77ZKDLS.js";
|
|
221
221
|
import {
|
|
222
222
|
listBackgroundWorkProviders
|
|
223
223
|
} from "./chunk-XA3DY6UG.js";
|
|
@@ -225,12 +225,12 @@ import "./chunk-YYREO77V.js";
|
|
|
225
225
|
import "./chunk-UKG4V45O.js";
|
|
226
226
|
import {
|
|
227
227
|
registerRuntimeAgentEventListener
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-JRO2CU4D.js";
|
|
229
229
|
import {
|
|
230
230
|
clearRuntimeAgentsForPi,
|
|
231
231
|
listRuntimeAgentConfigs,
|
|
232
232
|
mergeRuntimeAgents
|
|
233
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-KOLLMZ2X.js";
|
|
234
234
|
import {
|
|
235
235
|
DEFAULT_FILE_SYSTEM_RETRY_DELAYS_MS,
|
|
236
236
|
DEFAULT_WAIT_TOOL_NAME,
|
|
@@ -273,7 +273,7 @@ import {
|
|
|
273
273
|
waitToolName,
|
|
274
274
|
withSettingsFileLease,
|
|
275
275
|
writeAtomicJson
|
|
276
|
-
} from "./chunk-
|
|
276
|
+
} from "./chunk-GHJ6BH5U.js";
|
|
277
277
|
import {
|
|
278
278
|
DEFAULT_ARTIFACT_CONFIG,
|
|
279
279
|
DIRS,
|
|
@@ -5370,7 +5370,7 @@ function registerSlashCommands(pi, state, options = {}) {
|
|
|
5370
5370
|
}
|
|
5371
5371
|
fleetOpen = true;
|
|
5372
5372
|
try {
|
|
5373
|
-
const { openSubagentFleet } = await import("./chunk-
|
|
5373
|
+
const { openSubagentFleet } = await import("./chunk-HSHLPYCQ.js");
|
|
5374
5374
|
await openSubagentFleet(ctx, state, { asyncDirRoot: DIRS.async, inspectorPlugins: () => getInspectorPlugins(pi), resultsDir: DIRS.results, fleetKeybindings: options.fleetKeybindings });
|
|
5375
5375
|
} finally {
|
|
5376
5376
|
fleetOpen = false;
|
|
@@ -8784,7 +8784,7 @@ function registerSubagentExtension(pi) {
|
|
|
8784
8784
|
const ctx = withLastUiContext((current) => current);
|
|
8785
8785
|
if (!ctx) return;
|
|
8786
8786
|
try {
|
|
8787
|
-
const { openSubagentFleet } = await import("./chunk-
|
|
8787
|
+
const { openSubagentFleet } = await import("./chunk-HSHLPYCQ.js");
|
|
8788
8788
|
await openSubagentFleet(ctx, state, { initialKey: itemKey, asyncDirRoot: DIRS.async, resultsDir: DIRS.results, fleetKeybindings: config.fleetKeybindings, inspectorPlugins: () => getInspectorPlugins(pi) });
|
|
8789
8789
|
} catch (error) {
|
|
8790
8790
|
if (isStaleExtensionContextError(error)) {
|
|
@@ -8993,7 +8993,7 @@ function registerSubagentExtension(pi) {
|
|
|
8993
8993
|
let executor;
|
|
8994
8994
|
let executorPromise;
|
|
8995
8995
|
let executorModulePromise;
|
|
8996
|
-
const loadExecutorModule = () => executorModulePromise ??= import("./chunk-
|
|
8996
|
+
const loadExecutorModule = () => executorModulePromise ??= import("./chunk-MJHQIUU7.js");
|
|
8997
8997
|
const getExecutor = () => {
|
|
8998
8998
|
executorPromise ??= loadExecutorModule().then(({ createSubagentExecutor }) => {
|
|
8999
8999
|
executor = createSubagentExecutor(executorDeps);
|
|
@@ -9007,7 +9007,7 @@ function registerSubagentExtension(pi) {
|
|
|
9007
9007
|
modulePreloadTimer = setTimeout(() => {
|
|
9008
9008
|
loadExecutorModule().catch(() => {
|
|
9009
9009
|
});
|
|
9010
|
-
if (fleetViewEnabled) import("./chunk-
|
|
9010
|
+
if (fleetViewEnabled) import("./chunk-HSHLPYCQ.js").catch(() => {
|
|
9011
9011
|
});
|
|
9012
9012
|
}, MODULE_PRELOAD_DELAY_MS);
|
|
9013
9013
|
modulePreloadTimer.unref?.();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
summarizeContextModes,
|
|
13
13
|
utf8Tail,
|
|
14
14
|
workflowPreflightLaneForRuntimeKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6JD4XCA4.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-SLLZJ5EC.js";
|
|
38
38
|
import {
|
|
39
39
|
deliverStopRequest,
|
|
40
40
|
stopInboxClosedPath
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-A3INCQ6Z.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-GHJ6BH5U.js";
|
|
54
54
|
import {
|
|
55
55
|
DIRS
|
|
56
56
|
} from "./chunk-JEZOSEWG.js";
|