StepResult

sealed class StepResult

The full snapshot returned from Engine.startSession and every Session.next. It is the durable source of truth for transaction id, workflow, the next action, blockers, recoverable failures, and terminal outcomes.

Inheritors

Types

Link copied to clipboard
data class Blocked(val transactionId: String, val workflow: WorkflowProgress, val blocker: StepBlocker) : StepResult

A host-owned blocker (e.g. a missing runtime permission) prevents the next step. The host resolves it, then calls Session.next.

Link copied to clipboard
data class Failed(val transactionId: String, val workflow: WorkflowProgress?, val error: EngineError, val recoverable: Boolean, val retryAction: RetryAction?) : StepResult

The call failed. A recoverable failure is retried as retryAction says, which is set exactly when recoverable is. A non-recoverable one can't be retried: the host ends the verification.

Link copied to clipboard
data class Finished(val transactionId: String, val workflow: WorkflowProgress?, val outcome: SessionOutcome, val lastStepOutput: StepOutput? = null) : StepResult

Verification has reached a terminal outcome. A later Session.next call returns this result again.

Link copied to clipboard
data class Ready(val transactionId: String, val workflow: WorkflowProgress, val action: StepAction, val lastStepOutput: StepOutput? = null) : StepResult

The session is at a stable point. The caller inspects action, renders any needed UI, then calls Session.next.

Properties

Link copied to clipboard

Output of the step the backend just moved past (e.g. StepOutput.CardScan), delivered once. Only a Ready or a Finished carries one; it is null for steps with no host-facing output.

Link copied to clipboard
abstract val transactionId: String
Link copied to clipboard
abstract val workflow: WorkflowProgress?

The latest workflow snapshot; null on a Failed or Finished that came before the backend sent one.