# `Vibe.Gateway.Source`
[🔗](https://github.com/elixir-vibe/vibe/blob/v0.2.3/lib/vibe/gateway/source.ex#L1)

Origin metadata for a message entering Vibe through an external gateway.

Gateway adapters translate platform-specific updates into this struct before
they touch sessions. Keeping source identity explicit lets Telegram, future
chat backends, and scheduled delivery share one session-key and authorization
model without leaking platform SDK structs into agent code.

# `chat_type`

```elixir
@type chat_type() :: :dm | :group | :channel | :thread | :forum
```

# `t`

```elixir
@type t() :: %Vibe.Gateway.Source{
  chat_id: String.t(),
  chat_name: String.t() | nil,
  chat_topic: String.t() | nil,
  chat_type: chat_type(),
  message_id: String.t() | nil,
  platform: atom(),
  thread_id: String.t() | nil,
  user_id: String.t() | nil,
  user_name: String.t() | nil
}
```

# `description`

```elixir
@spec description(t()) :: String.t()
```

Returns a compact human-readable description for prompts and logs.

# `new`

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

Builds a source struct from platform identity fields.

---

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