0.12.0 API reference
This page corresponds to Git tag v0.12.0. See docs.rs 0.12.0 for complete signatures.
Feature flags
FlowEngine
Construction uses in_memory(), new(store, runtime), or builder(runtime). The builder configures store, observer, RuntimeBuildCompatibility, and maximum replay iterations.
start_with_id() is idempotent when run ID, definition, and input match. Changed authority returns RunConflict.
FlowRuntime
WorkflowInvocation carries run ID, definition, input, and history and creates a helper through context(). StepInvocation carries run ID, step ID, handler name, input, and history.
Context reads
There are no signal, first-class child, continuation, or patch query methods.
Runtime commands
The 0.12.0 RuntimeCommand variants form the complete closed set.
Retry
RetryPolicy::none() runs once. RetryPolicy::fixed(max_attempts, delay) uses fixed delay. continue_workflow_on_failure() leaves exhaustion for workflow handling.
StepCommand::new() and with_retry() construct batch members. This release has no exponential backoff type.
Definitions and snapshots
WorkflowSpec contains name, definition version, and RuntimeSpec and may pin RuntimeBuildId through with_runtime_build(). RuntimeBuildCompatibility describes builds admitted by a worker.
WorkflowRunSnapshot aggregates WorkflowRunStatus, steps, waits, hooks, cancellation, progress, external child operations, and WorkflowTerminalOutcome. Child projections include StepSnapshot, WaitSnapshot, HookSnapshot, and ScheduledWakeup.
HookMetadata and HookCallbackRoute provide callback audit and host routing metadata. They do not create an HTTP server.
Stores
FlowEventStore requires append, expected-sequence append, ordered complete list, and run enumeration. Active-hook and scheduled-wakeup lookups are public contracts.
SQL backends migrate in connect(). 0.12.0 has no separate PostgreSQL migration or verify-only constructors.
Scheduling and tasks
FlowScheduler provides next_wakeup(), next_wakeup_delay(), and enqueue_due_work(). FlowSchedulerTick returns due waits, due retries, and dispatch count.
The task layer exposes FlowTask, FlowTaskDispatcher, FlowTaskQueue, FlowTaskLease, FlowTaskOutcome, and FlowWorker.
Built-in queues are InMemoryFlowTaskQueue, LocalFileFlowTaskQueue, and optional PostgresFlowTaskQueue. RuntimeBuildTaskRouter selects a dispatcher by pinned build. BootFlowTaskManager requires the boot feature.
Observation
FlowEventObserver receives events after commit. Public implementations and adapters include NoopFlowEventObserver, InMemoryFlowEventObserver, FanoutFlowEventObserver, LocalFileA3sFlowEventSink, A3sFlowEventBridge, and the in-memory sink.
Observation output cannot decide workflow state. Run IDs and hook tokens do not belong in metric dimensions.
Native TypeScript
NativeTsRuntime supports output limits, compilation timeout, invocation timeout, and preflight(). 0.12.0 has no NativeTsDependencyMode, compiler-capability protocol, or dependency-manifest type.
The host-supplied compiler accepts compile <entrypoint> -o <artifact>. The artifact accepts --a3s-flow-runtime and exchanges JSON over standard input and output.
Error categories
Identity, replay, and build errors require corrected configuration or code. Do not retry them indefinitely as transient failures.
