Skip to content
Français

DispatchResult

import type { DispatchResult } from "@elie-laloum/outpost";
  • observerErrorsOptional
    readonly unknown[] | undefined
    Sink and journal failures collected during the dispatch; they do not affect success. With a shared hub, also includes its earlier failures.
  • branchRequired
    string
    Work branch of this dispatch.
  • directoryRequired
    string
    Host worktree directory of this dispatch.
  • commitsRequired
    readonly Commit[]
    Commits created during the dispatch, as oid and subject; with several passes, the commits of every pass.
  • transcriptOptional
    string | undefined
    Host path of the captured native transcript, when the agent’s conversation was captured.
  • transcriptReferenceOptional
    TransportReference | undefined
    Pinned remote index for the final captured conversation, when using transported conversation storage.
  • logReferenceOptional
    TransportReference | undefined
    Versioned journal index for readJournal, for both local and remote persistence. Absent when logging is disabled or directed to stdout.
  • retainedDirectoryOptional
    string | undefined
    Worktree kept after closing because it was detached or held uncommitted changes.
  • fallbackOptional
    FallbackRecord | undefined
    Present only when the dispatch used a fallback agent: the candidate that produced this result and the candidates that stopped before it.
  • resumeRequired
    <U = undefined>(options: ContinuationOptions<U>) => Promise<DispatchResult<U>>
    Continue this conversation in a new cold dispatch with the agent that produced it; your options are merged over the original ones. Fails when no conversation was captured.
  • forkRequired
    <U = undefined>(options: ContinuationOptions<U>) => Promise<DispatchResult<U>>
    Continue a copy of this conversation in a new cold dispatch, leaving the original unchanged. Fails when no conversation was captured.
  • textRequired
    string
    Text of every turn of the execution, joined with newlines, including response repair turns.
  • turnsRequired
    readonly Turn[]
    Every turn in order, including response repairs and turns resumed by steering.
  • usageRequired
    Usage
    Token counters summed over every turn; not a cost.
  • conversationOptional
    string | undefined
    Native conversation id of the last turn, when the agent reported one.
  • valueRequired
    T
    Parsed and validated response; undefined without a response option.
  • completedRequired
    boolean
    True when the last turn’s text contains a completion marker, or when a typed response was validated.
  • completionOptional
    string | undefined
    Completion marker found in the last turn’s text.
export interface DispatchResult<T> extends Execution<T> {
  readonly observerErrors?: readonly unknown[];
  readonly branch: string;
  readonly directory: string;
  readonly commits: readonly Commit[];
  readonly transcript?: string;
  readonly transcriptReference?: TransportReference;
  readonly logReference?: TransportReference;
  readonly retainedDirectory?: string;
  /** Candidate that ran and candidates that failed before it, for fallback agents. */
  readonly fallback?: FallbackRecord;
  resume<U = undefined>(
    options: ContinuationOptions<U>,
  ): Promise<DispatchResult<U>>;
  fork<U = undefined>(
    options: ContinuationOptions<U>,
  ): Promise<DispatchResult<U>>;
}