/**
 * Traces Service - Fetch and process trace data from OpenSearch
 */
import { Span, TimeRange, TraceQueryParams, TraceSearchResult } from '../../types/index.js';
export { groupSpansByTrace, getSpansForTrace } from './traceGrouping.js';
export { extractMessagesFromSpans } from './messageExtraction.js';
/**
 * Fetch traces from the backend API
 * Backend handles config resolution (file or env vars) - no headers needed from frontend
 */
export declare function fetchTraces(params: TraceQueryParams): Promise<TraceSearchResult>;
/**
 * Fetch traces by trace ID
 */
export declare function fetchTraceById(traceId: string): Promise<TraceSearchResult>;
/**
 * Fetch traces by run IDs
 */
export declare function fetchTracesByRunIds(runIds: string[]): Promise<TraceSearchResult>;
/**
 * Fetch traces correlated with a single test-case run, using all available
 * correlation strategies (see AGENTS.md → Trace correlation conventions):
 *
 *   A. traceId  — W3C-propagated agents share traceId with the eval span
 *   B. runId    — agents tag spans with `gen_ai.request.id == runId`
 *   C. agents   — service.name + time-window fallback (opt-in / `includeWindowFallback`)
 *
 * Strategies A and B are always safe (no false positives). Strategy C is
 * opt-in because it can surface concurrent runs of the same agent and
 * cross-team noise on a shared cluster.
 */
export declare function fetchTracesForRun(params: {
    /**
     * Agent run id (Strategy B correlation). Optional — runs persisted via the
     * deferred trace-mode path may not carry one; in that case correlation
     * falls back to the time-window `windowAgents` clause (Strategy C).
     */
    runId?: string;
    evalTraceId?: string;
    includeWindowFallback?: boolean;
    windowAgents?: Array<{
        serviceName: string;
        startedAt: number;
        endedAt: number;
    }>;
    size?: number;
}): Promise<TraceSearchResult>;
/**
 * Fetch recent traces for live tailing
 */
export declare function fetchRecentTraces(options: {
    minutesAgo?: number;
    sessionId?: string;
    serviceName?: string;
    textSearch?: string;
    size?: number;
    cursor?: string;
}): Promise<TraceSearchResult>;
/**
 * Fetch all traces for a Claude Code session by session ID
 */
export declare function fetchTracesBySessionId(sessionId: string): Promise<TraceSearchResult>;
/**
 * Check traces API health
 * Backend handles config resolution (file or env vars) - no headers needed from frontend
 */
export declare function checkTracesHealth(): Promise<{
    status: string;
    index?: string;
    error?: string;
}>;
/**
 * Process flat spans into a hierarchical tree structure
 */
export declare function processSpansIntoTree(flatSpans: Span[]): Span[];
/**
 * Calculate global time range across all spans
 */
export declare function calculateTimeRange(spans: Span[]): TimeRange;
/**
 * Get color for a span based on its type/name
 */
export declare function getSpanColor(span: Span): string;
/**
 * Flatten tree into visible spans based on expanded state
 */
export declare function flattenVisibleSpans(spans: Span[], expandedSpans: Set<string>, depth?: number): Span[];
export { categorizeSpan, categorizeSpans, categorizeSpanTree, getSpanCategory, getCategoryMeta, filterSpansByCategory, filterSpanTreeByCategory, countByCategory, buildDisplayName, checkOTelCompliance, hasAnyWarnings, } from './spanCategorization.js';
export { extractCommonArgKeys, groupToolSpans, calculateToolSimilarity, getToolGroupStats, } from './toolSimilarity.js';
export { calculateSpanSimilarity, compareTraces, flattenAlignedTree, getComparisonTypeInfo, } from './traceComparison.js';
export { spansToFlow, applyDagreLayout, detectParallelExecution, countSpansInTree, } from './flowTransform.js';
export { spansToExecutionFlow, isContainerSpan, findMainFlowSpans, sortByStartTime, } from './executionOrderTransform.js';
export { spansToIntentNodes, getRootContainerSpan, } from './intentTransform.js';
export { CATEGORY_COLORS, getCategoryColors, type CategoryColorConfig, } from './categoryStyles.js';
export { flattenSpans, calculateCategoryStats, extractToolName, extractToolStats, type CategoryStats, type ToolInfo, } from './traceStats.js';
export { computeTraceSummary, isEmptyTraceSummary, type TraceSummary, } from './traceSummary.js';
//# sourceMappingURL=index.d.ts.map