Skip to content
Français

DecisionEvent

import type { DecisionEvent } from "@elie-laloum/outpost";
  • kindRequired
    "decision"
    Decision lifecycle discriminator decision.
  • statusRequired
    "started" | "finished" | "failed"
    Started before the request, finished after validation, or failed when evaluation rejects.
  • providerRequired
    string
    Decision provider name; no credentials are included.
  • modelRequired
    string
    Requested model on start/failure and actual response model on success.
  • durationMsOptional
    number | undefined
    Elapsed evaluation time in milliseconds on completion or failure.
  • usageOptional
    Usage | undefined
    Validated normalized usage receipt when available.
  • truncatedOptional
    boolean | undefined
    Input truncation flag when the provider reports one.
  • codeOptional
    string | undefined
    Outpost fault code on a failed evaluation, when the error has one.
export interface DecisionEvent {
  readonly kind: "decision";
  readonly status: "started" | "finished" | "failed";
  readonly provider: string;
  readonly model: string;
  readonly durationMs?: number;
  readonly usage?: Usage;
  readonly truncated?: boolean;
  readonly code?: string;
}