ChatSurfaceAdapter
Auto-generated API reference for ChatSurfaceAdapter.
Interface: ChatSurfaceAdapter
Defined in: chat-trigger.ts:134
Surface adapter contract. An adapter wraps a provider SDK (Bolt,
discord.js, Bot Framework) and turns raw inbound events into the
normalized ChatSurfaceEvent. Returning null from parse is a
deliberate skip β the trigger emits a 'skipped' observer event
and returns a 200 so the surface stops retrying.
#Properties
#parse
parse: (
req) =>ChatSurfaceEvent|Promise<ChatSurfaceEvent | null> |null
Defined in: chat-trigger.ts:137
Parse an inbound webhook into a normalized event. Return null to ignore.
#Parameters
req
#Returns
ChatSurfaceEvent | Promise<ChatSurfaceEvent | null> | null
#reply?
optionalreply?: (event,text) =>void|Promise<void>
Defined in: chat-trigger.ts:151
Optional reply hook β used when the agent's output should post back.
#Parameters
event
text
string
#Returns
void | Promise<void>
#surface
surface:
ChatSurface
Defined in: chat-trigger.ts:135
#verify?
optionalverify?: (req) =>boolean|Promise<boolean>
Defined in: chat-trigger.ts:149
Verify the request signature. Return false to reject with 401.
The factory refuses to construct without verify unless
\{ strict: false \} is passed β explicit opt-out so unverified
webhook handlers cannot ship by accident.
Replay protection (eventId dedup, timestamp window) is the
adapter's responsibility β the trigger does not enforce it. The
normalized eventId and receivedAt fields exist precisely so
adapters can implement dedup against a memory backend.
#Parameters
req
#Returns
boolean | Promise<boolean>