import type { AnySpan } from './types/index.js';
/**
 * Returns the current span from AsyncLocalStorage, if one is active.
 * Used by DualLogger to forward logs to a span-correlated loggerVNext.
 */
export declare function getCurrentSpan(): AnySpan | undefined;
/**
 * Execute an async function within the span's tracing context if available.
 * Falls back to direct execution if no span exists.
 *
 * When a bridge is configured, this enables auto-instrumented operations
 * (HTTP requests, database queries, etc.) to be properly nested under the
 * current span in the external tracing system.
 *
 * @param span - The span to use as context (or undefined to execute without context)
 * @param fn - The async function to execute
 * @returns The result of the function execution
 *
 * @example
 * ```typescript
 * const result = await executeWithContext(llmSpan, async () =>
 *   model.generateText(args)
 * );
 * ```
 */
export declare function executeWithContext<T>(params: {
    span?: AnySpan;
    fn: () => Promise<T>;
}): Promise<T>;
/**
 * Execute a synchronous function within the span's tracing context if available.
 * Falls back to direct execution if no span exists.
 *
 * When a bridge is configured, this enables auto-instrumented operations
 * (HTTP requests, database queries, etc.) to be properly nested under the
 * current span in the external tracing system.
 *
 * @param span - The span to use as context (or undefined to execute without context)
 * @param fn - The synchronous function to execute
 * @returns The result of the function execution
 *
 * @example
 * ```typescript
 * const result = executeWithContextSync(llmSpan, () =>
 *   model.streamText(args)
 * );
 * ```
 */
export declare function executeWithContextSync<T>(params: {
    span?: AnySpan;
    fn: () => T;
}): T;
//# sourceMappingURL=context-storage.d.ts.map