Skip to content
Français

RunTask

import type { RunTask } from "@elie-laloum/outpost/observation";
  • keyRequired
    string
    Declared workflow task key, including tasks that have not started.
  • statusRequired
    TaskStatus
    Latest observed workflow task lifecycle state.
  • attemptsRequired
    number
    Cumulative attempts reported by the workflow, preserved through settled resumes.
  • usageRequired
    Usage
    Tokens reported through this task’s workflow context while observed; preserved when resuming the same projection. Restored tasks without prior observed counters carry complete false. Dispatch counters are not added again.
  • startedAtOptional
    string | undefined
    Task start time from lifecycle observations or workflow record snapshots.
  • finishedAtOptional
    string | undefined
    Last task settlement time from observations or workflow records.
  • errorOptional
    string | undefined
    Latest recorded task failure message; filtered by the observation hub’s redaction.
export interface RunTask {
  readonly key: string;
  readonly status: TaskStatus;
  readonly attempts: number;
  readonly usage: Usage;
  readonly startedAt?: string;
  readonly finishedAt?: string;
  readonly error?: string;
}