/**
 * edge-case-handlers.ts
 * Modular edge case handlers for different tool call patterns
 */
import type { Span, EdgeCaseHandler, ParsingContext } from '../types';
/**
 * Registry for edge case handlers (Dependency Injection)
 */
export declare class EdgeCaseHandlerRegistry {
    private handlers;
    register(name: string, handler: EdgeCaseHandler): void;
    unregister(name: string): void;
    getHandler(name: string): EdgeCaseHandler | undefined;
    getAllHandlers(): EdgeCaseHandler[];
    clear(): void;
}
/**
 * HANDLER 1: Nested Tool Calls
 *
 * Pattern: Agent output parser (decision) with child tool executions
 * Example: Parent says "call get_similar_stocks", child actually executes "get_financial_metrics"
 */
export declare class NestedToolCallHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    private toolAnalyzer;
    canHandle(span: Span, _context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
    private extractTokenUsage;
}
/**
 * HANDLER 2: Sequential Tool Calls
 *
 * Pattern: Multiple tools executed one after another
 */
export declare class SequentialToolCallHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    private toolAnalyzer;
    canHandle(span: Span, context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
}
/**
 * HANDLER 3: OpenAI Function Calling
 *
 * Pattern: function_call with arguments in output
 */
export declare class OpenAIFunctionCallHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    private toolAnalyzer;
    canHandle(span: Span, _context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
}
/**
 * HANDLER 4: RunnableParallel Pattern
 *
 * Pattern: Multiple tools run in parallel (RunnableParallel)
 */
export declare class RunnableParallelHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    private toolAnalyzer;
    canHandle(span: Span, _context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
}
/**
 * HANDLER 5: Tool-like Messages Embedded in LangGraph workflow.output
 *
 * Pattern: gen_ai.workflow.type = LangGraph with workflow.output.messages including entries like:
 *   "content='Data collected for TCS.' ... name='DataCollector' ..."
 *
 * LangGraph/OpenLit sometimes does not emit explicit "tool ..." spans for these, so we create a Tool
 * attached to the best-matching child workflow span.
 */
export declare class WorkflowMessageToolHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    canHandle(span: Span, _context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
}
/**
 * HANDLER 5: Direct Tool Execution
 *
 * Pattern: Direct tool execution without special patterns
 */
export declare class DirectToolExecutionHandler implements EdgeCaseHandler {
    name: string;
    priority: number;
    private toolAnalyzer;
    canHandle(span: Span, _context: ParsingContext): boolean;
    handle(span: Span, context: ParsingContext): void;
}
/**
 * Export all handlers
 */
export declare const DEFAULT_HANDLERS: (NestedToolCallHandler | SequentialToolCallHandler | OpenAIFunctionCallHandler | RunnableParallelHandler | WorkflowMessageToolHandler | DirectToolExecutionHandler)[];
//# sourceMappingURL=edgeCaseHandlers.d.ts.map