import type { SpanEmitter } from './emitter.js'; /** * Ambient trace context. Scoped strictly to callback lifetimes * (`storage.run`) — no `enterWith`-style unscoped entry, so the design * maps 1:1 onto Python contextvars for a future SDK. */ export interface TraceStore { traceId: string; /** The current span — new spans and outgoing calls parent to it. */ spanId: string; gateId: string | null; conversationId: string | null; emitter: SpanEmitter; nextSequence(): number; } interface ContextStorage { run(store: T, fn: () => R): R; getStore(): T | undefined; } export declare function ensureAsyncContext(): Promise; export declare const traceStorage: ContextStorage; export declare function trackTraceScope(delta: 1 | -1): void; export declare function hasActiveTracesElsewhere(): boolean; export declare function warnDetachedOnce(context: string): void; export declare function _resetDetachedWarningForTests(): void; export declare function warnLegacySessionIdOnce(): void; export declare function observeConversationId(id: string | null): void; export declare function _resetConversationTrackingForTests(): void; export {}; //# sourceMappingURL=context.d.ts.map