Public entrypoint for the Squid Mesh runtime.
The API exposed here stays focused on declarative workflow operations. Host applications start, inspect, and later control runs through this surface without needing to work directly with persistence internals.
Summary
Functions
Approves a paused approval step and resumes the run through its success path.
Requests cancellation for an eligible workflow run.
Loads Squid Mesh configuration from the application environment with optional runtime overrides.
Loads Squid Mesh configuration and raises if required keys are missing.
Fetches one workflow run by id.
Lists workflow runs with optional filters.
Rejects a paused approval step and resumes the run through its rejection path.
Creates a new run from a prior run and links it to the original run.
Starts a new workflow run with the given payload through the workflow's default trigger.
Starts a new workflow run through a named trigger with the given payload.
Resumes a run that is intentionally paused for manual intervention.
Functions
@spec approve_run(Ecto.UUID.t(), map(), keyword()) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}
Approves a paused approval step and resumes the run through its success path.
@spec cancel_run( Ecto.UUID.t(), keyword() ) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error()}
Requests cancellation for an eligible workflow run.
@spec config(keyword()) :: {:ok, SquidMesh.Config.t()} | {:error, {:missing_config, [atom()]}}
Loads Squid Mesh configuration from the application environment with optional runtime overrides.
@spec config!(keyword()) :: SquidMesh.Config.t()
Loads Squid Mesh configuration and raises if required keys are missing.
@spec inspect_run( Ecto.UUID.t(), keyword() ) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]}}
Fetches one workflow run by id.
@spec list_runs( SquidMesh.RunStore.list_filters(), keyword() ) :: {:ok, [SquidMesh.Run.t()]} | {:error, {:missing_config, [atom()]}}
Lists workflow runs with optional filters.
@spec reject_run(Ecto.UUID.t(), map(), keyword()) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}
Rejects a paused approval step and resumes the run through its rejection path.
@spec replay_run( Ecto.UUID.t(), keyword() ) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.replay_error()} | {:error, {:dispatch_failed, term()}}
Creates a new run from a prior run and links it to the original run.
@spec start_run(module(), map()) :: {:ok, SquidMesh.Run.t()} | {:error, {:missing_config, [atom()]}} | {:error, SquidMesh.RunStore.create_error()} | {:error, {:dispatch_failed, term()}}
Starts a new workflow run with the given payload through the workflow's default trigger.
@spec start_run(module(), map(), keyword()) :: {:ok, SquidMesh.Run.t()} | {:error, {:missing_config, [atom()]}} | {:error, SquidMesh.RunStore.create_error()} | {:error, {:dispatch_failed, term()}}
@spec start_run(module(), atom(), map()) :: {:ok, SquidMesh.Run.t()} | {:error, {:missing_config, [atom()]}} | {:error, SquidMesh.RunStore.create_error()} | {:error, {:dispatch_failed, term()}}
Starts a new workflow run through a named trigger with the given payload.
@spec start_run(module(), atom(), map(), keyword()) :: {:ok, SquidMesh.Run.t()} | {:error, {:missing_config, [atom()]}} | {:error, SquidMesh.RunStore.create_error()} | {:error, {:dispatch_failed, term()}}
@spec unblock_run(Ecto.UUID.t()) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}
Resumes a run that is intentionally paused for manual intervention.
@spec unblock_run( Ecto.UUID.t(), keyword() ) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}
@spec unblock_run(Ecto.UUID.t(), map()) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}
@spec unblock_run(Ecto.UUID.t(), map(), keyword()) :: {:ok, SquidMesh.Run.t()} | {:error, :not_found | {:missing_config, [atom()]} | SquidMesh.RunStore.transition_error() | term()}