# `Jido.Composer.Workflow.Machine`
[🔗](https://github.com/lostbean/jido_composer/blob/main/lib/jido/composer/workflow/machine.ex#L1)

Pure FSM struct at the heart of a Workflow.

The Machine holds the current state, transition rules, node bindings,
accumulated context, and execution history. All operations are pure
functions — no side effects.

# `t`

```elixir
@type t() :: %Jido.Composer.Workflow.Machine{
  context: Jido.Composer.Context.t(),
  history: [{atom(), atom(), integer()}],
  nodes: %{required(atom()) =&gt; struct()},
  status: atom(),
  terminal_states: MapSet.t(),
  transitions: %{required({atom(), atom()}) =&gt; atom()}
}
```

# `apply_result`

```elixir
@spec apply_result(t(), map() | Jido.Composer.NodeIO.t() | term()) :: t()
```

# `current_node`

```elixir
@spec current_node(t()) :: struct() | nil
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

# `terminal?`

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

# `transition`

```elixir
@spec transition(t(), atom()) :: {:ok, t()} | {:error, term()}
```

---

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