Skip to content

Type Alias: SessionMessage

Makaio Framework


Makaio Framework / contracts / SessionMessage

SessionMessage = z.infer<typeof SessionMessageSchema>

Defined in: ../../../packages/contracts/src/session/schemas/message.ts:63

  • SessionMessage
    • z.infer<typeof SessionMessageSchema>
      • typeof SessionMessageSchema
type SessionMessage = {
messageId: string;
turnId: string | null;
sessionId: string;
role: 'user' | 'assistant';
contentText: string;
blocks: Array<{ type: 'text'; content: string; } | { type: 'image'; source: { type: 'base64'; data: string; mimeType: string; } | { type: 'url'; url: string; mimeType?: string | undefined; }; } | { type: 'document'; source: { type: 'base64'; data: string; mimeType: string; } | { type: 'url'; url: string; mimeType?: string | undefined; }; } | { type: 'attachment'; fileName: string; filePath: string; source: { type: 'base64'; data: string; mimeType: string; } | { type: 'url'; url: string; mimeType?: string | undefined; }; attachmentType: 'file' | 'directory'; displayName?: string | undefined; } | { type: 'reasoning'; content: string; metadata?: Record<string, unknown> | undefined; } | { type: 'tool_call'; toolCallId: string; name: string; args: Record<string, unknown>; } | { type: 'tool_output'; toolCallId: string; output: string; isError?: boolean | undefined; }>;
timestamp: number;
agentId?: string | undefined;
adapterSessionId?: string | undefined;
adapterMessageId?: string | undefined;
editOf?: string | undefined;
origin?: 'text' | 'voice' | 'compact' | undefined;
};