pi-subagents 0.81.0 → 0.82.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 +38 -0
- package/bundle/agents.js +3 -3
- package/bundle/child-tool-plan.js +2 -2
- package/bundle/{chunk-LSRUTHT7.js → chunk-43SCHIMD.js} +1 -1
- package/bundle/{chunk-G5DKFLLI.js → chunk-4SDU2BZX.js} +15 -10
- package/bundle/{chunk-V2JWDB5U.js → chunk-52UBALJL.js} +2 -2
- package/bundle/{chunk-3DC5KBVP.js → chunk-5TYMSZX3.js} +1 -1
- package/bundle/{chunk-CEKS3TFO.js → chunk-7IVSUMQQ.js} +6 -6
- package/bundle/{chunk-KSWQVGDW.js → chunk-7PCKZHR5.js} +225 -18
- package/bundle/{chunk-563BHAZ5.js → chunk-7YMXOYEU.js} +33 -25
- package/bundle/{chunk-XMFLCKMQ.js → chunk-B5EKXDHE.js} +336 -130
- package/bundle/{chunk-ZBC44JJ3.js → chunk-CIZQXJ5Q.js} +22 -9
- package/bundle/{chunk-L5ZHE4L4.js → chunk-GC4DSPMH.js} +4 -4
- package/bundle/{chunk-ARRKBB2B.js → chunk-GJECHSAR.js} +2 -2
- package/bundle/{chunk-2ZSNH26H.js → chunk-M2CTFYT3.js} +7 -7
- package/bundle/{chunk-TUWLXTAM.js → chunk-MHZ4G23A.js} +681 -320
- package/bundle/{chunk-WSBNENFS.js → chunk-NGGAFDL6.js} +14 -4
- package/bundle/{chunk-VJHOELQP.js → chunk-NRQ75MGH.js} +160 -78
- package/bundle/{chunk-BJN5LUQY.js → chunk-OYF6AFDY.js} +1 -1
- package/bundle/{chunk-EYNJ6VL6.js → chunk-PLCCBLPY.js} +2 -2
- package/bundle/{chunk-74RT5YQE.js → chunk-RMQFMMAT.js} +123 -33
- package/bundle/{chunk-V6MR5TOQ.js → chunk-SIJ4S3EN.js} +25 -19
- package/bundle/{chunk-NNLASTQE.js → chunk-VH5OAWVG.js} +19 -5
- package/bundle/{chunk-BPS2AGBZ.js → chunk-W2SZ22EM.js} +93 -52
- package/bundle/{chunk-V3BIUPLU.js → chunk-WVD4UEL4.js} +256 -52
- package/bundle/{chunk-ZP3HODFH.js → chunk-XSWOTIA3.js} +1 -1
- package/bundle/{chunk-3IF2PGW7.js → chunk-YKEWIB4M.js} +1 -1
- package/bundle/{chunk-26C3WLYQ.js → chunk-ZLINIYTP.js} +497 -272
- package/bundle/{chunk-2XYWN7QJ.js → chunk-ZQGSDHL6.js} +2 -2
- package/bundle/control-channel.js +2 -2
- package/bundle/index.js +1 -1
- package/bundle/intercom-bridge.js +2 -2
- package/bundle/preflight.js +8 -8
- package/bundle/project-panes.js +3 -3
- package/docs/agents.md +31 -0
- package/docs/configuration.md +9 -1
- package/docs/tool-reference.md +3 -1
- package/docs/workflows.md +16 -0
- package/package.json +2 -2
- package/skills/pi-subagents/references/execution-controls.md +5 -4
- package/src/agents/agent-management.js +3 -3
- package/src/agents/agent-memory.js +3 -1
- package/src/agents/agents.js +6 -6
- package/src/agents/frontmatter.d.ts +2 -0
- package/src/agents/frontmatter.js +15 -1
- package/src/agents/skills.js +2 -1
- package/src/extension/config.js +3 -0
- package/src/extension/herdr-pi-bridge.js +17 -10
- package/src/extension/index.js +82 -2
- package/src/extension/schemas.js +3 -3
- package/src/intercom/native-supervisor-channel.js +20 -0
- package/src/missions/lifecycle.js +7 -1
- package/src/runs/background/active-async-capacity.d.ts +1 -0
- package/src/runs/background/active-async-capacity.js +9 -3
- package/src/runs/background/async-execution.js +20 -10
- package/src/runs/background/async-job-tracker.d.ts +6 -1
- package/src/runs/background/async-job-tracker.js +9 -4
- package/src/runs/background/async-status.d.ts +2 -0
- package/src/runs/background/async-status.js +21 -2
- package/src/runs/background/await-async-run.js +3 -7
- package/src/runs/background/boot-id.d.ts +12 -0
- package/src/runs/background/boot-id.js +47 -0
- package/src/runs/background/interrupted-elsewhere.d.ts +22 -0
- package/src/runs/background/interrupted-elsewhere.js +68 -0
- package/src/runs/background/notify.d.ts +2 -0
- package/src/runs/background/notify.js +13 -0
- package/src/runs/background/result-delivery-ownership.d.ts +6 -0
- package/src/runs/background/result-delivery-ownership.js +19 -1
- package/src/runs/background/result-watcher.d.ts +3 -1
- package/src/runs/background/result-watcher.js +24 -8
- package/src/runs/background/run-child-session.d.ts +1 -6
- package/src/runs/background/run-child-session.js +1 -1
- package/src/runs/background/run-status.js +2 -1
- package/src/runs/background/stale-run-reconciler.d.ts +25 -0
- package/src/runs/background/stale-run-reconciler.js +52 -13
- package/src/runs/background/subagent-runner-bootstrap.js +3 -0
- package/src/runs/background/subagent-runner.d.ts +4 -0
- package/src/runs/background/subagent-runner.js +13 -5
- package/src/runs/background/subagent-wait.d.ts +1 -1
- package/src/runs/background/subagent-wait.js +6 -1
- package/src/runs/background/terminal-run-index.d.ts +1 -0
- package/src/runs/background/terminal-run-index.js +4 -2
- package/src/runs/foreground/async-stop-action.js +3 -1
- package/src/runs/foreground/execution.js +6 -3
- package/src/runs/foreground/foreground-history.d.ts +16 -2
- package/src/runs/foreground/foreground-history.js +133 -31
- package/src/runs/foreground/subagent-executor.d.ts +11 -0
- package/src/runs/foreground/subagent-executor.js +277 -74
- package/src/runs/shared/child-launch.d.ts +2 -2
- package/src/runs/shared/child-session.d.ts +3 -2
- package/src/runs/shared/child-session.js +51 -8
- package/src/runs/shared/child-tool-plan.d.ts +7 -0
- package/src/runs/shared/child-tool-plan.js +21 -6
- package/src/runs/shared/herdr-connection.d.ts +17 -8
- package/src/runs/shared/herdr-connection.js +19 -7
- package/src/runs/shared/herdr-external-adapters.d.ts +3 -2
- package/src/runs/shared/herdr-external-adapters.js +1 -1
- package/src/runs/shared/herdr-machine.d.ts +12 -2
- package/src/runs/shared/herdr-machine.js +55 -9
- package/src/runs/shared/herdr-pane-host.d.ts +88 -0
- package/src/runs/shared/herdr-pane-host.js +155 -0
- package/src/runs/shared/herdr-placed-run.d.ts +27 -150
- package/src/runs/shared/herdr-placed-run.js +48 -395
- package/src/runs/shared/local-machine-access.d.ts +5 -0
- package/src/runs/shared/local-machine-access.js +28 -0
- package/src/runs/shared/orca-progress-tabs.d.ts +0 -1
- package/src/runs/shared/orca-progress-tabs.js +1 -24
- package/src/runs/shared/parallel-utils.d.ts +1 -1
- package/src/runs/shared/placed-run-owner.d.ts +49 -0
- package/src/runs/shared/placed-run-owner.js +93 -0
- package/src/runs/shared/placement-host.d.ts +99 -0
- package/src/runs/shared/placement-host.js +157 -0
- package/src/runs/shared/rex-machine.d.ts +25 -0
- package/src/runs/shared/rex-machine.js +83 -0
- package/src/runs/shared/rex-pane-host.d.ts +62 -0
- package/src/runs/shared/rex-pane-host.js +327 -0
- package/src/shared/completion-owner.d.ts +5 -0
- package/src/shared/completion-owner.js +5 -0
- package/src/shared/session-identity.d.ts +2 -0
- package/src/shared/session-identity.js +26 -0
- package/src/shared/types.d.ts +45 -6
- package/src/tui/fleet.d.ts +1 -0
- package/src/tui/fleet.js +24 -15
- package/src/tui/render.d.ts +6 -0
- package/src/tui/render.js +3 -3
- package/src/tui/subagent-messages.js +1 -0
- package/src/workflows/scripted-workflow.d.ts +1 -1
- package/src/workflows/workflow-auto-resume.d.ts +32 -0
- package/src/workflows/workflow-auto-resume.js +102 -0
- package/src/workflows/workflow-launch-record.d.ts +27 -0
- package/src/workflows/workflow-launch-record.js +48 -0
- package/src/workflows/workflow-resume-claim.d.ts +82 -0
- package/src/workflows/workflow-resume-claim.js +210 -0
- package/src/workflows/workflow-resume.d.ts +56 -0
- package/src/workflows/workflow-resume.js +106 -0
- package/src/workflows/workflow-reuse.d.ts +15 -9
- package/src/workflows/workflow-reuse.js +77 -14
- package/src/workflows/workflow-revival.d.ts +2 -0
- package/src/workflows/workflow-revival.js +2 -1
- package/src/workflows/workflow-stop-cause.d.ts +6 -0
- package/src/workflows/workflow-stop-cause.js +8 -0
|
@@ -307,6 +307,15 @@ function parseFrontmatterList(raw) {
|
|
|
307
307
|
return item.split(",");
|
|
308
308
|
}).map((value) => value.trim()).filter(Boolean);
|
|
309
309
|
}
|
|
310
|
+
function unquoteName(value) {
|
|
311
|
+
if (value.length >= 2 && (value.startsWith("'") && value.endsWith("'") || value.startsWith('"') && value.endsWith('"'))) {
|
|
312
|
+
return value.slice(1, -1);
|
|
313
|
+
}
|
|
314
|
+
return value;
|
|
315
|
+
}
|
|
316
|
+
function parseUnquotedList(raw) {
|
|
317
|
+
return parseFrontmatterList(raw)?.map(unquoteName);
|
|
318
|
+
}
|
|
310
319
|
function parseFrontmatter(content) {
|
|
311
320
|
const frontmatter = {};
|
|
312
321
|
const normalized = content.replace(/\r\n/g, "\n");
|
|
@@ -350,7 +359,10 @@ function parseFrontmatter(content) {
|
|
|
350
359
|
const [key, rawValueValue] = match.slice(1);
|
|
351
360
|
if (key === void 0 || rawValueValue === void 0) continue;
|
|
352
361
|
const rawValue = rawValueValue.trim();
|
|
353
|
-
const
|
|
362
|
+
const quote = rawValue[0];
|
|
363
|
+
const nameList = key === "tools" || key === "excludeTools" || key === "mutationTools" || key === "extensions" || key === "subagentOnlyExtensions";
|
|
364
|
+
const quotedList = nameList && (quote === '"' || quote === "'") && (rawValue.includes(`${quote},`) || rawValue.includes(`, ${quote}`));
|
|
365
|
+
const isQuoted = !quotedList && (quote === '"' || quote === "'") && rawValue.endsWith(quote);
|
|
354
366
|
const value = isQuoted ? rawValue.slice(1, -1) : rawValue;
|
|
355
367
|
const isFolded = !isQuoted && (rawValue === ">" || rawValue === ">-");
|
|
356
368
|
const isLiteral = !isQuoted && (rawValue === "|" || rawValue === "|-");
|
|
@@ -4045,7 +4057,8 @@ function readMemoryFile(memoryDir) {
|
|
|
4045
4057
|
let fd;
|
|
4046
4058
|
try {
|
|
4047
4059
|
const noFollow = typeof fs9.constants.O_NOFOLLOW === "number" ? fs9.constants.O_NOFOLLOW : 0;
|
|
4048
|
-
|
|
4060
|
+
const nonBlock = typeof fs9.constants.O_NONBLOCK === "number" ? fs9.constants.O_NONBLOCK : 0;
|
|
4061
|
+
fd = fs9.openSync(file, fs9.constants.O_RDONLY | noFollow | nonBlock);
|
|
4049
4062
|
} catch (error) {
|
|
4050
4063
|
const code = error && typeof error === "object" && "code" in error ? String(error.code) : "";
|
|
4051
4064
|
return code === "ELOOP" ? "unsafe" : null;
|
|
@@ -5691,11 +5704,11 @@ function loadAgentsFromDefinitionFiles(files, source, discoveryPriority, package
|
|
|
5691
5704
|
else if (frontmatter.advertise === "false") advertise = false;
|
|
5692
5705
|
else throw new Error(`Agent '${localName}' has invalid advertise frontmatter; expected true or false.`);
|
|
5693
5706
|
}
|
|
5694
|
-
const rawTools =
|
|
5707
|
+
const rawTools = parseUnquotedList(frontmatter.tools);
|
|
5695
5708
|
const parsedTools = splitToolList(rawTools);
|
|
5696
5709
|
const tools = parsedTools.tools ?? [];
|
|
5697
5710
|
const mcpDirectTools = parsedTools.mcpDirectTools ?? [];
|
|
5698
|
-
const excludeTools =
|
|
5711
|
+
const excludeTools = parseUnquotedList(frontmatter.excludeTools);
|
|
5699
5712
|
const parsedAllowedAgents = parseFrontmatterList(frontmatter.allowedAgents);
|
|
5700
5713
|
const allowedAgents = parsedAllowedAgents === void 0 ? void 0 : normalizeCapabilityCeilingAllowedAgents(parsedAllowedAgents);
|
|
5701
5714
|
const defaultReads = parseFrontmatterList(frontmatter.defaultReads);
|
|
@@ -5744,9 +5757,9 @@ function loadAgentsFromDefinitionFiles(files, source, discoveryPriority, package
|
|
|
5744
5757
|
if (frontmatter.acceptanceRole === "read-only" || frontmatter.acceptanceRole === "writer") acceptanceRole = frontmatter.acceptanceRole;
|
|
5745
5758
|
else throw new Error(`Agent '${localName}' has invalid acceptanceRole frontmatter; expected 'read-only' or 'writer'.`);
|
|
5746
5759
|
}
|
|
5747
|
-
const extensions = resolveAgentRelativeExtensionPaths(
|
|
5748
|
-
const subagentOnlyExtensions = resolveAgentRelativeExtensionPaths(
|
|
5749
|
-
const mutationTools =
|
|
5760
|
+
const extensions = resolveAgentRelativeExtensionPaths(parseUnquotedList(frontmatter.extensions), filePath);
|
|
5761
|
+
const subagentOnlyExtensions = resolveAgentRelativeExtensionPaths(parseUnquotedList(frontmatter.subagentOnlyExtensions), filePath);
|
|
5762
|
+
const mutationTools = parseUnquotedList(frontmatter.mutationTools);
|
|
5750
5763
|
let fast;
|
|
5751
5764
|
if (frontmatter.fast !== void 0) {
|
|
5752
5765
|
if (frontmatter.fast === "true") fast = true;
|
|
@@ -7824,7 +7837,7 @@ function readOptionalJsonFile(filePath, label) {
|
|
|
7824
7837
|
return JSON.parse(fs15.readFileSync(filePath, "utf-8"));
|
|
7825
7838
|
} catch (error) {
|
|
7826
7839
|
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
7827
|
-
if (code === "ENOENT") return null;
|
|
7840
|
+
if (code === "ENOENT" || code === "ENOTDIR") return null;
|
|
7828
7841
|
const message = error instanceof Error ? error.message : String(error);
|
|
7829
7842
|
throw new Error(`Failed to read ${label} '${filePath}': ${message}`, {
|
|
7830
7843
|
cause: error instanceof Error ? error : void 0
|
|
@@ -8393,7 +8406,7 @@ export {
|
|
|
8393
8406
|
resolveExternalCliRunnerStatus,
|
|
8394
8407
|
normalizeExternalCliRunnerStatus,
|
|
8395
8408
|
externalCliReceiptMetadata,
|
|
8396
|
-
|
|
8409
|
+
parseUnquotedList,
|
|
8397
8410
|
parseFrontmatter,
|
|
8398
8411
|
resolveSkills,
|
|
8399
8412
|
resolveSkillsWithFallback,
|
|
@@ -15,15 +15,15 @@ import {
|
|
|
15
15
|
resolveCurrentSessionId,
|
|
16
16
|
resolveWatchdogReviewModel,
|
|
17
17
|
startWatchdogDiffBaselineCapture
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-W2SZ22EM.js";
|
|
19
19
|
import {
|
|
20
20
|
MODEL_ONLY_TOOL,
|
|
21
21
|
agentStreamOptions,
|
|
22
22
|
opencodeSessionHeaders
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VH5OAWVG.js";
|
|
24
24
|
import {
|
|
25
25
|
inheritedNestedRouteOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NRQ75MGH.js";
|
|
27
27
|
import {
|
|
28
28
|
CHILD_WATCHDOG_STATUS_EVENT,
|
|
29
29
|
MISSING_STRUCTURED_ACCEPTANCE_REPORT_ERROR,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
toolBudgetSoftNudge,
|
|
40
40
|
validateAcceptanceReport,
|
|
41
41
|
validateStructuredOutputValue
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CIZQXJ5Q.js";
|
|
43
43
|
import {
|
|
44
44
|
INTERCOM_SESSION_IDENTITY_EVENT
|
|
45
45
|
} from "./chunk-5LFLVSTM.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendAgentRefinementOverlay
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PLCCBLPY.js";
|
|
4
4
|
import {
|
|
5
5
|
buildAgentMemoryInjection,
|
|
6
6
|
buildSkillInjection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CIZQXJ5Q.js";
|
|
8
8
|
|
|
9
9
|
// src/runs/shared/effective-system-prompt.ts
|
|
10
10
|
function appendSection(prompt, section) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildWorkflowChatProgressRows
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7PCKZHR5.js";
|
|
4
4
|
import {
|
|
5
5
|
aggregateStepStatus,
|
|
6
6
|
contextModeBadge,
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
projectWorkflowChecklist,
|
|
26
26
|
withCachedUiContext,
|
|
27
27
|
workflowGraphStageNodes
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VH5OAWVG.js";
|
|
29
29
|
import {
|
|
30
30
|
flatToLogicalStepIndex,
|
|
31
31
|
formatWorkflowJsonPreview,
|
|
32
32
|
hostStepReportName,
|
|
33
33
|
hostStepVerdictLabel
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-NRQ75MGH.js";
|
|
35
35
|
import {
|
|
36
36
|
snapshotExternalRuns
|
|
37
37
|
} from "./chunk-UKG4V45O.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
getSingleResultOutput,
|
|
50
50
|
shortenPath,
|
|
51
51
|
unresolvedChildWatchdogBlockers
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-CIZQXJ5Q.js";
|
|
53
53
|
import {
|
|
54
54
|
MAX_WIDGET_JOBS,
|
|
55
55
|
WIDGET_ANIMATION_INTERVAL_MS,
|
|
@@ -1029,12 +1029,11 @@ function shouldCollapseSingleChildDetails(job, step) {
|
|
|
1029
1029
|
if (job.status === "complete") return isCompletedWidgetStepStatus(step.status);
|
|
1030
1030
|
return false;
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function stepTaskSummary(step, agentName) {
|
|
1033
1033
|
const task = compactTaskText(step.description, step.label);
|
|
1034
1034
|
if (task) return task;
|
|
1035
1035
|
const sessionName = step.sessionName?.trim();
|
|
1036
1036
|
if (!sessionName) return void 0;
|
|
1037
|
-
const agentName = singleChildAgentName(job, step);
|
|
1038
1037
|
const sessionTask = stripRepeatedAgentPrefix(sessionName, agentName);
|
|
1039
1038
|
return sessionTask === agentName ? void 0 : compactTaskText(sessionTask);
|
|
1040
1039
|
}
|
|
@@ -1952,7 +1951,7 @@ function foregroundStyleWidgetStepLines(job, theme, step, itemTitle, index, tota
|
|
|
1952
1951
|
const lines = [`${rowIndent}${rowMarker}${widgetStepGlyph(step.status, theme, widgetStepRunningSeed(step, index - 1), frame, thinking)} ${themeBold(theme, rowLabel)}${contextModeBadge(theme, step.context)} ${theme.fg("dim", "\xB7")} ${status}${modelDisplay}${stats ? ` ${theme.fg("dim", "\xB7")} ${stats}` : ""}`];
|
|
1953
1952
|
const lane = projectAsyncLane(job, step);
|
|
1954
1953
|
if (lane) lines.push(...formatLaneProjectionLines(lane, theme, detailIndent));
|
|
1955
|
-
const task = collapseDetails ?
|
|
1954
|
+
const task = collapseDetails ? stepTaskSummary(step, displayName) : compactTaskText(step.description, step.label);
|
|
1956
1955
|
if (task) lines.push(`${detailIndent}${theme.fg("dim", `task: ${task}`)}`);
|
|
1957
1956
|
const activity = widgetStepActivityLine(step, width, expanded, job.updatedAt);
|
|
1958
1957
|
const currentPath = options?.includeCurrentPath && step.currentPath ? shortenPath(step.currentPath) : void 0;
|
|
@@ -4153,6 +4152,7 @@ export {
|
|
|
4153
4152
|
buildAsyncStatusSnapshotForState,
|
|
4154
4153
|
clearLegacyResultAnimationTimer,
|
|
4155
4154
|
widgetRenderKey,
|
|
4155
|
+
stepTaskSummary,
|
|
4156
4156
|
setInlineWorkflowCoverage,
|
|
4157
4157
|
renderWidget,
|
|
4158
4158
|
renderSubagentSummary,
|