# `Spectre.Inference.Stream`
[🔗](https://github.com/elchemista/spectre/blob/0.4.0/lib/spectre/inference/stream.ex#L1)

One-shot, pull-driven inference stream.

The handle is intentionally process-free: it carries only logical fences
plus a bearer token used to authorize attach and control operations. The
live session is resolved through a unique Registry. It is an ephemeral
capability, not a durable or persistable continuation. Recovery returns a
replacement handle with a fresh epoch.

Delta events are provisional. Only the terminal `%Spectre.Result{}` has
passed the normal post-processing and canonical Run commit.

# `t`

```elixir
@opaque t()
```

# `await_result`

```elixir
@spec await_result(t(), timeout()) :: {:ok, Spectre.Result.t()} | {:error, term()}
```

Waits for the committed terminal Run result without exposing deltas.

When no Enumerable has claimed the handle, this call becomes its one
authoritative consumer and drains provider events internally. When an
Enumerable is already active, it only waits for that consumer's terminal
result. Repeated calls are idempotent for the session's retention window.

# `cancel`

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

Cancels the current stream attempt. The operation is idempotent.

# `steer`

```elixir
@spec steer(t(), term(), keyword()) :: {:ok, t()} | {:error, term()}
```

Commits restart-based steering and returns a replacement Enumerable.

The current stream never follows the successor epoch; it terminates with
`:superseded` when the Instance accepts the command.

---

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