import type { CreateSpanArgs, GetSpanArgs, GetSpanResponse, GetSpansArgs, GetSpansResponse, GetRootSpanArgs, GetRootSpanResponse, GetTraceArgs, GetTraceResponse, GetTraceLightResponse, ListBranchesArgs, ListBranchesResponse, ListTracesArgs, ListTracesLightResponse, ListTracesResponse, BatchCreateSpansArgs, BatchDeleteTracesArgs } from '@mastra/core/storage';
import type { DuckDBConnection } from '../../db/index.js';
/** Insert a 'start' event for a new span. */
export declare function createSpan(db: DuckDBConnection, args: CreateSpanArgs): Promise<void>;
/** Insert 'start' events for multiple spans in a single statement. */
export declare function batchCreateSpans(db: DuckDBConnection, args: BatchCreateSpansArgs): Promise<void>;
/** Delete all span events for the given trace IDs. */
export declare function batchDeleteTraces(db: DuckDBConnection, args: BatchDeleteTracesArgs): Promise<void>;
/** Reconstruct a single span from its event history. */
export declare function getSpan(db: DuckDBConnection, args: GetSpanArgs): Promise<GetSpanResponse | null>;
/** Reconstruct the root span (no parent) for a trace. */
export declare function getRootSpan(db: DuckDBConnection, args: GetRootSpanArgs): Promise<GetRootSpanResponse | null>;
/** Reconstruct all spans belonging to a trace. */
export declare function getTrace(db: DuckDBConnection, args: GetTraceArgs): Promise<GetTraceResponse | null>;
/** Reconstruct lightweight spans belonging to a trace (timeline fields only). */
export declare function getTraceLight(db: DuckDBConnection, args: GetTraceArgs): Promise<GetTraceLightResponse | null>;
export declare function listTraces(db: DuckDBConnection, args: ListTracesArgs): Promise<ListTracesResponse>;
export declare function listTracesLight(db: DuckDBConnection, args: ListTracesArgs): Promise<ListTracesLightResponse>;
/**
 * Reconstruct multiple spans by spanId within a single trace. Single round-trip
 * fetch used by the optimized {@link import('@mastra/core/storage').getBranch}
 * path: getStructure walks the skeleton to identify branch spanIds, then this
 * pulls full data for only those spans instead of the whole trace.
 */
export declare function getSpans(db: DuckDBConnection, args: GetSpansArgs): Promise<GetSpansResponse>;
/**
 * List branch anchor spans (named-entity invocations) across all traces with
 * filtering, ordering, and pagination.
 *
 * Same two-stage strategy as `listTraces`:
 *   1. Pick candidate anchor `(traceId, spanId)` tuples from raw `span_events`
 *      by looking only at `eventType = 'start'` rows whose `spanType` is in
 *      {@link BRANCH_SPAN_TYPES}. Scalar filters (entity*, *Id, environment,
 *      serviceName, startedAt range, ...) run here, against raw columns. This
 *      avoids paying reconstruction cost for the high-volume sub-operation
 *      events (MODEL_STEP, MODEL_CHUNK, ...) that are never anchors.
 *   2. Reconstruct full span data only for that narrowed set, then apply
 *      post-aggregation filters (status / metadata / tags / endedAt range).
 *
 * When there are no post-aggregation filters, ordering + pagination happen
 * inside the prefilter so reconstruction runs on at most `perPage` rows.
 */
export declare function listBranches(db: DuckDBConnection, args: ListBranchesArgs): Promise<ListBranchesResponse>;
//# sourceMappingURL=tracing.d.ts.map