Aller au contenu
English

FallbackAgent

import type { FallbackAgent } from "@elie-laloum/outpost";
  • kindRequis
    "fallback"
    Discriminant : fallback, pour une liste ordonnée de candidats plutôt qu’un agent unique.
  • agentsRequis
    readonly Agent[]
    Copie figée des candidats, dans l’ordre où ils sont essayés ; au moins deux, aucun n’étant lui-même un agent de secours.
  • onRequis
    readonly FallbackTrigger[]
    Copie figée des catégories d’échec qui font passer au candidat suivant ; tout autre échec est relancé.
export interface FallbackAgent {
  readonly kind: "fallback";
  /** Candidates in the order they are tried. */
  readonly agents: readonly Agent[];
  readonly on: readonly FallbackTrigger[];
}