/** * Logger Context * AsyncLocalStorage correlation for structured logging */ import type { LogContext } from './types.js'; /** Correlation fields merged into every log line while the store is active (via pino mixin). */ declare const ASYNC_LOG_CORRELATION_KEYS: readonly ["requestId", "sessionKey", "sessionId", "userId", "correlationId"]; type AsyncLogCorrelationKey = (typeof ASYNC_LOG_CORRELATION_KEYS)[number]; /** * Run *fn* with merged async log context. Propagates through async/await (Node AsyncLocalStorage). * Nested calls merge over the parent context (shallow per key). */ export declare function runWithLogContext(context: LogContext, fn: () => T): T; /** Current async log context, if any. */ export declare function getAsyncLogContext(): LogContext | undefined; /** * Shallow-merge fields into the current async log context (e.g. set session identifiers after parsing a body). * No-op when not inside {@link runWithLogContext}. */ export declare function updateAsyncLogContext(partial: LogContext): void; /** Keys injected from async context into log records (used by logger mixin). */ export declare function getAsyncLogCorrelationKeys(): readonly AsyncLogCorrelationKey[]; export declare function inboundCorrelationMetadataFromAsyncLogContext(): Record | undefined; /** Shallow-merge two log context objects. */ export declare function mergeContext(base: LogContext, additional: LogContext): LogContext; export {};