import { AgentResponse } from '../../types/agentProtocol';
import { DirectSkillTask } from '../../strategies/types';
import { ProgressEmitter } from '../orchestratorTypes';
export declare class DirectSkillExecutor {
    private traceProcessorService;
    private aiService;
    private traceId;
    private concurrency;
    constructor(traceProcessorService: any, aiService: any, traceId: string, concurrency?: number);
    /**
     * Execute a batch of direct skill tasks with concurrency limiting.
     * Returns AgentResponse[] compatible with the existing pipeline.
     *
     * Architecture note: A single SkillExecutor instance is shared across the batch.
     * SkillExecutor is stateless after registerSkills() — each execute() call creates
     * its own SkillExecutionContext, so concurrent calls are safe.
     */
    executeTasks(tasks: DirectSkillTask[], emitter: ProgressEmitter): Promise<AgentResponse[]>;
    /**
     * Execute a single direct skill task.
     * 1. Build params from interval + template
     * 2. Call shared SkillExecutor.execute()
     * 3. Convert SkillExecutionResult → AgentResponse
     */
    private executeSingle;
    /**
     * Build skill params from template and interval.
     * Uses paramMapping if defined, otherwise falls back to standard mapping.
     *
     * Hardened to handle key naming mismatches (snake_case vs camelCase):
     * - Tries source key as-is
     * - Tries snake_case conversion
     * - Tries camelCase conversion
     * - Tries interval top-level fields
     */
    private buildParams;
    /**
     * Resolve a parameter value from interval using multiple key variations.
     * Handles special values and key naming mismatches.
     */
    private resolveParamValue;
    /**
     * Convert SkillExecutionResult → AgentResponse.
     * Extracts findings from diagnostics, builds DataEnvelopes from displayResults.
     */
    private buildResponse;
    /**
     * Extract Finding[] from SkillExecutionResult diagnostics.
     * Maps diagnostic severity to finding severity and builds structured findings.
     *
     * Uses taskId (which contains a random component) for globally unique finding IDs,
     * avoiding collisions when concurrent tasks finish in the same millisecond.
     */
    private extractFindings;
    /**
     * Enrich findings with root_cause data from rawResults.
     * Called after extractFindings() to add structured cause data to Finding.details.
     *
     * This is critical for JankCauseSummarizer which aggregates by cause_type.
     * Without this enrichment, findings would lack the cause_type field and
     * the conclusion generator would have to rely on LLM to infer patterns.
     *
     * @param findings - Findings extracted from diagnostics
     * @param rootCauseData - Extracted root cause row
     * @param scopeLabel - Scope label for logging/context
     * @returns Enriched findings with cause_type, primary_cause, etc. in details
     */
    private enrichFindingsWithRootCauseData;
    /**
     * Extract and normalize root cause row from raw skill results.
     */
    private extractRootCauseSnapshot;
    /**
     * Build a per-frame mechanism record used by StrategyExecutor aggregation.
     */
    private buildFrameMechanismRecord;
    private toOptionalNumber;
    /**
     * Extract root cause row from step data.
     * Handles multiple data formats that SkillExecutor may produce.
     *
     * Data formats seen in practice:
     * 1. Array of objects: [{ cause_type, primary_cause, ... }] (most common from SQL)
     * 2. Columnar: { columns: [...], rows: [[...]] } (raw SQL result)
     * 3. Single object with cause_type (direct result)
     *
     * @param data - Step data in various possible formats
     * @returns First row as a key-value object, or null if extraction fails
     */
    private extractRootCauseRow;
    /**
     * Compute overall confidence from diagnostic results.
     * DiagnosticResult.confidence is always numeric (SkillExecutor converts
     * YAML string labels to numbers in executeDiagnosticStep).
     */
    private computeConfidence;
    /**
     * Build an error AgentResponse.
     */
    private buildErrorResponse;
    /**
     * Split array into chunks for concurrency limiting.
     */
    private chunk;
}
//# sourceMappingURL=directSkillExecutor.d.ts.map