# `SquidMesh.Runtime.WorkflowAgent.Projection`
[🔗](https://github.com/ccarvalho-eng/squid_mesh/blob/main/lib/squid_mesh/runtime/workflow_agent/projection.ex#L1)

Rebuildable workflow-agent projection over one run-thread journal.

Dispatch completion is not treated as workflow progress here. A runnable is
applied only after the run thread records `:runnable_applied`, preserving the
durable ordering between dispatch results and workflow state transitions.

# `anomaly`

```elixir
@type anomaly() :: %{
  :reason =&gt; atom(),
  :entry_type =&gt; atom(),
  optional(:runnable_key) =&gt; String.t(),
  optional(:run_id) =&gt; String.t()
}
```

# `t`

```elixir
@type t() :: %SquidMesh.Runtime.WorkflowAgent.Projection{
  anomalies: [anomaly()],
  applied_runnable_keys: MapSet.t(String.t()),
  planned_runnables: %{optional(String.t()) =&gt; map()},
  run_id: String.t() | nil,
  status: atom(),
  terminal_status: atom() | nil,
  workflow: String.t() | nil
}
```

# `anomalies`

```elixir
@spec anomalies(t()) :: [anomaly()]
```

# `applied_runnable_keys`

```elixir
@spec applied_runnable_keys(t()) :: MapSet.t(String.t())
```

# `planned_runnable_key?`

```elixir
@spec planned_runnable_key?(t(), String.t()) :: boolean()
```

# `planned_runnable_keys`

```elixir
@spec planned_runnable_keys(t()) :: [String.t()]
```

# `rebuild`

```elixir
@spec rebuild([SquidMesh.Runtime.DispatchProtocol.Entry.t()]) :: t()
```

# `replay`

```elixir
@spec replay(t(), [SquidMesh.Runtime.DispatchProtocol.Entry.t()]) :: t()
```

# `status`

```elixir
@spec status(t()) :: atom()
```

# `terminal?`

```elixir
@spec terminal?(t()) :: boolean()
```

---

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