/** * JSON utilities for logging and formatting */ /** * Set the dev mode flag. * Called by logger.enableDevLog() to indicate we're in dev mode. * * @param enabled - Whether dev mode is enabled */ export declare function setDevModeEnabled(enabled: boolean): void; /** * Get the dev mode flag. * Returns true if we're in dev mode (dev log is enabled). * * @returns boolean indicating whether dev mode is enabled */ export declare function isDevModeEnabled(): boolean; /** * Type for the config getter function to avoid direct import dependency. */ type ConfigGetter = () => { system: { logging: { jsonPretty: boolean; mcpCommDebug: boolean; apiDebug: boolean; gatewayDebug: boolean; showTraceContext?: boolean; }; }; }; /** * Set the config getter for jsonPretty setting. * This allows retrieving the setting from config without direct import dependency. * * @param getter - Function that returns the config object, or null to reset */ export declare function setJsonPrettyConfigGetter(getter: ConfigGetter | null): void; /** * Convert Node.js rawHeaders array [key1, value1, key2, value2, ...] to object * @param rawHeaders Node.js rawHeaders array * @returns Headers as key-value object */ export declare function rawHeadersToObject(rawHeaders: string[]): Record; /** * Stringify Node.js rawHeaders array for logging * Converts [key1, value1, key2, value2, ...] to readable object format * @param rawHeaders Node.js rawHeaders array * @returns Formatted JSON string */ export declare function stringifyRawHeadersForLogging(rawHeaders: string[]): string; /** * Get JSON pretty setting from config getter. * * @returns boolean indicating whether to use pretty JSON formatting */ export declare function getJsonPrettySetting(): boolean; /** * Get MCP communication debug setting from config getter. * * @returns boolean indicating whether to enable MCP communication debug logging */ export declare function getMcpCommDebugSetting(): boolean; /** * Get API debug setting from config getter. * * @returns boolean indicating whether to enable API debug logging */ export declare function getApiDebugSetting(): boolean; /** * Get Gateway debug setting from config getter. * * @returns boolean indicating whether to enable Gateway debug logging */ export declare function getGatewayDebugSetting(): boolean; /** * Get the showTraceContext configuration value. * Controls whether [SSN]/[TID]/[SID] trace context markers appear in log output. * Defaults to true. * * @returns boolean indicating whether to show trace context in logs */ export declare function getShowTraceContextSetting(): boolean; /** * Stringify object for logging with dynamic pretty formatting based on LOG_JSON_PRETTY environment variable * @param obj Object to stringify * @returns Formatted JSON string */ export declare function stringifyForLogging(obj: unknown): string; /** * Stringify object for logging with replacer and dynamic pretty formatting based on LOG_JSON_PRETTY environment variable * @param obj Object to stringify * @param replacer Optional replacer function * @returns Formatted JSON string */ export declare function stringifyForLoggingWithReplacer(obj: unknown, replacer?: (key: string, value: unknown) => unknown): string; export {}; //# sourceMappingURL=json-utils.d.ts.map