@vicary/pi-subagents 0.89.1 → 0.89.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/bundle/child-tool-plan.js +1 -1
- package/bundle/{chunk-C22YEYFZ.js → chunk-464OJSDP.js} +2 -2
- package/bundle/{chunk-YLU5JFW2.js → chunk-4KQW5R6U.js} +1 -1
- package/bundle/{chunk-WMGQNIP7.js → chunk-4X3T5CPK.js} +6 -6
- package/bundle/{chunk-UNLGCAC4.js → chunk-62OHSCQ6.js} +62 -10
- package/bundle/{chunk-7J4ZXMY7.js → chunk-72334PEI.js} +6 -4
- package/bundle/{chunk-R3NH5XAL.js → chunk-AHGJSJYY.js} +3 -2
- package/bundle/{chunk-TRN65L4F.js → chunk-DGLXVN3F.js} +1 -1
- package/bundle/{chunk-KCDPTXHT.js → chunk-DHY5TY2Y.js} +235 -197
- package/bundle/{chunk-JLZFSOEL.js → chunk-DNDNLHTL.js} +7 -7
- package/bundle/{chunk-MIX3MCIF.js → chunk-FF5K5HQU.js} +8 -3
- package/bundle/{chunk-URKQZHVH.js → chunk-FO2GIU5F.js} +23 -14
- package/bundle/{chunk-OUM6SEVD.js → chunk-JEYG7CNC.js} +6 -2
- package/bundle/{chunk-R5XS4CVE.js → chunk-LODNNILA.js} +15 -15
- package/bundle/{chunk-BERAWSQQ.js → chunk-RHKIP45B.js} +4 -4
- package/bundle/{chunk-4FFKVLBG.js → chunk-SRCMJY4F.js} +3 -3
- package/bundle/{chunk-SG3NCWZW.js → chunk-U753SUBC.js} +1 -1
- package/bundle/{chunk-NLDROUCR.js → chunk-V4543APA.js} +24 -15
- package/bundle/{chunk-DVOXHOTY.js → chunk-W7NDPDDJ.js} +3 -3
- package/bundle/index.js +1 -1
- package/bundle/preflight.js +7 -5
- package/bundle/project-panes.js +2 -2
- package/docs/observability.md +3 -1
- package/docs/watchdog.md +3 -2
- package/package.json +2 -2
- package/src/api/preflight.d.ts +1 -0
- package/src/api/preflight.js +2 -1
- package/src/inspectors/herdr/project-panes.d.ts +2 -0
- package/src/inspectors/herdr/project-panes.js +7 -1
- package/src/inspectors/shell-command.d.ts +2 -1
- package/src/inspectors/shell-command.js +7 -5
- package/src/runs/background/active-async-capacity.js +2 -1
- package/src/runs/background/active-run-index.d.ts +1 -0
- package/src/runs/background/active-run-index.js +3 -0
- package/src/runs/background/async-execution.d.ts +2 -0
- package/src/runs/background/async-execution.js +3 -2
- package/src/runs/background/process-terminal.d.ts +6 -0
- package/src/runs/background/process-terminal.js +34 -2
- package/src/runs/background/run-status.js +2 -1
- package/src/runs/background/stale-run-reconciler.d.ts +8 -0
- package/src/runs/background/stale-run-reconciler.js +38 -8
- package/src/runs/background/workflow-terminal-proof.d.ts +0 -1
- package/src/runs/background/workflow-terminal-proof.js +4 -4
- package/src/runs/foreground/execution.js +2 -2
- package/src/runs/foreground/subagent-executor.d.ts +2 -0
- package/src/runs/foreground/subagent-executor.js +10 -1
- package/src/runs/shared/herdr-pane-host.js +10 -2
- package/src/runs/shared/mcp-config-sources.d.ts +1 -0
- package/src/runs/shared/mcp-config-sources.js +1 -1
- package/src/runs/shared/mcp-direct-tool-allowlist.js +1 -0
- package/src/shared/types.d.ts +2 -0
- package/src/tui/fleet-transcript.js +21 -9
- package/src/watchdog/runtime.d.ts +4 -0
- package/src/watchdog/runtime.js +50 -12
- package/src/watchdog/turn-delta.d.ts +2 -0
- package/src/watchdog/turn-delta.js +21 -0
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
startWatchdogDiffBaselineCapture,
|
|
12
12
|
writeUserWatchdogEnabled,
|
|
13
13
|
writeWatchdogModelSettings
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-62OHSCQ6.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveGitRepositoryIdentity
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-464OJSDP.js";
|
|
18
18
|
import {
|
|
19
19
|
formatParallelHandoffLines,
|
|
20
20
|
listAsyncRuns,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
readKeptBranches,
|
|
26
26
|
readWorkflowLaunchRecord,
|
|
27
27
|
resolveRetainedWorktreeCwd
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-U753SUBC.js";
|
|
29
29
|
import {
|
|
30
30
|
ownsRun
|
|
31
31
|
} from "./chunk-HXRB42AF.js";
|
|
@@ -57,21 +57,21 @@ import {
|
|
|
57
57
|
resolveMissionStoreLocation,
|
|
58
58
|
validateMissionId,
|
|
59
59
|
workflowRunParamsFingerprint
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
61
61
|
import {
|
|
62
62
|
requestAsyncCommand,
|
|
63
63
|
watchAsyncControlInbox
|
|
64
64
|
} from "./chunk-UUW7P6KJ.js";
|
|
65
65
|
import {
|
|
66
66
|
supervisorChannelDir
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-AHGJSJYY.js";
|
|
68
68
|
import {
|
|
69
69
|
createRequiredChildExtensionIdentity
|
|
70
70
|
} from "./chunk-YARY7JWU.js";
|
|
71
71
|
import {
|
|
72
72
|
createHerdrClient,
|
|
73
73
|
detectHerdr
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-JEYG7CNC.js";
|
|
75
75
|
import {
|
|
76
76
|
getProjectSubagentsDir
|
|
77
77
|
} from "./chunk-77VQEATI.js";
|
|
@@ -7888,7 +7888,7 @@ function childSessionFactory() {
|
|
|
7888
7888
|
}
|
|
7889
7889
|
function createLazyPlacementFactory(local) {
|
|
7890
7890
|
let placed;
|
|
7891
|
-
const factory = async () => placed ??= (await import("./chunk-
|
|
7891
|
+
const factory = async () => placed ??= (await import("./chunk-FF5K5HQU.js")).createPlacementAwareChildSessionFactory(local);
|
|
7892
7892
|
return {
|
|
7893
7893
|
async create(launch) {
|
|
7894
7894
|
return launch.machine ? (await factory()).create(launch) : local.create(launch);
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-TXC7WIPL.js";
|
|
11
11
|
import {
|
|
12
12
|
package_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DGLXVN3F.js";
|
|
14
14
|
import {
|
|
15
15
|
ensureSupervisorChannelDir
|
|
16
16
|
} from "./chunk-VEEUXJDO.js";
|
|
@@ -517,14 +517,19 @@ var herdrPaneHost = {
|
|
|
517
517
|
return { owned, terminalId };
|
|
518
518
|
},
|
|
519
519
|
async prompt(connection, identity, text, options = {}) {
|
|
520
|
-
const clock = options.clock ?? { now: () => Date.now(), wait: (ms) => new Promise((resolve) => setTimeout(resolve, ms)) }, deadline = clock.now() + (options.timeoutMs ??
|
|
520
|
+
const clock = options.clock ?? { now: () => Date.now(), wait: (ms) => new Promise((resolve) => setTimeout(resolve, ms)) }, deadline = clock.now() + (options.timeoutMs ?? 2e4), pollMs = options.pollMs ?? 100;
|
|
521
521
|
for (; ; ) {
|
|
522
522
|
try {
|
|
523
523
|
await connection.client.call("agent.prompt", { target: identity.agentName, text });
|
|
524
524
|
return;
|
|
525
525
|
} catch (error) {
|
|
526
526
|
if (!(error instanceof Error) || !error.message.includes("is not an active named agent") || clock.now() >= deadline) throw error;
|
|
527
|
-
|
|
527
|
+
const remainingMs = deadline - clock.now();
|
|
528
|
+
try {
|
|
529
|
+
await connection.client.call("agent.wait", { target: identity.agentName, until: ["idle", "done"], timeout_ms: remainingMs }, remainingMs + 5e3);
|
|
530
|
+
} catch {
|
|
531
|
+
}
|
|
532
|
+
await clock.wait(Math.min(pollMs, Math.max(0, deadline - clock.now())));
|
|
528
533
|
if (options.stopped?.()) throw new Error("Remote Pi prompt was not sent because the run was stopped.", { cause: error });
|
|
529
534
|
}
|
|
530
535
|
}
|
|
@@ -7,33 +7,33 @@ import {
|
|
|
7
7
|
safeTranscriptEvent,
|
|
8
8
|
steerAsyncRun,
|
|
9
9
|
steerWorkflowForegroundTarget
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RHKIP45B.js";
|
|
11
11
|
import {
|
|
12
12
|
FLEET_STATUS_WIDGET_KEY,
|
|
13
13
|
runningTone,
|
|
14
14
|
stepTaskSummary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SRCMJY4F.js";
|
|
16
16
|
import {
|
|
17
17
|
foregroundChildStateLabel,
|
|
18
18
|
formatAsyncRunTranscript,
|
|
19
19
|
stopAsyncRun
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-464OJSDP.js";
|
|
21
21
|
import {
|
|
22
22
|
contextModeBadge,
|
|
23
23
|
contextModeLabel,
|
|
24
24
|
decodeUtf8Tail,
|
|
25
25
|
listAsyncRuns
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-U753SUBC.js";
|
|
27
27
|
import {
|
|
28
28
|
reportSessionWarning
|
|
29
29
|
} from "./chunk-HXRB42AF.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-DHY5TY2Y.js";
|
|
31
31
|
import "./chunk-UUW7P6KJ.js";
|
|
32
32
|
import "./chunk-NIXWDZZV.js";
|
|
33
33
|
import "./chunk-YJIU5WF4.js";
|
|
34
34
|
import "./chunk-7F6RKT6W.js";
|
|
35
35
|
import "./chunk-YARY7JWU.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-72334PEI.js";
|
|
37
37
|
import {
|
|
38
38
|
getArtifactPaths,
|
|
39
39
|
getArtifactsDir
|
|
@@ -154,8 +154,15 @@ function renderExpandedTool(event, width, theme) {
|
|
|
154
154
|
const output = event.output ?? event.error;
|
|
155
155
|
const outputColor = event.status === "error" ? "error" : "toolOutput";
|
|
156
156
|
if (event.name === "bash") {
|
|
157
|
-
const command = jsonScalar(args?.command)
|
|
158
|
-
|
|
157
|
+
const command = jsonScalar(args?.command);
|
|
158
|
+
let first = true;
|
|
159
|
+
for (const commandLine of (command ?? event.args ?? "(unknown command)").split(/\r?\n/)) {
|
|
160
|
+
for (const wrapped of renderWrapped(theme.fg("toolTitle", theme.bold(first ? `$ ${commandLine}` : commandLine)), Math.max(1, width - 4))) {
|
|
161
|
+
lines.push(railLine(`${first ? glyph : " "} ${wrapped}`, width, theme));
|
|
162
|
+
first = false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (command === void 0 && !args && event.argsPayload) lines.push(...renderArgsPayload(event.argsPayload, width, theme));
|
|
159
166
|
if (output) {
|
|
160
167
|
for (const outputLine of output.replace(/\s+$/, "").split(/\r?\n/)) {
|
|
161
168
|
for (const wrapped of renderWrapped(theme.fg(outputColor, outputLine), Math.max(1, width - 4))) {
|
|
@@ -178,12 +185,7 @@ function renderExpandedTool(event, width, theme) {
|
|
|
178
185
|
return lines;
|
|
179
186
|
}
|
|
180
187
|
lines.push(railLine(`${glyph} ${theme.fg("toolTitle", theme.bold(event.name))}`, width, theme));
|
|
181
|
-
if (event.argsPayload)
|
|
182
|
-
lines.push(railLine(theme.fg("dim", " args"), width, theme));
|
|
183
|
-
for (const argLine of event.argsPayload.split(/\r?\n/)) {
|
|
184
|
-
for (const wrapped of renderWrapped(theme.fg("muted", argLine), Math.max(1, width - 4))) lines.push(railLine(` ${wrapped}`, width, theme));
|
|
185
|
-
}
|
|
186
|
-
}
|
|
188
|
+
if (event.argsPayload) lines.push(...renderArgsPayload(event.argsPayload, width, theme));
|
|
187
189
|
if (output) {
|
|
188
190
|
lines.push(railLine(theme.fg(event.status === "error" ? "error" : "dim", event.status === "error" ? " error" : " output"), width, theme));
|
|
189
191
|
for (const outputLine of output.split(/\r?\n/)) {
|
|
@@ -195,6 +197,13 @@ function renderExpandedTool(event, width, theme) {
|
|
|
195
197
|
function bounded(text, width) {
|
|
196
198
|
return truncateToWidth(text, Math.max(0, width));
|
|
197
199
|
}
|
|
200
|
+
function renderArgsPayload(payload, width, theme) {
|
|
201
|
+
const lines = [railLine(theme.fg("dim", " args"), width, theme)];
|
|
202
|
+
for (const argLine of payload.split(/\r?\n/)) {
|
|
203
|
+
for (const wrapped of renderWrapped(theme.fg("muted", argLine), Math.max(1, width - 4))) lines.push(railLine(` ${wrapped}`, width, theme));
|
|
204
|
+
}
|
|
205
|
+
return lines;
|
|
206
|
+
}
|
|
198
207
|
function railLine(content, width, theme) {
|
|
199
208
|
return bounded(`${theme.fg("borderMuted", "\u2502")} ${content}`, width);
|
|
200
209
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatShellCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-72334PEI.js";
|
|
4
4
|
import {
|
|
5
5
|
getProjectSubagentsDir
|
|
6
6
|
} from "./chunk-77VQEATI.js";
|
|
@@ -389,10 +389,14 @@ async function inspectPane(client, paneId, signal) {
|
|
|
389
389
|
if (!runtime) return projectPaneError("INVALID_PANE_RESPONSE", `Herdr pane get returned no pane runtime for '${paneId}'.`, { details: live.data });
|
|
390
390
|
return { ok: true, data: runtime };
|
|
391
391
|
}
|
|
392
|
+
function projectPaneShellFlavor(platform, shell) {
|
|
393
|
+
if (platform !== "win32") return "auto";
|
|
394
|
+
return /(^|[\\/])(bash|zsh|sh|dash|ksh)(\.exe)?$/i.test(shell ?? "") ? "posix" : "auto";
|
|
395
|
+
}
|
|
392
396
|
function projectPaneCommand(message) {
|
|
393
397
|
const args = message?.trim() ? [message.trim()] : [];
|
|
394
398
|
const command = getPiSpawnCommand(args);
|
|
395
|
-
return formatShellCommand(command.command, command.args);
|
|
399
|
+
return formatShellCommand(command.command, command.args, process.platform, projectPaneShellFlavor(process.platform, process.env.SHELL));
|
|
396
400
|
}
|
|
397
401
|
function canonicalRuntimePath(value) {
|
|
398
402
|
if (!value) return void 0;
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
setInlineWorkflowCoverage,
|
|
11
11
|
setMainThinkingLevelSource,
|
|
12
12
|
widgetRenderKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SRCMJY4F.js";
|
|
14
14
|
import {
|
|
15
15
|
package_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DGLXVN3F.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-DNDNLHTL.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-62OHSCQ6.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-464OJSDP.js";
|
|
97
97
|
import {
|
|
98
98
|
ASYNC_STATUS_SNAPSHOT_KIND,
|
|
99
99
|
ASYNC_STATUS_SNAPSHOT_VERSION,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
runLaunchDir,
|
|
111
111
|
stopStoppableAsyncStatusChildren,
|
|
112
112
|
summarizeAsyncStatus
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-U753SUBC.js";
|
|
114
114
|
import {
|
|
115
115
|
CONTACT_SUPERVISOR_TOOL_NAME,
|
|
116
116
|
NATIVE_SUPERVISOR_TOOL_NAME,
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
resolveDisabledFeatureSurface,
|
|
147
147
|
resolveMaxActiveAsyncRunsPerSession,
|
|
148
148
|
resolveScheduledStoreRoot
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-4KQW5R6U.js";
|
|
150
150
|
import {
|
|
151
151
|
ACTIVE_RUN_INDEX_DIR,
|
|
152
152
|
MissionNotFoundError,
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
withWorkflowChildRunModel,
|
|
198
198
|
writeAsyncResultFile,
|
|
199
199
|
writeResultIndexForData
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
201
201
|
import "./chunk-UUW7P6KJ.js";
|
|
202
202
|
import {
|
|
203
203
|
shouldUseNativeFsWatch
|
|
@@ -206,13 +206,13 @@ import {
|
|
|
206
206
|
validateIntercomBridgeConfig
|
|
207
207
|
} from "./chunk-YJIU5WF4.js";
|
|
208
208
|
import "./chunk-7F6RKT6W.js";
|
|
209
|
-
import "./chunk-
|
|
209
|
+
import "./chunk-AHGJSJYY.js";
|
|
210
210
|
import "./chunk-YARY7JWU.js";
|
|
211
211
|
import {
|
|
212
212
|
listHerdrProjectPaneRoots,
|
|
213
213
|
restoreHerdrProjectPaneSnapshots
|
|
214
|
-
} from "./chunk-
|
|
215
|
-
import "./chunk-
|
|
214
|
+
} from "./chunk-JEYG7CNC.js";
|
|
215
|
+
import "./chunk-72334PEI.js";
|
|
216
216
|
import {
|
|
217
217
|
cleanupAllArtifactDirs,
|
|
218
218
|
cleanupOldArtifacts,
|
|
@@ -5439,7 +5439,7 @@ function registerSlashCommands(pi, state, options = {}) {
|
|
|
5439
5439
|
}
|
|
5440
5440
|
fleetOpen = true;
|
|
5441
5441
|
try {
|
|
5442
|
-
const { openSubagentFleet } = await import("./chunk-
|
|
5442
|
+
const { openSubagentFleet } = await import("./chunk-FO2GIU5F.js");
|
|
5443
5443
|
await openSubagentFleet(ctx, state, { asyncDirRoot: DIRS.async, inspectorPlugins: () => getInspectorPlugins(pi), resultsDir: DIRS.results, fleetKeybindings: options.fleetKeybindings });
|
|
5444
5444
|
} finally {
|
|
5445
5445
|
fleetOpen = false;
|
|
@@ -8853,7 +8853,7 @@ function registerSubagentExtension(pi) {
|
|
|
8853
8853
|
const ctx = withLastUiContext((current) => current);
|
|
8854
8854
|
if (!ctx) return;
|
|
8855
8855
|
try {
|
|
8856
|
-
const { openSubagentFleet } = await import("./chunk-
|
|
8856
|
+
const { openSubagentFleet } = await import("./chunk-FO2GIU5F.js");
|
|
8857
8857
|
await openSubagentFleet(ctx, state, { initialKey: itemKey, asyncDirRoot: DIRS.async, resultsDir: DIRS.results, fleetKeybindings: config.fleetKeybindings, inspectorPlugins: () => getInspectorPlugins(pi) });
|
|
8858
8858
|
} catch (error) {
|
|
8859
8859
|
if (isStaleExtensionContextError(error)) {
|
|
@@ -9062,7 +9062,7 @@ function registerSubagentExtension(pi) {
|
|
|
9062
9062
|
let executor;
|
|
9063
9063
|
let executorPromise;
|
|
9064
9064
|
let executorModulePromise;
|
|
9065
|
-
const loadExecutorModule = () => executorModulePromise ??= import("./chunk-
|
|
9065
|
+
const loadExecutorModule = () => executorModulePromise ??= import("./chunk-V4543APA.js");
|
|
9066
9066
|
const getExecutor = () => {
|
|
9067
9067
|
executorPromise ??= loadExecutorModule().then(({ createSubagentExecutor }) => {
|
|
9068
9068
|
executor = createSubagentExecutor(executorDeps);
|
|
@@ -9076,7 +9076,7 @@ function registerSubagentExtension(pi) {
|
|
|
9076
9076
|
modulePreloadTimer = setTimeout(() => {
|
|
9077
9077
|
loadExecutorModule().catch(() => {
|
|
9078
9078
|
});
|
|
9079
|
-
if (fleetViewEnabled) import("./chunk-
|
|
9079
|
+
if (fleetViewEnabled) import("./chunk-FO2GIU5F.js").catch(() => {
|
|
9080
9080
|
});
|
|
9081
9081
|
}, MODULE_PRELOAD_DELAY_MS);
|
|
9082
9082
|
modulePreloadTimer.unref?.();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isTrustedRecordedSessionFile,
|
|
3
3
|
resolveSubagentRunId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-464OJSDP.js";
|
|
5
5
|
import {
|
|
6
6
|
agentStreamOptions,
|
|
7
7
|
opencodeSessionHeaders,
|
|
8
8
|
resolveAsyncResumeTarget
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U753SUBC.js";
|
|
10
10
|
import {
|
|
11
11
|
ownsRun
|
|
12
12
|
} from "./chunk-HXRB42AF.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
reconcileAsyncRun,
|
|
19
19
|
resolveAuthorityDecision,
|
|
20
20
|
resolveMissionStoreLocation
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
22
22
|
import {
|
|
23
23
|
deliverInterruptRequest,
|
|
24
24
|
queueRevivalBrief,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-UUW7P6KJ.js";
|
|
27
27
|
import {
|
|
28
28
|
formatShellCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-72334PEI.js";
|
|
30
30
|
import {
|
|
31
31
|
readStatus,
|
|
32
32
|
redactSecretValues,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildWorkflowChatProgressRows
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-464OJSDP.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-U753SUBC.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-DHY5TY2Y.js";
|
|
38
38
|
import {
|
|
39
39
|
snapshotExternalRuns
|
|
40
40
|
} from "./chunk-UKG4V45O.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
projectRuntimeAcknowledgedExtensions,
|
|
4
4
|
registerSubagentPromptBoundary,
|
|
5
5
|
registerSubagentPromptRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7NDPDDJ.js";
|
|
7
7
|
import {
|
|
8
8
|
INSPECTOR_ACTIONS,
|
|
9
9
|
canQueueRetainedAsyncFollowUp,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
updateSteeringTarget,
|
|
26
26
|
waitForSteeringAction,
|
|
27
27
|
workflowAsyncChildSteeringGuidance
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-RHKIP45B.js";
|
|
29
29
|
import {
|
|
30
30
|
PLACED_RESTORE_UNSUPPORTED,
|
|
31
31
|
formatHerdrMachineRunnerUnsupported,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
workflowScriptDigest,
|
|
120
120
|
workflowStopCause,
|
|
121
121
|
writeWorkflowReceipt
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-DNDNLHTL.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-62OHSCQ6.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-464OJSDP.js";
|
|
149
149
|
import {
|
|
150
150
|
RunFanoutLimitError,
|
|
151
151
|
annotateWorkflowPreflightTrace,
|
|
@@ -209,7 +209,7 @@ import {
|
|
|
209
209
|
writeRunFanoutBudgetDescriptor,
|
|
210
210
|
writeWorkflowLaunchRecord,
|
|
211
211
|
writeWorktreeSetupHandoff
|
|
212
|
-
} from "./chunk-
|
|
212
|
+
} from "./chunk-U753SUBC.js";
|
|
213
213
|
import {
|
|
214
214
|
NATIVE_SUPERVISOR_TOOL_NAME,
|
|
215
215
|
createNativeSupervisorChannel,
|
|
@@ -256,7 +256,7 @@ import {
|
|
|
256
256
|
resolveDisabledFeatureSurface,
|
|
257
257
|
resolveMaxActiveAsyncRunsPerSession,
|
|
258
258
|
transferActiveAsyncCapacity
|
|
259
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-4KQW5R6U.js";
|
|
260
260
|
import {
|
|
261
261
|
DEFAULT_STALE_TERMINAL_ACTIVE_MARKER_MS,
|
|
262
262
|
MACHINE_DIFF_OPTIONS,
|
|
@@ -329,6 +329,7 @@ import {
|
|
|
329
329
|
sanitizeProcessTerminal,
|
|
330
330
|
shouldDeferWorktreeCwd,
|
|
331
331
|
snapshotNestedEventFiles,
|
|
332
|
+
unobservedRunnerExitPath,
|
|
332
333
|
updateActiveRunIndex,
|
|
333
334
|
updateForegroundNestedProjection,
|
|
334
335
|
updateMission,
|
|
@@ -343,7 +344,7 @@ import {
|
|
|
343
344
|
writeNestedControlRequest,
|
|
344
345
|
writeNestedControlResult,
|
|
345
346
|
writeNestedEvent
|
|
346
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
347
348
|
import {
|
|
348
349
|
closeSteerInbox,
|
|
349
350
|
consumeSteerRequests,
|
|
@@ -375,7 +376,7 @@ import {
|
|
|
375
376
|
resolvePiLaunchToolPlan,
|
|
376
377
|
resolveRuntimeModulePath,
|
|
377
378
|
supervisorChannelDir
|
|
378
|
-
} from "./chunk-
|
|
379
|
+
} from "./chunk-AHGJSJYY.js";
|
|
379
380
|
import {
|
|
380
381
|
assertRequiredChildExtensionsAdmitted,
|
|
381
382
|
createRequiredChildExtensionIdentity,
|
|
@@ -387,8 +388,8 @@ import {
|
|
|
387
388
|
import {
|
|
388
389
|
HERDR_PROJECT_PANE_ACTIONS,
|
|
389
390
|
handleHerdrProjectPaneAction
|
|
390
|
-
} from "./chunk-
|
|
391
|
-
import "./chunk-
|
|
391
|
+
} from "./chunk-JEYG7CNC.js";
|
|
392
|
+
import "./chunk-72334PEI.js";
|
|
392
393
|
import {
|
|
393
394
|
PROJECT_SUBAGENTS_RELATIVE_DIR,
|
|
394
395
|
appendJsonl,
|
|
@@ -3329,6 +3330,7 @@ function executeAsyncSingle(id, params) {
|
|
|
3329
3330
|
...capabilityCeiling ? { capabilityCeiling } : {},
|
|
3330
3331
|
agent,
|
|
3331
3332
|
task: taskText,
|
|
3333
|
+
...params.label ? { label: params.label } : {},
|
|
3332
3334
|
...agentConfig.runner ? { runner: agentConfig.runner } : {},
|
|
3333
3335
|
...singleClaudeCodeOverride ? { claudeCodeOverrideArgs: singleClaudeCodeOverride.args } : {},
|
|
3334
3336
|
...machine ? { machine } : {},
|
|
@@ -3452,7 +3454,7 @@ function executeAsyncSingle(id, params) {
|
|
|
3452
3454
|
chainStepCount: 1,
|
|
3453
3455
|
...lane ? { lane } : {},
|
|
3454
3456
|
...launcher ? { launcher } : {},
|
|
3455
|
-
steps: [{ agent, status: "pending", ...lane ? { lane } : {}, ...model ? { model } : {}, ...contextLimit !== void 0 ? { contextLimit } : {} }]
|
|
3457
|
+
steps: [{ agent, status: "pending", ...params.label ? { label: params.label } : {}, ...lane ? { lane } : {}, ...model ? { model } : {}, ...contextLimit !== void 0 ? { contextLimit } : {} }]
|
|
3456
3458
|
},
|
|
3457
3459
|
path5.join(asyncDir, "status.json"),
|
|
3458
3460
|
launchParentSessionId,
|
|
@@ -5381,7 +5383,7 @@ async function runSingleAttempt(runtimeCwd, agent, task, model, options, shared)
|
|
|
5381
5383
|
assertThinkingWithinCeiling({ model: modelArg, configThinking: effectiveThinking, ceiling: options.thinkingCeiling, agent: agent.name, runId: options.runId });
|
|
5382
5384
|
const expectedModelForVerification = shared.verifyModel ? modelArg : void 0;
|
|
5383
5385
|
const resolvedThinking = resolveEffectiveThinking(modelArg, effectiveThinking);
|
|
5384
|
-
const childSessionName = deriveChildSessionName({ agent: agent.name, task: shared.originalTask ?? task });
|
|
5386
|
+
const childSessionName = deriveChildSessionName({ agent: agent.name, task: shared.originalTask ?? task, label: options.label });
|
|
5385
5387
|
const watchdogConfig = resolveWatchdogConfig(options.cwd ?? runtimeCwd);
|
|
5386
5388
|
const childWatchdog = watchdogConfig.ok ? resolveChildWatchdogConfig({
|
|
5387
5389
|
config: watchdogConfig.config,
|
|
@@ -6612,7 +6614,7 @@ async function runSyncCompletionInner(runtimeCwd, agents, agentName, task, optio
|
|
|
6612
6614
|
...options,
|
|
6613
6615
|
capabilityCeiling: intersectSubagentCapabilityCeilings(options.capabilityCeiling ?? resolveCurrentSubagentCapabilityCeiling(options.parentSessionId), options.childRuntime?.capabilityCeiling)
|
|
6614
6616
|
};
|
|
6615
|
-
const childSessionName = deriveChildSessionName({ agent: agentName, task });
|
|
6617
|
+
const childSessionName = deriveChildSessionName({ agent: agentName, task, label: options.label });
|
|
6616
6618
|
const agent = agents.find((a) => a.name === agentName);
|
|
6617
6619
|
if (!agent) {
|
|
6618
6620
|
const diagnosticContext = options.unknownAgentDiagnosticContext ?? unknownAgentDiagnosticContext(discoverAgents(path10.resolve(options.cwd ?? runtimeCwd), "both"));
|
|
@@ -8450,6 +8452,7 @@ function formatRunLifecycleDebug(input) {
|
|
|
8450
8452
|
`Status file: ${path15.join(asyncDir, "status.json")}`,
|
|
8451
8453
|
status.workflowReceiptPath ? `Workflow receipt: ${status.workflowReceiptPath}` : void 0,
|
|
8452
8454
|
`Process terminal file: ${path15.join(asyncDir, "process-terminal.json")}`,
|
|
8455
|
+
`Unobserved runner exit file: ${unobservedRunnerExitPath(asyncDir)}`,
|
|
8453
8456
|
`Session: ${status.sessionId ?? "unknown"}`,
|
|
8454
8457
|
`State: ${status.state}`,
|
|
8455
8458
|
`Mode: ${status.mode}`,
|
|
@@ -12732,6 +12735,8 @@ async function runAsyncPath(data, deps) {
|
|
|
12732
12735
|
runFanoutBudget: data.runFanoutBudget,
|
|
12733
12736
|
parentWorkflowRunId: params.workflowParentRunId,
|
|
12734
12737
|
workflowKey: params.workflowKey,
|
|
12738
|
+
// Top-level calls pass unknown keys through; only a workflow child's label is normalized.
|
|
12739
|
+
label: params.workflowParentRunId !== void 0 ? params.label : void 0,
|
|
12735
12740
|
lane: params.lane,
|
|
12736
12741
|
workflowAwaitAsync: params.workflowAwaitAsync
|
|
12737
12742
|
}));
|
|
@@ -13325,6 +13330,7 @@ async function runSinglePath(data, deps) {
|
|
|
13325
13330
|
runFanoutBudget: params.runFanoutAdmitted ? data.runFanoutBudget : { ...data.runFanoutBudget, parentPath: `${data.runFanoutBudget.parentPath ? `${data.runFanoutBudget.parentPath}/` : ""}single` },
|
|
13326
13331
|
cwd: singleCwd,
|
|
13327
13332
|
requestedCwd: data.requestedCwd,
|
|
13333
|
+
label: params.workflowParentRunId !== void 0 ? params.label : void 0,
|
|
13328
13334
|
signal,
|
|
13329
13335
|
abortedAsStopped: params.workflowParentRunId !== void 0,
|
|
13330
13336
|
interruptSignal: interruptController.signal,
|
|
@@ -13973,6 +13979,9 @@ function prepareWorkflowLaunchParams(workflowDefaults, childParams, parentWorkfl
|
|
|
13973
13979
|
...options.suppressRoutineResultIntercom ? { suppressRoutineResultIntercom: true } : {},
|
|
13974
13980
|
...capabilityCeiling ? { capabilityCeiling } : {}
|
|
13975
13981
|
};
|
|
13982
|
+
const label = typeof childParams.label === "string" ? childParams.label.trim() : "";
|
|
13983
|
+
if (label) launchParams.label = label;
|
|
13984
|
+
else delete launchParams.label;
|
|
13976
13985
|
if (launchParams.extensionBindings !== void 0) launchParams.extensionBindings = normalizeExtensionBindings(launchParams.extensionBindings).value;
|
|
13977
13986
|
const normalizedGate = normalizeGateParams(launchParams);
|
|
13978
13987
|
if (!normalizedGate.ok) throw new Error(normalizedGate.error);
|
|
@@ -16703,7 +16712,7 @@ ${item.text}` } : item)
|
|
|
16703
16712
|
}
|
|
16704
16713
|
if (workflowLaunchObserver) {
|
|
16705
16714
|
const singleTask = hasTasks && effectiveParams.tasks?.length === 1 ? effectiveParams.tasks[0] : void 0;
|
|
16706
|
-
const singleSessionName = hasSingle ? deriveChildSessionName({ agent: effectiveParams.agent, task: effectiveParams.task }) : singleTask ? deriveChildSessionName({ agent: singleTask.agent, task: singleTask.task }) : void 0;
|
|
16715
|
+
const singleSessionName = hasSingle ? deriveChildSessionName({ agent: effectiveParams.agent, task: effectiveParams.task, label: effectiveParams.label }) : singleTask ? deriveChildSessionName({ agent: singleTask.agent, task: singleTask.task }) : void 0;
|
|
16707
16716
|
const launch = hasSingle ? { agent: effectiveParams.agent, ...singleSessionName ? { sessionName: singleSessionName } : {}, sessionFile: childSessionFileForTask(effectiveParams.agent, 0, effectiveParams.model), async: effectiveAsync, runId: effectiveAsync ? asyncRunId : runId } : singleTask ? { agent: singleTask.agent, ...singleSessionName ? { sessionName: singleSessionName } : {}, sessionFile: childSessionFileForTask(singleTask.agent, 0, singleTask.model), async: effectiveAsync, runId: effectiveAsync ? asyncRunId : runId } : void 0;
|
|
16708
16717
|
if (launch) {
|
|
16709
16718
|
workflowLaunchObservers.delete(params);
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
resolveCurrentSessionId,
|
|
15
15
|
resolveWatchdogReviewModel,
|
|
16
16
|
startWatchdogDiffBaselineCapture
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-62OHSCQ6.js";
|
|
18
18
|
import {
|
|
19
19
|
agentStreamOptions,
|
|
20
20
|
opencodeSessionHeaders
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-U753SUBC.js";
|
|
22
22
|
import {
|
|
23
23
|
registerNativeSupervisorClient
|
|
24
24
|
} from "./chunk-VEEUXJDO.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-HXRB42AF.js";
|
|
28
28
|
import {
|
|
29
29
|
inheritedNestedRouteOf
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
31
31
|
import {
|
|
32
32
|
CHILD_WATCHDOG_STATUS_EVENT,
|
|
33
33
|
DEFAULT_WAIT_TOOL_NAME,
|
package/bundle/index.js
CHANGED
|
@@ -17,7 +17,7 @@ function readInstalledPackageVersion() {
|
|
|
17
17
|
var loadedPackageVersion = readInstalledPackageVersion();
|
|
18
18
|
|
|
19
19
|
// index.ts
|
|
20
|
-
var registerExtension = process.env[HERDR_PI_MODE_ENV] === "1" ? (await import("./chunk-
|
|
20
|
+
var registerExtension = process.env[HERDR_PI_MODE_ENV] === "1" ? (await import("./chunk-4X3T5CPK.js")).default : process.env.PI_SUBAGENT_CHILD === "1" ? void 0 : (await import("./chunk-LODNNILA.js")).default;
|
|
21
21
|
function registerSubagentExtension(pi) {
|
|
22
22
|
const installedVersion = readInstalledPackageVersion();
|
|
23
23
|
if (installedVersion !== loadedPackageVersion) {
|
package/bundle/preflight.js
CHANGED
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
import "./chunk-Q4VH72JI.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4KQW5R6U.js";
|
|
10
10
|
import {
|
|
11
11
|
nestedResultsPath,
|
|
12
12
|
processTerminalCandidatePath,
|
|
13
13
|
processTerminalPath,
|
|
14
|
-
resultFilePath
|
|
15
|
-
|
|
14
|
+
resultFilePath,
|
|
15
|
+
unobservedRunnerExitPath
|
|
16
|
+
} from "./chunk-DHY5TY2Y.js";
|
|
16
17
|
import {
|
|
17
18
|
applyIntercomBridgeToAgent,
|
|
18
19
|
resolveIntercomBridge,
|
|
@@ -26,7 +27,7 @@ import {
|
|
|
26
27
|
import {
|
|
27
28
|
applyThinkingSuffix,
|
|
28
29
|
resolvePiLaunchToolPlan
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AHGJSJYY.js";
|
|
30
31
|
import {
|
|
31
32
|
assertRequiredChildExtensionsAdmitted,
|
|
32
33
|
resolveRequiredChildExtensions
|
|
@@ -409,7 +410,8 @@ async function resolveSubagentLaunchContract(input) {
|
|
|
409
410
|
statusPath: path.join(lifecycleAsyncDir, "status.json"),
|
|
410
411
|
eventsPath: path.join(lifecycleAsyncDir, "events.jsonl"),
|
|
411
412
|
processTerminalPath: processTerminalPath(lifecycleAsyncDir),
|
|
412
|
-
processTerminalCandidatePath: processTerminalCandidatePath(lifecycleAsyncDir)
|
|
413
|
+
processTerminalCandidatePath: processTerminalCandidatePath(lifecycleAsyncDir),
|
|
414
|
+
unobservedRunnerExitPath: unobservedRunnerExitPath(lifecycleAsyncDir)
|
|
413
415
|
}
|
|
414
416
|
},
|
|
415
417
|
protocol: {
|
package/bundle/project-panes.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
openProjectPane,
|
|
9
9
|
projectPaneBindingPath,
|
|
10
10
|
readProjectPaneBinding
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-JEYG7CNC.js";
|
|
12
|
+
import "./chunk-72334PEI.js";
|
|
13
13
|
import "./chunk-77VQEATI.js";
|
|
14
14
|
import "./chunk-LWH7IGI3.js";
|
|
15
15
|
import "./chunk-JEZOSEWG.js";
|
package/docs/observability.md
CHANGED
|
@@ -120,7 +120,7 @@ Default keys:
|
|
|
120
120
|
- `↑`/`↓` or `j`/`k` — select a child
|
|
121
121
|
- `K`/`J` (Shift+k / Shift+j) — scroll output one line
|
|
122
122
|
- `PgUp`/`PgDn` — scroll output one body viewport page (structured headers stay pinned)
|
|
123
|
-
- `x`/`Ctrl+O` — toggle tool details
|
|
123
|
+
- `x`/`Ctrl+O` — toggle tool details, including the full `bash` command (multiline commands show every line)
|
|
124
124
|
- `r` — refresh
|
|
125
125
|
- `Esc` — close
|
|
126
126
|
- `Enter` — open the selected inspectable async child through the available Inspect plugin
|
|
@@ -271,6 +271,8 @@ Lifecycle artifacts include `process-terminal-candidate.json` (private runner ev
|
|
|
271
271
|
|
|
272
272
|
A proof is `observed` only after the live parent observes the exact detached runner's `close` event and any tracked canonical-session lease is free. Children run inside the runner process, so the candidate records no separate writer processes. If the observer is unavailable, the proof is `unknown`; do not infer process exit from `endedAt`, result-file existence, PID disappearance, or lease-directory absence.
|
|
273
273
|
|
|
274
|
+
When a finished run's runner PID is confirmed dead and `process-terminal.json` is still `pending`, for example because the Pi that launched it has exited, a status read writes `process-terminal-unobserved.json` with an `unknown` proof (reason `observer-unavailable`). It never touches `process-terminal.json`; status readers report it only while `process-terminal.json` is still `pending` for the same runner, so a close that is observed later still wins.
|
|
275
|
+
|
|
274
276
|
The `subagent:process-terminal` event and RPC `ping.capabilities.processTerminalProof` expose this status. Process proof is point-in-time evidence and remains separate from execution success or stopped/non-resumable state.
|
|
275
277
|
|
|
276
278
|
### Child session events
|