# `SquidSonar.Runs`
[🔗](https://github.com/dark-trench/squid_sonar/blob/main/lib/squid_sonar/runs.ex#L1)

Read boundary for Squidie workflow runs.

LiveViews should call this module instead of calling `Squidie` directly.
That keeps runtime access, error handling, and view shaping in one place.

# `option`

```elixir
@type option() ::
  {:client, module()} | {:squidie, keyword()} | {:action_registry, term()}
```

# `approve_run`

```elixir
@spec approve_run(term(), map(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Approves a paused approval step and resumes through success path.

# `cancel_run`

```elixir
@spec cancel_run(term(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Cancels an eligible workflow run.

# `get_run`

```elixir
@spec get_run(term(), [option()]) ::
  {:ok, SquidSonar.Runs.RunDetail.t()} | {:error, term()}
```

Fetches one run with runtime snapshot, graph projection, and diagnostic explanation.

# `list_runs`

```elixir
@spec list_runs(
  keyword(),
  [option()]
) :: {:ok, [SquidSonar.Runs.RunSummary.t()]} | {:error, term()}
```

Lists recent runs as UI-friendly summaries.

# `reject_run`

```elixir
@spec reject_run(term(), map(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Rejects a paused approval step and resumes through rejection path.

# `replay_run`

```elixir
@spec replay_run(term(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Replays a completed or failed workflow run.

# `resume_run`

```elixir
@spec resume_run(term(), map(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Resumes a paused workflow run.

# `start_spec`

```elixir
@spec start_spec(term(), map(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Starts a run from a host-provided runtime workflow spec.

# `start_workflow`

```elixir
@spec start_workflow(module(), map(), [option()]) ::
  {:ok, Squidie.ReadModel.Inspection.Snapshot.t()} | {:error, term()}
```

Starts a run from a host-provided Squidie workflow module.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
