# `MingaAgent.RemoteAPI.AttachResult`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/remote_api/attach_result.ex#L1)

Attach result returned by the remote API broker.

# `role`

```elixir
@type role() :: :driver | :viewer
```

# `t`

```elixir
@type t() :: %MingaAgent.RemoteAPI.AttachResult{
  events: [MingaAgent.EventLog.EventRecord.t()],
  latest_event_id: non_neg_integer(),
  messages: [MingaAgent.Message.t()],
  metadata: MingaAgent.SessionMetadata.t(),
  pid: pid(),
  role: role(),
  session_id: String.t(),
  snapshot: MingaAgent.Session.editor_snapshot(),
  token: String.t()
}
```

# `new`

```elixir
@spec new(
  MingaAgent.RemoteAPI.SessionInfo.t(),
  role(),
  [MingaAgent.Message.t()],
  MingaAgent.Session.editor_snapshot(),
  keyword()
) :: t()
```

Creates an attach result from session info and snapshot data.

---

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