import type { AgentTrace, Expectations, AssertionResult } from './types'; export type ToneLabel = 'friendly' | 'formal' | 'neutral' | 'assertive' | 'empathetic' | 'humorous'; /** * Detect if text matches a target tone via keyword heuristics. */ export declare function detectTone(text: string, target: ToneLabel): { matches: boolean; score: number; }; export interface ConversationExpectations extends Expectations { /** Expected tone of the response */ tone?: ToneLabel; /** Agent should maintain context from previous turns */ context_maintained?: boolean; /** Output length constraints */ output_length?: { min?: number; max?: number; }; /** Specific context keys that should be retained from prior turns */ context_retained?: string[]; /** Tool args must contain these key-value pairs (context carry-forward) */ args_contain?: Record; } /** * A single turn in a multi-turn conversation test. */ export interface ConversationTurn { user: string; expect: ConversationExpectations; } /** * A multi-turn conversation test definition. */ export interface ConversationTest { name: string; turns: ConversationTurn[]; tags?: string[]; } /** * Result of evaluating a single turn. */ export interface TurnResult { turn: number; user: string; assertions: AssertionResult[]; passed: boolean; } /** * Result of evaluating an entire conversation. */ export interface ConversationResult { name: string; turns: TurnResult[]; passed: boolean; failed_at_turn?: number; } /** * Split a full trace into per-turn sub-traces based on user messages. * * The strategy: each time we see an output step that follows an llm_call * sequence, we consider it a new "turn boundary". We use a simpler heuristic — * split trace.steps into N segments where N = number of turns requested. * Steps are divided roughly by looking for sequential groups of * tool_call/tool_result/llm_call/output patterns. */ export declare function splitTraceByTurns(trace: AgentTrace, turnCount: number): AgentTrace[]; /** * Evaluate a multi-turn conversation against a trace. */ export declare function evaluateConversation(trace: AgentTrace, conversation: ConversationTest): ConversationResult; /** * Format conversation result for display. */ export declare function formatConversationResult(result: ConversationResult): string; //# sourceMappingURL=conversation.d.ts.map