import type { InMemoryDB } from '../inmemory-db.js';
import { ObservabilityStorage } from './base.js';
import type { GetEntityTypesArgs, GetEntityTypesResponse, GetEntityNamesArgs, GetEntityNamesResponse, GetServiceNamesArgs, GetServiceNamesResponse, GetEnvironmentsArgs, GetEnvironmentsResponse, GetTagsArgs, GetTagsResponse, GetMetricNamesArgs, GetMetricNamesResponse, GetMetricLabelKeysArgs, GetMetricLabelKeysResponse, GetMetricLabelValuesArgs, GetMetricLabelValuesResponse } from './discovery.js';
import type { BatchCreateFeedbackArgs, CreateFeedbackArgs, GetFeedbackAggregateArgs, GetFeedbackAggregateResponse, GetFeedbackBreakdownArgs, GetFeedbackBreakdownResponse, GetFeedbackPercentilesArgs, GetFeedbackPercentilesResponse, GetFeedbackTimeSeriesArgs, GetFeedbackTimeSeriesResponse, ListFeedbackArgs, ListFeedbackResponse } from './feedback.js';
import type { BatchCreateLogsArgs, ListLogsArgs, ListLogsResponse } from './logs.js';
import type { BatchCreateMetricsArgs, ListMetricsArgs, ListMetricsResponse, GetMetricAggregateArgs, GetMetricAggregateResponse, GetMetricBreakdownArgs, GetMetricBreakdownResponse, GetMetricTimeSeriesArgs, GetMetricTimeSeriesResponse, GetMetricPercentilesArgs, GetMetricPercentilesResponse } from './metrics.js';
import type { BatchCreateScoresArgs, CreateScoreArgs, GetScoreAggregateArgs, GetScoreAggregateResponse, GetScoreBreakdownArgs, GetScoreBreakdownResponse, GetScorePercentilesArgs, GetScorePercentilesResponse, GetScoreTimeSeriesArgs, GetScoreTimeSeriesResponse, ListScoresArgs, ListScoresResponse } from './scores.js';
import type { BatchCreateSpansArgs, BatchDeleteTracesArgs, BatchUpdateSpansArgs, CreateSpanArgs, GetRootSpanArgs, GetRootSpanResponse, GetSpanArgs, GetSpanResponse, GetTraceArgs, GetTraceResponse, GetTraceLightResponse, ListTracesArgs, ListTracesResponse, SpanRecord, UpdateSpanArgs } from './tracing.js';
import { TraceStatus } from './tracing.js';
/**
 * Internal structure for storing a trace with computed properties for efficient filtering
 */
export interface TraceEntry {
    /** All spans in this trace, keyed by spanId */
    spans: Record<string, SpanRecord>;
    /** Root span for this trace (parentSpanId === null) */
    rootSpan: SpanRecord | null;
    /** Computed trace status based on root span state */
    status: TraceStatus;
    /** True if any span in the trace has an error */
    hasChildError: boolean;
}
/** In-memory implementation of ObservabilityStorage for testing and development. */
export declare class ObservabilityInMemory extends ObservabilityStorage {
    private db;
    constructor({ db }: {
        db: InMemoryDB;
    });
    dangerouslyClearAll(): Promise<void>;
    createSpan(args: CreateSpanArgs): Promise<void>;
    batchCreateSpans(args: BatchCreateSpansArgs): Promise<void>;
    private validateCreateSpan;
    /**
     * Inserts or updates a span in the trace and recomputes trace-level properties
     */
    private upsertSpanToTrace;
    /**
     * Recomputes derived trace properties from all spans
     */
    private recomputeTraceProperties;
    getSpan(args: GetSpanArgs): Promise<GetSpanResponse | null>;
    getRootSpan(args: GetRootSpanArgs): Promise<GetRootSpanResponse | null>;
    getTrace(args: GetTraceArgs): Promise<GetTraceResponse | null>;
    getTraceLight(args: GetTraceArgs): Promise<GetTraceLightResponse | null>;
    listTraces(args: ListTracesArgs): Promise<ListTracesResponse>;
    /**
     * Check if a trace matches all provided filters
     */
    private traceMatchesFilters;
    updateSpan(args: UpdateSpanArgs): Promise<void>;
    batchUpdateSpans(args: BatchUpdateSpansArgs): Promise<void>;
    batchDeleteTraces(args: BatchDeleteTracesArgs): Promise<void>;
    batchCreateMetrics(args: BatchCreateMetricsArgs): Promise<void>;
    listMetrics(args: ListMetricsArgs): Promise<ListMetricsResponse>;
    private filterMetrics;
    private aggregate;
    private interpolatePercentile;
    /**
     * Cost is returned alongside value-based OLAP results so callers can derive
     * token and monetary views from the same filtered scan.
     */
    private summarizeCost;
    getMetricAggregate(args: GetMetricAggregateArgs): Promise<GetMetricAggregateResponse>;
    getMetricBreakdown(args: GetMetricBreakdownArgs): Promise<GetMetricBreakdownResponse>;
    getMetricTimeSeries(args: GetMetricTimeSeriesArgs): Promise<GetMetricTimeSeriesResponse>;
    getMetricPercentiles(args: GetMetricPercentilesArgs): Promise<GetMetricPercentilesResponse>;
    private intervalToMs;
    getMetricNames(args: GetMetricNamesArgs): Promise<GetMetricNamesResponse>;
    getMetricLabelKeys(args: GetMetricLabelKeysArgs): Promise<GetMetricLabelKeysResponse>;
    getMetricLabelValues(args: GetMetricLabelValuesArgs): Promise<GetMetricLabelValuesResponse>;
    getEntityTypes(_args: GetEntityTypesArgs): Promise<GetEntityTypesResponse>;
    getEntityNames(args: GetEntityNamesArgs): Promise<GetEntityNamesResponse>;
    getServiceNames(_args: GetServiceNamesArgs): Promise<GetServiceNamesResponse>;
    getEnvironments(_args: GetEnvironmentsArgs): Promise<GetEnvironmentsResponse>;
    getTags(args: GetTagsArgs): Promise<GetTagsResponse>;
    batchCreateLogs(args: BatchCreateLogsArgs): Promise<void>;
    listLogs(args: ListLogsArgs): Promise<ListLogsResponse>;
    private logMatchesFilters;
    createScore(args: CreateScoreArgs): Promise<void>;
    batchCreateScores(args: BatchCreateScoresArgs): Promise<void>;
    listScores(args: ListScoresArgs): Promise<ListScoresResponse>;
    private scoreMatchesFilters;
    getScoreAggregate(args: GetScoreAggregateArgs): Promise<GetScoreAggregateResponse>;
    getScoreBreakdown(args: GetScoreBreakdownArgs): Promise<GetScoreBreakdownResponse>;
    getScoreTimeSeries(args: GetScoreTimeSeriesArgs): Promise<GetScoreTimeSeriesResponse>;
    getScorePercentiles(args: GetScorePercentilesArgs): Promise<GetScorePercentilesResponse>;
    private getNumericFeedbackValue;
    private getComparisonDateRange;
    createFeedback(args: CreateFeedbackArgs): Promise<void>;
    batchCreateFeedback(args: BatchCreateFeedbackArgs): Promise<void>;
    listFeedback(args: ListFeedbackArgs): Promise<ListFeedbackResponse>;
    getFeedbackAggregate(args: GetFeedbackAggregateArgs): Promise<GetFeedbackAggregateResponse>;
    getFeedbackBreakdown(args: GetFeedbackBreakdownArgs): Promise<GetFeedbackBreakdownResponse>;
    getFeedbackTimeSeries(args: GetFeedbackTimeSeriesArgs): Promise<GetFeedbackTimeSeriesResponse>;
    getFeedbackPercentiles(args: GetFeedbackPercentilesArgs): Promise<GetFeedbackPercentilesResponse>;
    private feedbackMatchesFilters;
}
//# sourceMappingURL=inmemory.d.ts.map