import { Journal } from "./journal.js";
import { Fixture, HandlerDefaults, VideoResponse } from "./types.js";
import * as http$1 from "node:http";

//#region src/veo-video.d.ts
declare const VEO_VIDEO_MAX_ENTRIES = 10000;
type VeoVideoStatus = "pending" | "in_progress" | "completed" | "failed";
interface VeoVideoReplayJob {
  kind: "replay";
  operationName: string;
  status: VeoVideoStatus;
  pollCount: number;
  pollsBeforeInProgress: number;
  pollsBeforeCompleted: number;
  video: VideoResponse["video"];
  /** Latch for the empty-`error` authoring warn on failed polls (once/job). */
  emptyErrorWarned?: boolean;
}
interface VeoVideoRecordJob {
  kind: "record";
  operationName: string;
  status: VeoVideoStatus;
  upstreamOperationName: string;
  upstreamPollingUrl: string;
  match: Fixture["match"];
  capturing?: boolean;
}
type VeoVideoJob = VeoVideoReplayJob | VeoVideoRecordJob;
/**
 * Per-testId job state for the Veo video handler. Mirrors OpenRouterVideoJobMap
 * (openrouter-video.ts): lazy TTL eviction on `get`, FIFO eviction of the
 * oldest entries on `set` when over capacity, delete-before-set TTL refresh,
 * monotonic world-generation counter for reset-mid-flight detection, no
 * background sweep timer. Keys are `${testId}:${operationName}`.
 */
declare class VeoVideoJobMap {
  private readonly entries;
  private worldGeneration;
  get generation(): number;
  get(key: string): VeoVideoJob | undefined;
  set(key: string, job: VeoVideoJob): void;
  delete(key: string): boolean;
  clear(): void;
  get size(): number;
}
declare function handleVeoVideoCreate(req: http$1.IncomingMessage, res: http$1.ServerResponse, raw: string, model: string, fixtures: Fixture[], journal: Journal, defaults: HandlerDefaults, setCorsHeaders: (res: http$1.ServerResponse) => void, jobs: VeoVideoJobMap): Promise<void>;
declare function handleVeoVideoStatus(req: http$1.IncomingMessage, res: http$1.ServerResponse, operationName: string, fixtures: Fixture[], journal: Journal, defaults: HandlerDefaults, setCorsHeaders: (res: http$1.ServerResponse) => void, jobs: VeoVideoJobMap): Promise<void>;
//#endregion
export { VEO_VIDEO_MAX_ENTRIES, VeoVideoJobMap, handleVeoVideoCreate, handleVeoVideoStatus };
//# sourceMappingURL=veo-video.d.ts.map