Inbound routing boundary from raw adapter payloads into runtime ingest.
This module resolves adapter modules from bridge configuration, then:
- verifies/parses webhook requests via
Jido.Chat.Adapter - canonicalizes routing via
Jido.Chat.process_event/4 - persists message events through
Jido.Messaging.Ingest
Summary
Functions
Routes ingress through a canonical normalized outcome.
Routes a non-webhook payload through canonical event normalization.
Routes a webhook payload through bridge-config verification + event parsing.
Routes a webhook request and returns both typed HTTP response and ingest outcome.
Types
@type ingest_result() :: {:ok, {:message, Jido.Messaging.Message.t(), Jido.Messaging.Ingest.context(), Jido.Chat.EventEnvelope.t()}} | {:ok, {:duplicate, Jido.Chat.EventEnvelope.t()}} | {:ok, {:event, Jido.Chat.EventEnvelope.t()}} | {:ok, :noop} | {:error, term()}
@type route_ingress_result() :: {:ok, Jido.Messaging.IngressOutcome.t()} | {:error, term()}
@type webhook_result() :: {:ok, Jido.Chat.WebhookResponse.t(), ingest_result()} | {:error, term()}
Functions
@spec route_ingress( module(), String.t(), :webhook | :payload, map(), map(), keyword() ) :: route_ingress_result()
Routes ingress through a canonical normalized outcome.
Supported modes:
:webhook- verifies/parses request, dispatches event, formats webhook response:payload- normalizes payload events for listener-driven ingress
@spec route_payload(module(), String.t(), map(), keyword()) :: ingest_result()
Routes a non-webhook payload through canonical event normalization.
For transport listeners (polling, gateways, queues), this path supports:
- direct
EventEnvelopepayloads - adapter
parse_event/2normalization when available transform_incoming/1fallback for message payloads
@spec route_webhook(module(), String.t(), map(), keyword()) :: ingest_result()
Routes a webhook payload through bridge-config verification + event parsing.
Options
:headers- request headers map:path- request path:method- HTTP method:raw_body- raw body used by signature verification:ingest_opts- options passed toJido.Messaging.Ingest.ingest_incoming/5
Routes a webhook request and returns both typed HTTP response and ingest outcome.
request_meta accepts:
:headers- request headers map:path- request path:method- HTTP method:raw_body- raw body used by signature verification