/** * The `transportMeta.engineOverride` record: written when a rate limit moves a * session onto a stand-in engine, read back when the window it named expires. * * Both halves live here because they are the only two things that have to agree * about the record's shape, and about what a swap takes away. Engine and model * are taken together — a model id belongs to exactly one provider, so a codex pin * left on a session claude is now running is a turn that cannot be served * (`model_not_found`) — so they are given back together too. */ import type { Employee, JinnConfig, Session } from "../shared/types.js"; /** Per-engine config as this module reads it; unconfigured engines resolve to {}. */ type EngineConfig = { bin?: string; model?: string; effortLevel?: string; childEffortOverride?: string; }; /** What the stand-in runs as, once the session row has been flipped onto it. */ export interface EngineSubstitution { engineConfig: EngineConfig; /** The model to run, already known to be one the stand-in serves. */ model: string | undefined; effortLevel: string; /** The stand-in's own thread id, when it has one to resume. */ resumeSessionId: string | undefined; } /** * Flip a session onto the engine standing in for its limited one, and return what * that engine should run as — or `undefined` when the attempt fence was lost and * the caller should treat the turn as cancelled. */ export declare function beginEngineSubstitution(opts: { session: Session; attemptToken: string; config: JinnConfig; employee: Employee | undefined; substitute: string; until: Date; syncSince: string; lastError: string; }): EngineSubstitution | undefined; /** Restore the pre-rate-limit engine, and the model that belonged to it, once the * override window has expired. */ export declare function maybeRevertEngineOverride(session: Session): Session; export {}; //# sourceMappingURL=engine-override.d.ts.map