import type { EngineResult } from "../../shared/types.js"; import { type PartialStreamWriter } from "../partial-stream.js"; import type { TurnHeartbeat } from "./heartbeat.js"; import type { TurnInput, TurnPlan, TurnSurface } from "./types.js"; /** One engine invocation plus the context that was built for it. */ export interface EngineAttempt { result: EngineResult; fingerprint: string; contextRefresh: string | undefined; systemPrompt: string; } export interface EngineAttemptArgs { input: TurnInput; plan: TurnPlan; surface: TurnSurface; heartbeat: TurnHeartbeat; partialStream: PartialStreamWriter; turnStartedAt: number; model: string | undefined; } /** * Run the engine once for this turn. The system prompt is rebuilt per attempt * because a model fallback changes the platform context, and the context * fingerprint recorded against the resumed engine session must match the prompt * the engine actually saw. */ export declare function runEngineAttempt(args: EngineAttemptArgs): Promise; /** * Claude occasionally rejects a model that was valid when the session was * created. Re-read the registry once and name a live substitute rather than * failing the turn on a stale model id. Returns the model to retry with, or * undefined when this turn should stand as it is. */ export declare function resolveModelFallback(input: TurnInput, plan: TurnPlan, result: EngineResult, modelForTurn: string | undefined): Promise; //# sourceMappingURL=engine-run.d.ts.map