Skip to content
Français

RunDispatch

import type { RunDispatch } from "@elie-laloum/outpost/observation";
  • idRequired
    string
    Dispatch observation identity; multiple task dispatches retain distinct records.
  • taskKeyOptional
    string | undefined
    Owning workflow task key from the dispatch scope, absent for standalone requests.
  • attemptOptional
    number | undefined
    Owning workflow task attempt from the dispatch scope.
  • statusRequired
    "failed" | "done" | "cancelled" | "running"
    Latest dispatch lifecycle outcome, independent of the enclosing workflow status.
  • agentOptional
    string | undefined
    Most recently observed agent name from a phase or fallback event.
  • phaseOptional
    string | undefined
    Most recently observed main-agent phase; subagent phases do not replace it.
  • branchOptional
    string | undefined
    Observed named branch, when provided by phase or completion events.
  • completedOptional
    boolean | undefined
    Whether the dispatch reached its completion contract, reported only at settlement.
  • commitsRequired
    readonly Commit[]
    Commits reported at dispatch settlement, including retained recovery commits on failure.
  • usageRequired
    Usage
    Live summed pass usage, replaced by authoritative dispatch usage at settlement.
  • passesRequired
    readonly RunPass[]
    Per-pass accounting used to avoid counting cumulative reports and summaries twice.
  • errorOptional
    RunError | undefined
    Classified terminal dispatch error, when execution failed or was cancelled.
export interface RunDispatch {
  readonly id: string;
  readonly taskKey?: string;
  readonly attempt?: number;
  readonly status: "running" | "done" | "failed" | "cancelled";
  readonly agent?: string;
  readonly phase?: string;
  readonly branch?: string;
  readonly completed?: boolean;
  readonly commits: readonly Commit[];
  readonly usage: Usage;
  readonly passes: readonly RunPass[];
  readonly error?: RunError;
}