import type { StreamConfig } from "../config.js";
import type { StreamEventBus } from "../event-bus.js";
import type { StreamObserver } from "../observer.js";
export interface LogRef {
    content: string;
}
export interface LoggingPolicyConfig {
    /** Whether to redact secrets from logged content */
    secretRedactionEnabled: boolean;
    /** Whether to save log artifacts (disabled for cloud-prem by default) */
    artifactSavingEnabled: boolean;
}
export interface LoggingObserverOptions {
    logRef?: LogRef;
    /** Policy configuration for secret redaction and artifact saving */
    policy?: LoggingPolicyConfig;
}
/**
 * Observer that captures detailed logs of LLM interactions.
 *
 * @example
 * ```typescript
 * const logRef = { content: "" };
 * const observer = new LoggingObserver({ logRef });
 * // Access logs during streaming: console.log(logRef.content)
 * ```
 */
export declare class LoggingObserver implements StreamObserver {
    private readonly logRef;
    private readonly policy;
    private sessionStartTime?;
    private currentTextBuffer;
    private currentReasoningBuffer;
    private reasoningLoggedViaChunks;
    /** Queue for async operations (tool redaction, request logging) to preserve ordering */
    private readonly operationQueue;
    constructor(options?: LoggingObserverOptions);
    /**
     * Redact secrets from content if policy enables it.
     */
    private redactContent;
    attach(events: StreamEventBus, config: StreamConfig): void;
    private onSessionStart;
    private onRequestStart;
    private onStepStart;
    private onChunk;
    private flushTextBuffer;
    private flushReasoningBuffer;
    private formatToolCall;
    private formatToolResult;
    /**
     * Redact secrets from tool data (input or output).
     * Scans independently if no cached redactor is available.
     */
    private redactToolDataAsync;
    private onStepComplete;
    private onRetry;
    private onFallback;
    private onStreamFinish;
    private onSessionComplete;
    private onSessionError;
    private onSessionAbort;
    private computeDuration;
    private saveLog;
    getLogContent(): string;
}
//# sourceMappingURL=logging.d.ts.map