Skip to content
Français

QueueResult

import type { QueueResult } from "@elie-laloum/outpost";
  • valueRequired
    WorkflowJson
    JSON value produced by the handler, at most 262144 bytes serialized; runQueueWorker() stores null when the handler throws.
  • usageOptional
    Usage | undefined
    Token counters (input, output, cached, cacheCreated) that defineQueuedTask() adds to the workflow’s usage.
  • errorOptional
    string | undefined
    Failure message, at most 512 characters; its presence marks the job failed. runQueueWorker() fills it from a thrown error.
  • quotaOptional
    QueueQuota | undefined
    Usage or rate limit that failed the handler, with its reset time and captured conversation when known; requires error.
export interface QueueResult {
  readonly value: WorkflowJson;
  readonly usage?: Usage;
  readonly error?: string;
  /** Present when the handler failed on a usage or rate limit. */
  readonly quota?: QueueQuota;
}