/**
 * Logging utility for workflows-core
 *
 * Provides structured logging with pluggable sinks:
 * - Uses stderr for all local logging by default
 * - Supports external log sinks (e.g., MCP notifications) via LogSink interface
 * - Provides structured logging with proper levels:
 *   - debug: Tracing and detailed execution flow
 *   - info: Success operations and important milestones
 *   - warn: Expected errors and recoverable issues
 *   - error: Caught but unexpected errors
 */
export declare enum LogLevel {
    DEBUG = 0,
    INFO = 1,
    WARN = 2,
    ERROR = 3,
    SILENT = 4
}
export interface LogContext {
    component?: string;
    conversationId?: string;
    phase?: string;
    operation?: string;
    [key: string]: unknown;
}
/**
 * Interface for external log sinks (e.g., MCP notifications, console, file)
 * Implementations can be registered to receive log messages
 */
export interface LogSink {
    /**
     * Called when a log message should be sent to the sink
     * @param level - Log level (debug, info, warning, error)
     * @param logger - Component name that generated the log
     * @param message - Log message
     * @param context - Optional structured context
     */
    log(level: 'debug' | 'info' | 'warning' | 'error', logger: string, message: string, context?: LogContext): Promise<void>;
}
/**
 * Logger interface for dependency injection
 * Allows handlers to receive a logger without importing the global createLogger
 */
export interface ILogger {
    debug(message: string, context?: LogContext): void;
    info(message: string, context?: LogContext): void;
    warn(message: string, context?: LogContext): void;
    error(message: string, error?: Error, context?: LogContext): void;
}
/**
 * Factory function type for creating loggers
 * Can be injected to provide different logging implementations
 */
export type LoggerFactory = (component: string) => ILogger;
/**
 * Register a log sink to receive log messages
 * Used by mcp-server to register MCP notification sink
 */
export declare function registerLogSink(sink: LogSink): void;
/**
 * Clear the registered log sink
 */
export declare function clearLogSink(): void;
/**
 * Set the logging level programmatically
 */
export declare function setLoggingLevel(level: LogLevel): void;
/**
 * Set the logging level from a string (e.g., from MCP client request)
 */
export declare function setLoggingLevelFromString(level: string): void;
declare class Logger {
    private component;
    private explicitLogLevel;
    constructor(component: string, logLevel?: LogLevel);
    private getCurrentLogLevel;
    private getLogLevelFromEnv;
    private shouldLog;
    private formatMessage;
    /**
     * Send log message to registered sink if available
     */
    private sendToSink;
    debug(message: string, context?: LogContext): void;
    info(message: string, context?: LogContext): void;
    warn(message: string, context?: LogContext): void;
    error(message: string, error?: Error, context?: LogContext): void;
    child(childComponent: string): Logger;
}
export declare function createLogger(component: string, logLevel?: LogLevel): Logger;
export declare const logger: Logger;
export {};
