Package:
@hexos/commonRepresents a single message in a conversation, with role, content, and optional structured data.
Messages are the primary data unit in the chat flow. User messages contain plain text input, while assistant messages may include tool calls and their results. Each message is timestamped and optionally tagged with the agent that produced it for multi-agent conversations.
Related: MessageRole discriminates authorship, ToolCall tracks tool invocations, Attachment holds file/media data.
interface AgentMessage {
id: string;
role: MessageRole;
content: string;
createdAt: Date;
agentId?: string;
toolCalls?: ToolCall[];
attachments?: Attachment[];
}