/**
 * W3C Trace Context propagation utilities for delegation chains.
 *
 * Implements W3C Trace Context Level 1 (traceparent / tracestate) via
 * the @opentelemetry/api propagation and context APIs — no @opentelemetry/core
 * dependency required.
 *
 * Spec: https://www.w3.org/TR/trace-context/
 */
import { context, type Span, type SpanContext } from "@opentelemetry/api";
/**
 * Registers the W3C Trace Context propagator as the global OTel propagator.
 * Safe to call multiple times — idempotent (re-registers on every call).
 *
 * Called automatically by initVaubanSDK. External callers only need this when
 * using the trace-context utilities without calling initVaubanSDK.
 */
export declare function registerW3CPropagator(): void;
/**
 * Injects W3C traceparent/tracestate headers into a carrier map.
 *
 * Uses the active span context (or the provided OTel Context if given).
 *
 * @param headers - Mutable header map to inject into (safe to start empty).
 * @param ctx     - Optional OTel Context; defaults to context.active().
 * @returns The same map with traceparent/tracestate added (or unchanged if
 *          no active span context is available).
 */
export declare function injectTraceContext(headers: Record<string, string>, ctx?: ReturnType<typeof context.active>): Record<string, string>;
/**
 * Extracts a SpanContext from W3C traceparent/tracestate headers.
 *
 * @param headers - Header map (e.g. incoming HTTP request headers).
 * @returns The extracted SpanContext, or null if no valid traceparent header
 *          is present or the header is malformed.
 */
export declare function extractTraceContext(headers: Record<string, string>): SpanContext | null;
/**
 * Sets `gen_ai.delegation.parent_run_id` on the given span.
 *
 * Every span emitted by a child delegation cycle MUST carry this attribute
 * so that trace queries in Tempo / Langfuse can reconstruct delegation trees.
 *
 * @param span        - The OTel Span to annotate (must be recording).
 * @param parentRunId - The runId of the parent agent cycle.
 */
export declare function withDelegationAttribute(span: Span, parentRunId: string): void;
//# sourceMappingURL=trace-context.d.ts.map