ConversationEvent
type ConversationEvent = | { text: string; timestamp: Date; type: "user"; userId?: string;} | { text: string; timestamp: Date; type: "assistant";} | { args: unknown; timestamp: Date; toolCallId: string; toolName: string; type: "tool-call";} | { result: unknown; timestamp: Date; toolCallId: string; toolName: string; type: "tool-result";} | { error: string; timestamp: Date; toolCallId: string; toolName: string; type: "tool-error";} | { from: string; reason?: string; timestamp: Date; to: string; type: "handoff";} | { from: string; timestamp: Date; to: string; type: "flow-transition";} | { error: string; timestamp: Date; type: "error";};Discriminated union of conversation-level events for the runtime event log. Stored in session workingMemory for observability.