# `Minga.Extension.Instance.StartContext`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/extension/instance/start_context.ex#L1)

Phase-owned state for one extension start transition.

# `t`

```elixir
@type t() :: %Minga.Extension.Instance.StartContext{
  previous: term(),
  runtime: Minga.Extension.Instance.Runtime.t() | nil,
  stop_waiters: [GenServer.from()],
  waiters: [GenServer.from()],
  worker: Minga.Extension.Instance.Worker.t() | nil
}
```

# `begin_work`

```elixir
@spec begin_work(t(), Minga.Extension.Instance.Worker.t()) :: t()
```

Records the bounded worker performing the transition.

# `finish_work`

```elixir
@spec finish_work(t()) :: t()
```

Clears completed or failed worker bookkeeping.

# `join`

```elixir
@spec join(t(), GenServer.from()) :: t()
```

Adds a caller waiting for the in-flight start.

# `new`

```elixir
@spec new([GenServer.from()], term()) :: t()
```

Starts a transition with its callers and previous phase.

# `queue_stop`

```elixir
@spec queue_stop(t(), GenServer.from()) :: t()
```

Queues a stop caller behind the in-flight start.

# `runtime_exited`

```elixir
@spec runtime_exited(t()) :: t()
```

Clears runtime and worker ownership after the runtime exits during start.

# `runtime_started`

```elixir
@spec runtime_started(t(), Minga.Extension.Instance.Runtime.t()) :: t()
```

Records the runtime started by the transition.

---

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