A typed observability hook on useTriggerChatTransport / TriggerChatTransport that emits semantic lifecycle events, so you can build real metrics and alerts on top of chat without wrapping fetch or inferring state from useChat.
- Was my message actually sent?
sendMessage()fromuseChatreturns no feedback. Thefetchoverride works but is wire-level: you have to know which endpoint means what, correlate requests back to messages yourself, and it misses the headStart first-turn path entirely (that POST goes through your own route handler). - Did my message get answered? The disappearing-message failure mode is: send succeeds, then nothing. Detecting that requires pairing each successful send with the response lifecycle that should follow it, which no current API surfaces.
import { useTriggerChatTransport, type ChatTransportEvent } from "@trigger.dev/sdk/chat/react";