Skip to content
Français

SpeculationDurability

import type { SpeculationDurability } from "@elie-laloum/outpost";
  • transporterRequired
    Transport
    Transport you own that stores the race under speculations/<sha256 of runId>.json with conditional writes, up to 16 MiB. createLocalTransport() under .outpost/storage is the usual choice.
  • runIdRequired
    string
    Stable nonempty name of the race. One coordinator owns it at a time; another speculate() call on it rejects until the owner returns or is recovered.
  • versionRequired
    string
    Nonempty version of your agents, validation and settings. With the repository, provider, candidate keys, briefs and budget, it must match the saved race, otherwise speculate() rejects.
  • resumeOptional
    "retry-incomplete" | undefined
    retry-incomplete replays candidates interrupted while running, with their side effects, as new attempts. Without it, a race with interrupted candidates rejects.
export interface SpeculationDurability {
  readonly transporter: Transport;
  readonly runId: string;
  readonly version: string;
  readonly resume?: "retry-incomplete";
}