# `CliSubprocessCore.Runtime`
[🔗](https://github.com/nshkrdotcom/cli_subprocess_core/blob/v0.1.0/lib/cli_subprocess_core/runtime.ex#L1)

Runtime state helpers for normalized session event emission.

# `t`

```elixir
@type t() :: %CliSubprocessCore.Runtime{
  metadata: map(),
  profile: module(),
  provider: atom(),
  provider_session_id: String.t() | nil,
  sequence: non_neg_integer()
}
```

# `info`

```elixir
@spec info(t()) :: map()
```

Returns runtime metadata for observability and session inspection.

# `new`

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

Creates a new runtime state.

# `next_event`

```elixir
@spec next_event(
  t(),
  CliSubprocessCore.Event.kind(),
  CliSubprocessCore.Event.payload(),
  keyword()
) ::
  {CliSubprocessCore.Event.t(), t()}
```

Emits the next normalized event and increments the runtime sequence.

# `put_metadata`

```elixir
@spec put_metadata(t(), atom() | String.t(), term()) :: t()
```

Stores a single metadata key on the runtime state.

# `put_provider_session_id`

```elixir
@spec put_provider_session_id(t(), String.t() | nil) :: t()
```

Replaces the provider session identifier tracked by the runtime.

---

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