Skip to content
Français

WorkflowDecision

import type { WorkflowDecision } from "@elie-laloum/outpost";
  • proofOptional
    WorkflowDecisionProof | undefined
    Ed25519 proof from signWorkflowDecision() over this exact decision. A signed gate requires it; a proof sent to an unsigned gate is verified too, so it also needs a decisionVerifier.
  • executionIdRequired
    string
    executionId of the run that paused the gate, from its WorkflowResult; any other value rejects the whole batch.
  • keyRequired
    string
    Key of the gate task being decided.
  • requestIdRequired
    string
    id of the gate’s pending request (WorkflowPauseRequest.id); a stale or unknown id rejects the whole batch.
  • actionRequired
    "resume" | "approve" | "reject"
    approve for an approval gate, resume for a pause gate, or reject for either. reject skips dependent tasks and fails the run.
  • actorRequired
    string
    One of the gate’s actors. Outpost trusts this name unless the gate is signed, in which case the proof’s key must be bound to it.
  • reasonRequired
    string
    Nonblank explanation of the decision, kept in the checkpoint.
export interface WorkflowDecision {
  readonly proof?: WorkflowDecisionProof;
  readonly executionId: string;
  readonly key: string;
  readonly requestId: string;
  readonly action: "approve" | "resume" | "reject";
  readonly actor: string;
  readonly reason: string;
}