import type { Usage } from "../../shared/types.ts"; /** * Retry delays for child processes that exit before any model or tool activity. * The schedule is intentionally short and bounded to avoid amplifying persistent * launch failures while allowing concurrent Pi startup locks to clear. */ export declare const SUBAGENT_STARTUP_RETRY_DELAYS_MS: readonly [250, 750, 1500]; /** A genuine startup race should fail well before a model request can complete. */ export declare const MAX_SUBAGENT_STARTUP_FAILURE_DURATION_MS = 2000; export interface SubagentStartupFailureEvidence { exitCode: number | null | undefined; error?: string; finalOutput?: string; messageCount: number; toolCount: number; usage: Usage; durationMs: number; protocolError?: unknown; processSignal?: string | null; observedMutationAttempt?: boolean; detached?: boolean; interrupted?: boolean; timedOut?: boolean; stopped?: boolean; turnBudgetExceeded?: boolean; } /** * Classify only unexplained, zero-activity child exits as startup failures. * This intentionally fails closed: any model output, tool activity, usage, * mutation evidence, diagnostic, or lifecycle interruption prevents a retry. */ export declare function isRetryableSubagentStartupFailure(evidence: SubagentStartupFailureEvidence): boolean; export declare function formatSubagentStartupRetryNote(input: { model: string; attempt: number; maxAttempts: number; delayMs: number; }): string; export declare function formatSubagentStartupRetryExhaustedError(input: { model: string; attempts: number; }): string; /** Wait for a retry delay, returning false when any lifecycle signal aborts it. */ export declare function waitForSubagentStartupRetry(delayMs: number, signals: Array): Promise; //# sourceMappingURL=subagent-startup-retry.d.ts.map