ChatTriggerOptions
Auto-generated API reference for ChatTriggerOptions.
Interface: ChatTriggerOptions<TContext>
Defined in: chat-trigger.ts:172
#Type Parameters
#TContext
TContext = unknown
#Properties
#adapter
adapter:
ChatSurfaceAdapter
Defined in: chat-trigger.ts:173
#agent
agent:
AgentHandle<TContext>
Defined in: chat-trigger.ts:174
#autoReply?
optionalautoReply?:boolean
Defined in: chat-trigger.ts:192
Auto-reply with the agent's output via adapter.reply when present.
#buildContext?
optionalbuildContext?: (event) =>TContext
Defined in: chat-trigger.ts:185
Build the per-event runtime context (e.g. tenant id, user id).
Default: \{ event \}.
#Parameters
event
#Returns
TContext
#buildTask?
optionalbuildTask?: (event) =>string
Defined in: chat-trigger.ts:180
Build the agent task from the parsed event. Default: pull
event.text for message / mention / reply, fall back to a
structured JSON encoding for events without text (reaction, file).
#Parameters
event
#Returns
string
#eventSchema?
optionaleventSchema?:JSONSchema7
Defined in: chat-trigger.ts:207
Opt-in JSON Schema for the parsed ChatSurfaceEvent (ADR-0011). When set
together with validateEvent, an event that fails the schema is rejected
with HTTP 400 before the agent runs β defence in depth on top of
adapter.verify. The schema type is the same JSONSchema7 accepted by
ArgsValidator.
#filter?
optionalfilter?: (event) =>boolean
Defined in: chat-trigger.ts:190
Filter events before running the agent. Return false to skip.
Useful for ignoring bot-on-bot loops or off-hours messages.
#Parameters
event
#Returns
boolean
#onEvent?
optionalonEvent?: (event) =>void
Defined in: chat-trigger.ts:214
Observability hook.
#Parameters
event
#Returns
void
#strict?
optionalstrict?:boolean
Defined in: chat-trigger.ts:199
Reject construction when adapter.verify is missing. Default
true β set to false only when you have an external auth
proxy in front of the trigger. Surfaces the footgun at author
time instead of accepting spoofed webhooks at runtime.
#validateEvent?
optionalvalidateEvent?:ArgsValidator
Defined in: chat-trigger.ts:212
Validator used with eventSchema. Use createAjvValidator() from
@agentskit/validation. No-op unless eventSchema is also set.