Generalized suspension metadata for any reason a flow might pause.
Supersedes ApprovalRequest as the primary suspension primitive. HITL
becomes reason: :human_input with an embedded approval_request.
Supported Reasons
:human_input— waiting for a human decision (wraps ApprovalRequest):rate_limit— backoff due to rate limiting:async_completion— waiting for an external async operation:external_job— waiting for an external job/webhook:custom— application-defined reason
Summary
Types
@type reason() ::
:human_input | :rate_limit | :async_completion | :external_job | :custom
@type t() :: %Jido.Composer.Suspension{ approval_request: Jido.Composer.HITL.ApprovalRequest.t() | nil, created_at: DateTime.t(), id: String.t(), metadata: map(), reason: reason(), resume_signal: String.t() | nil, timeout: pos_integer() | :infinity, timeout_outcome: atom() }
Functions
@spec from_approval_request(Jido.Composer.HITL.ApprovalRequest.t()) :: {:ok, t()}