Functions
Identity
Alias of ::session/Identity
Session
Alias of ::session/Session
capabilities
fn (name: Str, opts: Map?): TransportCapabilities
Build a TransportCapabilities record with sensible defaults.
ns
Alias of ::ai::agent::transport/
Transport-neutral shapes for chat-style AI agents.
Adapters turn native payloads (Slack Events API, Telegram updates,
custom webhooks, etc.) into IncomingMessage. Agent code can then
reason in terms of Session, Identity, text, message id, and a
transport tag carried in session.meta.transport.
session-bucket
fn (session: ::ai::session/Session): Str
Store bucket key for per-session counters and state. Session ids should already be transport-prefixed, so the id is sufficient.
session-transport
fn (session: ::ai::session/Session): Str
fn (session: ::ai::session/Session, default-transport: Str): Str
Read session.meta.transport, defaulting to unknown unless a caller supplies another default.
session-with-transport
fn (session: ::ai::session/Session, transport: Str): ::ai::session/Session
Stamp a Session with a transport tag in session.meta.transport.
transport-name
fn (transport: Str): Str
Return a stable, lower-case transport label for storage and source metadata.
Types
IncomingMessage
IncomingMessage type {
session: ::ai::session/Session,
sender: ::ai::session/Identity,
text: Str,
message-id: Str,
timestamp: Int,
voice: Map?,
raw: Any?
}
Normalized inbound message shape produced by transport adapters.
OutboundMessage
OutboundMessage type {
session: ::ai::session/Session,
text: Str,
reply-to: Str?,
metadata: Map?
}
Normalized outbound message request before a transport adapter renders or sends it.
TransportCapabilities
TransportCapabilities type {
name: Str,
markup: Str?,
supports-typing: Bool?,
supports-deeplink: Bool?,
supports-streaming: Bool?,
max-message-size: Int?,
reply-mode: Str?,
meta: Map?
}
Capability description for a transport implementation.
markup is an application-level hint such as html, mrkdwn,
plain, or json. reply-mode can describe whether the adapter
posts, threads, returns a webhook response, or streams.