@vicary/pi-subagents 0.86.0 → 0.87.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 +27 -0
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-7QA7ZA46.js → chunk-2D2DQGC2.js} +9 -9
- package/bundle/{chunk-UR7OW5S7.js → chunk-2NY5PCKQ.js} +11 -5
- package/bundle/{chunk-PYOAIN3V.js → chunk-3CVOAS77.js} +2 -2
- package/bundle/{chunk-YK3QYNLE.js → chunk-6O7YH2QV.js} +1 -1
- package/bundle/{chunk-DD22RXYJ.js → chunk-75LVXBSA.js} +166 -60
- package/bundle/{chunk-S2Q75LP3.js → chunk-BFF6YDK6.js} +1 -1
- package/bundle/{chunk-QGO6HXHG.js → chunk-C3KWLXDH.js} +79 -63
- package/bundle/{chunk-NAFLUJ26.js → chunk-C5QWQSSM.js} +1 -1
- package/bundle/{chunk-77ASNIEM.js → chunk-ESWW6XSX.js} +1 -1
- package/bundle/{chunk-3RKFH2UZ.js → chunk-HDICKROY.js} +5 -5
- package/bundle/{chunk-XOFYXQKZ.js → chunk-HTI7DD5D.js} +2 -2
- package/bundle/{chunk-WN2E5XHN.js → chunk-LZKVUWIY.js} +4 -4
- package/bundle/{chunk-6VD7BGIC.js → chunk-M2VBGET6.js} +2 -2
- package/bundle/{chunk-2DITXA3H.js → chunk-NJTSXIMG.js} +12 -12
- package/bundle/{chunk-QFLPV64W.js → chunk-NMYBVCGP.js} +25 -24
- package/bundle/{chunk-CJHFDQFJ.js → chunk-O7A26O6B.js} +8 -6
- package/bundle/{chunk-7ZUFN6ME.js → chunk-OOE3R7IQ.js} +1 -1
- package/bundle/{chunk-GJGTMLPE.js → chunk-PGU4TZV3.js} +79 -32
- package/bundle/{chunk-WHC2XHGF.js → chunk-PUSTU4Q7.js} +75 -33
- package/bundle/{chunk-374MZFF4.js → chunk-SIAQXPJ4.js} +6 -8
- package/bundle/{chunk-LGINOOY5.js → chunk-USRX7QXD.js} +2 -2
- package/bundle/{chunk-5H4BICQZ.js → chunk-VFUFOZBU.js} +1 -1
- package/bundle/{chunk-NF7IEKBH.js → chunk-W2BZS6UC.js} +27 -13
- package/bundle/{chunk-ZPY5QZCS.js → chunk-W52LJANO.js} +1 -1
- package/bundle/{chunk-GRJHIXYF.js → chunk-XSDYTXHF.js} +18 -11
- package/bundle/{chunk-BGXEAYUM.js → chunk-XV7RTWTS.js} +3 -3
- package/bundle/{chunk-BU6PFPVX.js → chunk-YEXKJJVS.js} +12 -7
- package/bundle/{chunk-GLVJMI6R.js → chunk-Z4TR7MK6.js} +5 -5
- package/bundle/control-channel.js +2 -2
- package/bundle/index.js +1 -1
- package/bundle/intercom-bridge.js +2 -2
- package/bundle/preflight.js +12 -10
- package/bundle/project-panes.js +3 -3
- package/bundle/workflow-resources.js +1 -1
- package/docs/agents.md +3 -3
- package/docs/configuration.md +12 -4
- package/docs/extension-api.md +2 -0
- package/docs/models.md +6 -2
- package/docs/tool-reference.md +1 -0
- package/package.json +2 -2
- package/skills/pi-subagents/SKILL.md +7 -4
- package/skills/pi-subagents/references/prompting-and-roles.md +1 -0
- package/src/agents/agent-management.js +10 -6
- package/src/agents/agent-serializer.d.ts +2 -0
- package/src/agents/agent-serializer.js +1 -1
- package/src/agents/agents.js +37 -12
- package/src/api/preflight.d.ts +3 -1
- package/src/api/preflight.js +2 -0
- package/src/extension/index.js +4 -2
- package/src/extension/schemas.d.ts +2 -0
- package/src/extension/schemas.js +1 -0
- package/src/runs/background/async-execution.d.ts +2 -1
- package/src/runs/background/async-execution.js +4 -2
- package/src/runs/background/runner-aliases.js +15 -0
- package/src/runs/background/wait-subscriptions.js +124 -12
- package/src/runs/foreground/async-stop-action.d.ts +1 -1
- package/src/runs/foreground/async-stop-action.js +9 -1
- package/src/runs/foreground/execution.js +1 -0
- package/src/runs/foreground/subagent-executor.d.ts +1 -0
- package/src/runs/foreground/subagent-executor.js +51 -8
- package/src/runs/shared/child-session.d.ts +5 -4
- package/src/runs/shared/child-session.js +43 -33
- package/src/runs/shared/herdr-placed-run.js +3 -2
- package/src/runs/shared/mcp-config-sources.d.ts +2 -1
- package/src/runs/shared/mcp-config-sources.js +1 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.d.ts +0 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.js +5 -6
- package/src/runs/shared/model-resolution.d.ts +19 -4
- package/src/runs/shared/model-resolution.js +50 -51
- package/src/shared/artifacts.js +25 -13
- package/src/shared/pruned-fork.js +2 -2
- package/src/shared/types.d.ts +14 -0
- package/src/watchdog/model-selection.js +2 -2
- package/src/watchdog/review.js +2 -2
- package/src/workflows/scripted-workflow.d.ts +2 -0
- package/src/workflows/scripted-workflow.js +103 -39
- package/src/workflows/structured-workflow-scripts.d.ts +4 -3
- package/src/workflows/structured-workflow-scripts.js +32 -11
- package/src/workflows/workflow-resources.js +4 -4
- package/src/workflows/workflow-resume-claim.d.ts +2 -0
- package/src/workflows/workflow-resume-claim.js +1 -1
- package/src/workflows/workflow-resume.d.ts +1 -1
- package/src/workflows/workflow-resume.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.87.0] - 2026-11-07
|
|
6
|
+
|
|
7
|
+
### Highlights
|
|
8
|
+
|
|
9
|
+
- You can stop a long workflow without losing the work already in progress: `stop` with `drain: true` starts nothing new, lets running children finish and keeps their results.
|
|
10
|
+
- A model written as `provider/id` now always runs on that provider, so a subagent can no longer quietly run on, and bill, another provider's copy of the model.
|
|
11
|
+
- One setting, `subagents.defaultInheritGlobalContext: true`, gives every subagent your global `AGENTS.md`.
|
|
12
|
+
- Old artifacts in nested folders are now cleaned up too, so session artifact folders stop growing.
|
|
13
|
+
- Several multi-window and multi-session fixes: wait notices reach the right window, and closing one session in a host like pi-web no longer stops another session's subagents.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `stop` with `drain: true` ends an async workflow without killing the children already running: it starts no new children, lets the running ones finish and report, then ends as stopped. Before, stopping a workflow killed them too. Thanks to [@nnayr](https://github.com/nnayr) for the report. (#3202)
|
|
18
|
+
- `subagents.defaultInheritGlobalContext: true` gives every subagent your global `~/.pi/agent/AGENTS.md`, without listing each agent in `agentOverrides`. An agent that sets `inheritGlobalContext: false` still opts out. Thanks to [@imagebuilder1837](https://github.com/imagebuilder1837) for the report. (#3206)
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- A subagent model written as `provider/id` now always runs on that provider. Before, if you were not signed in to that provider, a similar model from another provider (for example OpenRouter's copy of an Anthropic model) could run instead and bill that account. The launch now fails with an error that names the other provider's model, so you can choose it on purpose. The bundled skill also tells the parent to leave `model` out unless you or your settings name one. Thanks to [@crusaderky](https://github.com/crusaderky) for the report. (#3203)
|
|
23
|
+
- When a `parallel` workflow, `tasks` or `chain` item has a field it does not accept, the error now says how to keep what that field asked for. For `output`, it explains that `output` on the outer call writes one file per child, and that exact per-child paths need a workflow script with `runs.all`. For fields such as `worktree`, the error points to the outer call and says that no child was launched. Thanks to [@cash-flow-king](https://github.com/cash-flow-king) for the report. (#3207)
|
|
24
|
+
- `validate` now catches a `runs.lanes` lane that starts by resuming a finished run. It reports the same error the launch would give, so the script can be fixed before it runs. (#3210)
|
|
25
|
+
- `mcp:` selectors now resolve for pi-mcp-adapter servers that set `directTools: "search"` or use `${NAME:-default}` in their configuration. Before, pi-subagents dropped a `"search"` server from the configuration, and a `${NAME:-default}` value gave a server a different cache hash than the adapter computed. In both cases, every selector for the server was unresolved. A server URL that used a default also failed the launch. Thanks to [@acolomba](https://github.com/acolomba) for #3201.
|
|
26
|
+
- In a host that runs several Pi sessions in one process, such as pi-web, closing one session no longer stops subagents that another session started. Thanks to [@Jarcis-cy](https://github.com/Jarcis-cy) for #3204.
|
|
27
|
+
- When two Pi windows have the same session open, a background wait notice now reaches the window that asked for it, instead of whichever window checked first. If that window has closed, the next window that opens the session takes the notice over. Thanks to [@mdrkrg](https://github.com/mdrkrg) for #3205.
|
|
28
|
+
- Old subagent artifacts in nested folders, such as workflow child outputs under `outputs/`, are now removed after `artifactConfig.cleanupDays` like top-level ones. Before, cleanup only looked at the top level, so session artifact folders kept growing. Worktree handoff records and their patches are kept. (#3217)
|
|
29
|
+
- The configuration docs now explain how to turn on delegation in a session that was recorded before pi-subagents was installed. They also no longer say that `"toolActivation": "eager"` makes `subagent` active in every resumed session. Thanks to [@dapp-whisperer](https://github.com/dapp-whisperer) for #3218.
|
|
30
|
+
- On a Pi 1.5 install that is missing `@earendil-works/pi-schema` (seen in a NixOS package), a background subagent launch now fails right away with an error that names the missing package. Before, the launch was accepted and the child then exited with `Cannot find module '@earendil-works/pi-schema'` before its first turn. Thanks to [@Hifive55555](https://github.com/Hifive55555) for #3220.
|
|
31
|
+
|
|
5
32
|
## [0.86.0] - 2026-11-05
|
|
6
33
|
|
|
7
34
|
### Highlights
|
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-BFF6YDK6.js";
|
|
6
6
|
import {
|
|
7
7
|
registerRuntimeAgent
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-C5QWQSSM.js";
|
|
9
|
+
import "./chunk-C3KWLXDH.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-SIAQXPJ4.js";
|
|
4
4
|
import "./chunk-CTPAE36Y.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-C3KWLXDH.js";
|
|
6
6
|
import "./chunk-JEZOSEWG.js";
|
|
7
7
|
import "./chunk-YFCK7H2S.js";
|
|
8
8
|
import "./chunk-QXASAHIA.js";
|
|
@@ -7,37 +7,37 @@ import {
|
|
|
7
7
|
safeTranscriptEvent,
|
|
8
8
|
steerAsyncRun,
|
|
9
9
|
steerWorkflowForegroundTarget
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HDICKROY.js";
|
|
11
11
|
import {
|
|
12
12
|
FLEET_STATUS_WIDGET_KEY,
|
|
13
13
|
runningTone,
|
|
14
14
|
stepTaskSummary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LZKVUWIY.js";
|
|
16
16
|
import {
|
|
17
17
|
foregroundChildStateLabel,
|
|
18
18
|
formatAsyncRunTranscript,
|
|
19
19
|
stopAsyncRun
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2NY5PCKQ.js";
|
|
21
21
|
import {
|
|
22
22
|
contextModeBadge,
|
|
23
23
|
contextModeLabel,
|
|
24
24
|
decodeUtf8Tail,
|
|
25
25
|
listAsyncRuns
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XV7RTWTS.js";
|
|
27
27
|
import {
|
|
28
28
|
reportSessionWarning
|
|
29
29
|
} from "./chunk-HXRB42AF.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-PGU4TZV3.js";
|
|
31
|
+
import "./chunk-VFUFOZBU.js";
|
|
32
32
|
import "./chunk-NIXWDZZV.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-ESWW6XSX.js";
|
|
34
34
|
import "./chunk-7F6RKT6W.js";
|
|
35
35
|
import "./chunk-CTPAE36Y.js";
|
|
36
36
|
import "./chunk-7J4ZXMY7.js";
|
|
37
37
|
import {
|
|
38
38
|
getArtifactPaths,
|
|
39
39
|
getArtifactsDir
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XSDYTXHF.js";
|
|
41
41
|
import {
|
|
42
42
|
snapshotExternalRuns
|
|
43
43
|
} from "./chunk-UKG4V45O.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
formatTokens,
|
|
50
50
|
readStatus,
|
|
51
51
|
shortenPath
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-C3KWLXDH.js";
|
|
53
53
|
import {
|
|
54
54
|
DIRS
|
|
55
55
|
} from "./chunk-JEZOSEWG.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
summarizeContextModes,
|
|
13
13
|
utf8Tail,
|
|
14
14
|
workflowPreflightLaneForRuntimeKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XV7RTWTS.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-PGU4TZV3.js";
|
|
38
38
|
import {
|
|
39
39
|
deliverStopRequest,
|
|
40
40
|
stopInboxClosedPath
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-VFUFOZBU.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-C3KWLXDH.js";
|
|
54
54
|
import {
|
|
55
55
|
DIRS
|
|
56
56
|
} from "./chunk-JEZOSEWG.js";
|
|
@@ -937,13 +937,19 @@ function deliverAsyncRunStop(input) {
|
|
|
937
937
|
if (!(pausedWholeRun && fs5.existsSync(stopInboxClosedPath(delivery.asyncDir)))) deliverStopRequest(delivery);
|
|
938
938
|
if (pausedWholeRun) return sealPausedRun(delivery.asyncDir, status, resultsDir);
|
|
939
939
|
}
|
|
940
|
-
function stopAsyncRun(state, runId, kill, location, childId) {
|
|
940
|
+
function stopAsyncRun(state, runId, kill, location, childId, drain) {
|
|
941
941
|
const target = getAsyncStopTarget(state, runId, location);
|
|
942
942
|
const workflowRunId = target?.asyncId ?? runId;
|
|
943
943
|
const workflowController = childId === void 0 && workflowRunId ? state.workflowControllers?.get(workflowRunId) : void 0;
|
|
944
944
|
const workflowAsyncDir = workflowController && workflowRunId ? target?.asyncDir ?? state.asyncJobs.get(workflowRunId)?.asyncDir : void 0;
|
|
945
945
|
const workflowStatus = workflowAsyncDir ? readStatus(workflowAsyncDir) : void 0;
|
|
946
946
|
const foreignWorkflow = Boolean(state.currentSessionId && workflowStatus && workflowStatus.sessionId !== state.currentSessionId);
|
|
947
|
+
if (drain) {
|
|
948
|
+
const drained = workflowController && workflowRunId && !foreignWorkflow && !workflowController.signal.aborted ? state.workflowDrains?.get(workflowRunId)?.() : void 0;
|
|
949
|
+
if (!drained) return { content: [{ type: "text", text: `drain applies only to live async workflows in this session; '${runId ?? "current"}' is not one.` }], isError: true, details: { mode: "management", results: [] } };
|
|
950
|
+
if (!drained.ok) return { content: [{ type: "text", text: `Could not save the drain request for '${workflowRunId}'; nothing was stopped. Retry, or use stop without drain.` }], isError: true, details: { mode: "management", results: [] } };
|
|
951
|
+
return { content: [{ type: "text", text: `Drain requested for async workflow ${workflowRunId}: no new children will start; ${drained.started} started child(ren) will finish.` }], details: { mode: "management", results: [] } };
|
|
952
|
+
}
|
|
947
953
|
if (workflowController && workflowRunId && !foreignWorkflow) {
|
|
948
954
|
if (workflowStatus) stopStoppableAsyncStatusChildren(workflowStatus, state.workflowChildStops?.get(workflowRunId), "Workflow stopped.");
|
|
949
955
|
workflowController.abort(new Error("Workflow stopped."));
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-7J4ZXMY7.js";
|
|
4
4
|
import {
|
|
5
5
|
getProjectSubagentsDir
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XSDYTXHF.js";
|
|
7
7
|
import {
|
|
8
8
|
getPiSpawnCommand,
|
|
9
9
|
writeAtomicJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C3KWLXDH.js";
|
|
11
11
|
|
|
12
12
|
// src/inspectors/herdr/project-panes.ts
|
|
13
13
|
import * as fs from "node:fs";
|