0.13.1 API reference
This page corresponds to Git tag v0.13.1. Complete Rustdoc is available at docs.rs 0.13.1.
Feature flags
Engine
FlowEngineBuilder also provides with_store(), with_observer(), with_runtime_build_compatibility(), and with_max_replay_iterations(). 0.13.1 has no continuation or child-depth builder options.
External control
cancel() is the legacy name for force_cancel().
Runtime trait
WorkflowInvocation contains run ID, WorkflowSpec, initial JSON input, and complete history. context() returns the deterministic helper view. StepInvocation contains run ID, step ID, step name, input, and history.
WorkflowContext queries
The 0.13.1 context has no signal, first-class child, continuation, or patch queries.
WorkflowContext commands
This is the complete runtime-command set for this release. Do not match variants added by 1.0 in 0.13.1 code.
Step and retry types
RetryPolicy::none() permits one attempt. RetryPolicy::fixed(max_attempts, delay) uses a fixed delay. continue_workflow_on_failure() returns exhaustion to workflow code. Otherwise the default outcome is RetryExhausted.
StepCommand::new() constructs a batch member and with_retry() sets policy. 0.13.1 has no RetryBackoff or exponential constructor.
Definition, builds, and hooks
Snapshots
WorkflowRunSnapshot aggregates WorkflowRunStatus, steps, waits, hooks, cancellation request, progress, external child operations, and WorkflowTerminalOutcome.
Primary child projections are StepSnapshot, WaitSnapshot, HookSnapshot, CancellationRequestSnapshot, and ScheduledWakeup. They are read-only results from current history.
Stores
FlowEventStore exposes append, expected-sequence append, complete listing, run enumeration, active-hook lookup, and due-wakeup contracts.
Built-in backends are InMemoryEventStore, LocalFileEventStore, optional SqliteEventStore, and optional PostgresEventStore. SQL features also expose FlowHistoryRetentionPolicy, FlowHistoryHold, FlowHistoryRetentionReport, and FlowHistoryTombstone.
0.13.1 SQL constructors migrate while connecting and do not have separate migration and verify-only entry points.
Scheduling, tasks, and workers
Observation
FlowEventObserver receives FlowEventEnvelope after commit. FanoutFlowEventObserver combines observers, InMemoryFlowEventObserver supports tests, and LocalFileA3sFlowEventSink writes local audit output.
A3sFlowEventBridge maps complete envelopes into A3sFlowEvent. Observation never becomes replay authority.
Native TypeScript
NativeTsRuntime supports with_output_limits(), with_compile_timeout(), with_invocation_timeout(), with_dependency_mode(), and preflight().
Important errors
Concurrent event races return EventConflict, run-definition conflicts return RunConflict, replay drift returns NonDeterministic, and hook redelivery drift returns HookConflict. Build admission and routing return RuntimeBuildUnavailable and RuntimeBuildRouteNotFound respectively.
Do not retry these errors uniformly. Identity and replay conflicts need corrected inputs or workflow code. Build failures need corrected worker routing.
