# `Alloy.Transcript`
[🔗](https://github.com/alloy-ex/alloy/blob/v0.16.0/lib/alloy/transcript.ex#L1)

Explicit validation and repair of client tool-call/result pairing.

Accepts normalized `Alloy.Message` structs. Block keys may be atoms or
strings. Provider-owned server tools are left untouched. Call IDs must be
unique within a round; reuse in a later round is allowed.

`repair/1` supplies error results for missing outcomes before the next
conversational message, or at the end. It preserves existing outcomes and
never executes tools. Duplicate, orphaned, or malformed calls/results are
ambiguous and cannot be repaired. Neither function runs automatically.

# `issue`

```elixir
@type issue() :: %{kind: atom(), id: term()}
```

# `repair`

```elixir
@spec repair([Alloy.Message.t()]) :: {:ok, [Alloy.Message.t()]} | {:error, [issue()]}
```

Supplies explicitly interrupted outcomes for missing results only.

# `validate`

```elixir
@spec validate([Alloy.Message.t()]) :: :ok | {:error, [issue()]}
```

Checks tool pairing, returning all detected issues.

---

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