pi-subagents 0.51.0 → 0.52.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 +41 -0
- package/agents/oracle.md +3 -1
- package/agents/reviewer.md +1 -0
- package/agents/scout.md +2 -2
- package/agents/worker.md +2 -1
- package/docs/agents.md +8 -3
- package/docs/extension-api.md +1 -1
- package/docs/models.md +2 -0
- package/docs/observability.md +37 -1
- package/docs/workflows.md +2 -0
- package/package.json +1 -1
- package/skills/pi-subagents/SKILL.md +1 -0
- package/skills/pi-subagents/references/constraints-and-recipes.md +6 -2
- package/skills/pi-subagents/references/execution-controls.md +12 -1
- package/skills/pi-subagents/references/prompting-and-roles.md +2 -0
- package/src/agents/agent-management.ts +24 -6
- package/src/agents/agents.ts +37 -11
- package/src/agents/skills.ts +1 -1
- package/src/api/preflight.ts +5 -2
- package/src/extension/index.ts +1 -0
- package/src/extension/public-execution.ts +3 -1
- package/src/intercom/native-supervisor-channel.ts +2 -1
- package/src/missions/workflow-state.ts +2 -2
- package/src/runs/background/async-execution.ts +19 -9
- package/src/runs/background/async-resume.ts +19 -2
- package/src/runs/background/async-retention.ts +2 -4
- package/src/runs/background/completion-dedupe.ts +5 -1
- package/src/runs/background/completion-replay.ts +22 -12
- package/src/runs/background/fleet-view.ts +68 -19
- package/src/runs/background/inspect-rpc.ts +443 -0
- package/src/runs/background/notify.ts +28 -4
- package/src/runs/background/result-watcher.ts +44 -0
- package/src/runs/background/resume-guidance.ts +8 -5
- package/src/runs/background/scheduled-runs.ts +2 -0
- package/src/runs/background/subagent-runner.ts +3 -2
- package/src/runs/background/subagent-wait.ts +1 -1
- package/src/runs/background/wait-subscriptions.ts +1 -1
- package/src/runs/foreground/execution.ts +1 -1
- package/src/runs/foreground/subagent-executor.ts +239 -76
- package/src/runs/foreground/workflow-detach-reconcile.ts +194 -0
- package/src/runs/shared/acceptance.ts +4 -4
- package/src/runs/shared/external-job-bridge.ts +0 -6
- package/src/runs/shared/model-fallback.ts +77 -34
- package/src/runs/shared/session-lease.ts +0 -6
- package/src/runs/shared/worktree.ts +2 -1
- package/src/shared/types.ts +11 -0
- package/src/slash/slash-bridge.ts +2 -1
- package/src/slash/slash-commands.ts +18 -0
- package/src/watchdog/change-signature.ts +1 -1
- package/src/watchdog/lsp-diagnostics.ts +1 -0
- package/src/workflows/chat-progress.ts +1 -1
- package/src/workflows/scripted-workflow.ts +13 -2
- package/agents/gpt-pro.md +0 -17
|
@@ -1064,7 +1064,7 @@ async function exportSessionHtml(sessionFile: string, outputDir: string, piPacka
|
|
|
1064
1064
|
|
|
1065
1065
|
function createShareLink(htmlPath: string): { shareUrl: string; gistUrl: string } | { error: string } {
|
|
1066
1066
|
try {
|
|
1067
|
-
const auth = spawnSync("gh", ["auth", "status"], { encoding: "utf-8" });
|
|
1067
|
+
const auth = spawnSync("gh", ["auth", "status"], { encoding: "utf-8", windowsHide: true });
|
|
1068
1068
|
if (auth.status !== 0) {
|
|
1069
1069
|
return { error: "GitHub CLI is not logged in. Run 'gh auth login' first." };
|
|
1070
1070
|
}
|
|
@@ -1073,7 +1073,7 @@ function createShareLink(htmlPath: string): { shareUrl: string; gistUrl: string
|
|
|
1073
1073
|
}
|
|
1074
1074
|
|
|
1075
1075
|
try {
|
|
1076
|
-
const result = spawnSync("gh", ["gist", "create", htmlPath], { encoding: "utf-8" });
|
|
1076
|
+
const result = spawnSync("gh", ["gist", "create", htmlPath], { encoding: "utf-8", windowsHide: true });
|
|
1077
1077
|
if (result.status !== 0) {
|
|
1078
1078
|
const err = (result.stderr || "").trim() || "Failed to create gist.";
|
|
1079
1079
|
return { error: err };
|
|
@@ -4890,6 +4890,7 @@ async function runSubagent(
|
|
|
4890
4890
|
statusPayload.error = `Step failed: ${failedStep.agent}`;
|
|
4891
4891
|
}
|
|
4892
4892
|
}
|
|
4893
|
+
writeStatusPayload();
|
|
4893
4894
|
try {
|
|
4894
4895
|
runPersistence.write(resultPath, {
|
|
4895
4896
|
lifecycleArtifactVersion: SUBAGENT_LIFECYCLE_ARTIFACT_VERSION,
|
|
@@ -226,7 +226,7 @@ function summarizeForegroundChildren(run: ForegroundResumeRun, indices: Set<numb
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
function foregroundChildrenNeedingAttention(run: ForegroundResumeRun, indices: Set<number>) {
|
|
229
|
-
return run.children.filter((child) => indices.has(child.index) && child.status === "detached" && child.activityState === "needs_attention");
|
|
229
|
+
return run.children.filter((child) => indices.has(child.index) && child.status === "detached" && child.activityState === "needs_attention" && child.currentTool === "contact_supervisor");
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
function formatForegroundAttention(run: ForegroundResumeRun, children: ReturnType<typeof foregroundChildrenNeedingAttention>, elapsedMs: number): AgentToolResult<Details> {
|
|
@@ -217,7 +217,7 @@ export function createWaitSubscriptionManager(
|
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
const detached = run.children.filter((child) => child.status === "detached");
|
|
220
|
-
if (detached.some((child) => child.activityState === "needs_attention")) {
|
|
220
|
+
if (detached.some((child) => child.activityState === "needs_attention" && child.currentTool === "contact_supervisor")) {
|
|
221
221
|
settle(record, "needs attention", "Reply to the pending supervisor request or inspect the run status.");
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
@@ -1673,7 +1673,7 @@ async function runSyncCompletionInner(
|
|
|
1673
1673
|
agent.fallbackModels,
|
|
1674
1674
|
options.availableModels,
|
|
1675
1675
|
options.preferredModelProvider,
|
|
1676
|
-
{ scope: options.modelScope },
|
|
1676
|
+
{ scope: options.modelScope, primaryModelFromParent: options.modelOverrideFromParent },
|
|
1677
1677
|
);
|
|
1678
1678
|
const attemptedModels: string[] = [];
|
|
1679
1679
|
const modelAttempts: ModelAttempt[] = [];
|