Skip to content
Français

ReplayDivergence

import { ReplayDivergence } from "@elie-laloum/outpost";

OutpostError with code replay, thrown when a replay differs from its journal. kind, turn, expected, actual and commit locate the difference; details holds the same fields.

Complete example and detailed rules.

  • kindRequired
    ReplayDivergenceKind
    Divergence category: prompt, baseline, tree, exhausted or unrecorded.
  • turnRequired
    number
    One-based index of the recorded turn being replayed.
  • expectedRequired
    string | undefined
    Recorded value: prompt text, tree ID or the reason the workspace commits were not recorded.
  • actualRequired
    string | undefined
    Value observed during replay: rendered prompt, tree ID or Git apply error.
  • commitRequired
    string | undefined
    Recorded commit whose patch or tree diverged, for tree divergences.
  • recoveryRequired
    Readonly<Record<string, unknown>>
    Locations of work retained after the failure, such as branch, directory, commits, transcript, logReference or conversation; empty when nothing was retained. A remote synchronization failure puts its transfer directory in details.recovery instead.
  • codeRequired
    FaultCode
    Stable Outpost fault category used for programmatic failure handling.
  • detailsRequired
    Readonly<Record<string, unknown>>
    Frozen diagnostics for the code: status, stdout, stderr and conversation for a failed agent process; status and retryAfterMs (the minimum wait of a task retry) for an HTTP model error; resetAt for a quota, and fallback when every fallback candidate hit one. unavailable marks an outage for unavailableFault(), including a timeout after an agent reported a connection failure.
  • nameRequired
    string
    Error class name used to distinguish this failure from other JavaScript errors.
  • messageRequired
    string
    Human-readable explanation of the failure.
  • stackOptional
    string | undefined
    JavaScript stack trace for the error, when available.
  • causeOptional
    unknown
    Underlying failure this error wraps; quotaFault() and unavailableFault() follow this chain.
export declare class ReplayDivergence extends OutpostError {
  readonly kind: ReplayDivergenceKind;
  readonly turn: number;
  readonly expected: string | undefined;
  readonly actual: string | undefined;
  readonly commit: string | undefined;
  constructor(details: ReplayDivergenceDetails);
}