/** * Core types for FireGlobe Agent Testing SDK */ /** * Personality generated by the backend */ export interface Personality { name: string; personality: string; description: string; } /** * A single message in a conversation */ export interface ConversationMessage { role: "user" | "agent"; content: string; timestamp: Date; personality?: string; } /** * Conversation between a personality and the agent */ export interface Conversation { id: string; personalityName: string; messages: ConversationMessage[]; startTime: Date; endTime?: Date; status: "in_progress" | "completed" | "failed"; } /** * Evaluation result for a single conversation */ export interface EvaluationResult { conversationId: string; personalityName: string; score: number; criteria: { helpfulness: number; accuracy: number; relevance: number; clarity: number; technicalDepth: number; }; strengths: string[]; weaknesses: string[]; overallFeedback: string; timestamp: Date; } /** * Test run configuration */ export interface TestConfig { agentDescription: string; agentCapabilities: string; accessToken: string; numPersonalities?: number; maxMessagesPerConversation?: number; backendUrl?: string; saveConversations?: boolean; conversationOutputPath?: string; realTimeLogging?: boolean; dbServerUrl?: string; } /** * Test run results */ export interface TestResults { testId: string; agentDescription: string; personalities: Personality[]; conversations: Conversation[]; evaluations: EvaluationResult[]; startTime: Date; endTime: Date; overallScore: number; summary: { totalConversations: number; successfulConversations: number; failedConversations: number; averageScore: number; topStrengths: string[]; topWeaknesses: string[]; }; } /** * Universal Agent Interface * Any agent (regardless of framework) must implement this interface */ export interface IUniversalAgent { /** * Send a message to the agent and get a response * @param message - The message to send to the agent * @returns The agent's response */ sendMessage(message: string): Promise; /** * Initialize or reset the agent's conversation state */ reset(): Promise; /** * Get agent metadata (optional) */ getMetadata?(): { name: string; description: string; framework: string; version: string; }; /** * Cleanup resources (optional) */ cleanup?(): Promise; } /** * Event types for real-time updates */ export type TestEvent = { type: "test_started"; testId: string; timestamp: Date; } | { type: "personalities_generated"; count: number; personalities: Personality[]; } | { type: "conversation_started"; conversationId: string; personalityName: string; } | { type: "message_sent"; conversationId: string; role: "user" | "agent"; content: string; } | { type: "conversation_completed"; conversationId: string; } | { type: "evaluation_completed"; conversationId: string; score: number; } | { type: "test_completed"; results: TestResults; } | { type: "error"; error: string; context?: string; }; /** * Event listener callback */ export type EventListener = (event: TestEvent) => void; //# sourceMappingURL=types.d.ts.map