Package-level declarations
Types
Policy for handling duplicate chain IDs when enqueueing a TaskChain.
Persistent store for TaskChain progress.
Platform conditions that must be satisfied before a task can execute.
Persists task completion events to durable storage so they survive app termination.
Marks an API as experimental in KMPWorker.
Fluent builder for constructing a configured KmpWorker instance.
Global configuration for KMPWorker behaviour.
Base class for all exceptions thrown by KMPWorker.
Pluggable logging interface for KMPWorker.
Rate limiter for controlling concurrent task execution.
Pure retry delay calculator. Stateless — no side effects.
Defines how a failed task should be retried.
Defines a sequential chain of background tasks where each step must succeed before the next one begins. Progress is persisted at every step boundary, so if the app is killed mid-chain (e.g., iOS 30-second limit), execution resumes from the correct step on next launch.
Fluent DSL builder for constructing TaskChains.
Drives the execution of a TaskChain by observing TaskMonitor and advancing the chain one step at a time.
A directed acyclic graph (DAG) of tasks with dependency edges.
DSL builder for TaskGraph.
Executes a TaskGraph respecting dependency ordering.
Broadcasts task state changes across the application.
Task execution priority hint.
Thread-safe global registry mapping task IDs to their suspend handler functions.
Describes a background task to be scheduled.
Builder for configuring individual TaskRequests within a chain DSL.
Collects execution metrics for background tasks.
Properties
Functions
Builds and enqueues a TaskChain using a fluent DSL.
Decodes a raw JSON string into a strongly-typed object. Useful when you have the payload String directly (e.g., from logging or testing).
Decodes the payload of this TaskExecutionContext into a strongly-typed object.
Returns the step IDs decoded from a ChainProgress.stepsJson.
Enqueues a task with exponential backoff using Duration-based delay.
Filters to only TaskState.Failed states.
Enqueues a task with linear retry using Duration-based delay.
Invokes action when the task reaches TaskState.Cancelled.
Registers and enqueues a one-time task in a single call.
Invokes action when the task reaches TaskState.Failed.
Invokes action whenever progress is reported via TaskState.Running with non-null progress.
Invokes action when the task is stopped due to timeout.
Registers and enqueues a periodic task using a Duration interval.
Filters to only TaskState.Running states that carry progress info.
Filters to only TaskState.Success states.
Filters to only terminal states.
Encodes data as JSON and attaches it as the payload for this TaskRequest.