chore: reapply local customizations after upstream merge
- Reapply cron announce fix for non-default agents (expectsCompletionMessage) - Update pnpm patch from pi-ai 0.53.0 to 0.54.0 - Fix upstream TS bug: shadow variable in maybeMarkAuthProfileFailure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -247,7 +247,7 @@
|
||||
"sharp"
|
||||
],
|
||||
"patchedDependencies": {
|
||||
"@mariozechner/pi-ai@0.53.0": "patches/@mariozechner__pi-ai@0.53.0.patch"
|
||||
"@mariozechner/pi-ai@0.54.0": "patches/@mariozechner__pi-ai@0.54.0.patch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
861
pnpm-lock.yaml
generated
861
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -500,11 +500,11 @@ export async function runEmbeddedPiAgent(
|
||||
let lastRunPromptUsage: ReturnType<typeof normalizeUsage> | undefined;
|
||||
let autoCompactionCount = 0;
|
||||
let runLoopIterations = 0;
|
||||
const maybeMarkAuthProfileFailure = async (params: {
|
||||
const maybeMarkAuthProfileFailure = async (failureParams: {
|
||||
profileId?: string;
|
||||
reason?: Parameters<typeof markAuthProfileFailure>[0]["reason"] | null;
|
||||
}) => {
|
||||
const { profileId, reason } = params;
|
||||
const { profileId, reason } = failureParams;
|
||||
if (!profileId || !reason || reason === "timeout") {
|
||||
return;
|
||||
}
|
||||
@@ -513,7 +513,7 @@ export async function runEmbeddedPiAgent(
|
||||
profileId,
|
||||
reason,
|
||||
cfg: params.config,
|
||||
agentDir: params.agentDir,
|
||||
agentDir,
|
||||
});
|
||||
};
|
||||
try {
|
||||
|
||||
@@ -747,6 +747,14 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
return withRunSession({ status: "ok", summary, outputText, ...telemetry });
|
||||
}
|
||||
try {
|
||||
// Non-default agents (document-agent, command-agent, meta-agent) never
|
||||
// have an active main session during cron announce time, so the queue
|
||||
// path always returns "none" and the fallback method:"agent" callGateway
|
||||
// always times out (LLM runs take 20-60s, timeout is 15s). Use
|
||||
// expectsCompletionMessage:true for these agents so the fast
|
||||
// method:"send" path is used, which delivers the raw cron output to
|
||||
// Telegram directly within the timeout window.
|
||||
const isNonDefaultAgent = agentId !== defaultAgentId;
|
||||
const didAnnounce = await runSubagentAnnounceFlow({
|
||||
childSessionKey: agentSessionKey,
|
||||
childRunId: `${params.job.id}:${runSessionId}`,
|
||||
@@ -767,6 +775,7 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
endedAt: runEndedAt,
|
||||
outcome: { status: "ok" },
|
||||
announceType: "cron job",
|
||||
expectsCompletionMessage: isNonDefaultAgent,
|
||||
});
|
||||
if (didAnnounce) {
|
||||
delivered = true;
|
||||
|
||||
Reference in New Issue
Block a user