Vibe.Gateway.Source (vibe v0.2.3)

Copy Markdown View Source

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.

Summary

Functions

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

Builds a source struct from platform identity fields.

Types

chat_type()

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

t()

@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
}

Functions

description(source)

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

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

new(platform, opts)

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

Builds a source struct from platform identity fields.