ChatMessage
@gravity-rail/sdk / ChatMessage
Interface: ChatMessage
Properties
audience?
optionalaudience:MessageAudience|null
ADR-11 provenance: WHO this message is for. agent_only messages are
context the member never said and must never render as member speech.
audioFileUuid?
optionalaudioFileUuid:string|null
audioMetadata?
optionalaudioMetadata:AudioMessageMetadata|null
childMessageCount?
optionalchildMessageCount:number
How many messages hang off this one as a detached background trajectory
(a forked tool trajectory that outgrew its turn). Non-zero is the cue to
offer a "show work" expander; the thread itself is fetched lazily via
getChildThreadMessages. Absent/0 for ordinary messages.
content
content:
string|MessageContentPart[]
created_at?
optionalcreated_at:string
email_id?
optionalemail_id:number
error?
optionalerror:object
code
code:
string
message
message:
string
error_details?
optionalerror_details:ChatCompletionError
failed?
optionalfailed:boolean
id
id:
string
inbox_id?
optionalinbox_id:number
interactionMode?
optionalinteractionMode:InteractionSessionResponseMode|null
interactionSessionId?
optionalinteractionSessionId:string|null
First-class audio assistant message. audioFileUuid points at a workspace File whose bytes the chat renderer should play. Set together with audioMetadata: an audio message has both fields, a text message has neither.
interactionTurnId?
optionalinteractionTurnId:string|null
memberId?
optionalmemberId:number|null
origin?
optionalorigin:MessageOrigin|null
ADR-11 provenance: WHO authored this message. Null on rows written before
the column existed — fall back to role.
originalContent?
optionaloriginalContent:string|MessageContentPart[]
parentMessageId?
optionalparentMessageId:string|null
The fork point this message hangs off, as the PARENT's message uuid (so it
joins against id client-side). Null for ordinary main-thread messages.
reasoning_content?
optionalreasoning_content:string
role
role:
MessageRole
sendAsAssistant?
optionalsendAsAssistant:boolean
smsDeliveryErrorCode?
optionalsmsDeliveryErrorCode:string|null
smsDeliveryFailureReason?
optionalsmsDeliveryFailureReason:string|null
Friendly failure reason string. Only set when smsDeliveryStatus is failed or undelivered.
smsDeliveryStatus?
optionalsmsDeliveryStatus:SMSDeliveryStatus|null
SMS delivery status (queued/sending/sent/delivered/undelivered/failed). Only set for SMS messages.
smsDeliveryUpdatedAt?
optionalsmsDeliveryUpdatedAt:string|null
suggestions?
optionalsuggestions:string[]
taskId?
optionaltaskId:number|null
tokenUsage?
optionaltokenUsage:MessageTokenUsageResponse
tool_call_id?
optionaltool_call_id:string
tool_calls?
optionaltool_calls:ToolCall[]
truncatedAtMs?
optionaltruncatedAtMs:number
truncationReason?
optionaltruncationReason:TruncationReason
userRating?
optionaluserRating:number|null
Viewer's durable thumbs rating for this assistant message (1.0 up / 0.0 down). Loaded from chat_feedback; null/undefined when the viewer has not rated it.
userRatingComment?
optionaluserRatingComment:string|null
Free-text details the viewer attached to their rating, if any.
uuid?
optionaluuid:string|null
Canonical persisted Message UUID. id remains the provider correlation id.