import type { LoggingConfig, LoggingLevel } from '../../config/unified-config-types';
export type { LoggingConfig, LoggingLevel };
/**
 * Canonical request lifecycle stages.
 *
 * Order represents typical flow but stages may be skipped or repeated.
 * - intake:    inbound request received at an entry edge (HTTP handler, CLI dispatch)
 * - route:     destination/profile/target resolution
 * - auth:      authentication/authorization (token exchange, profile auth)
 * - dispatch:  outbound request prepared / child process spawned
 * - upstream:  upstream call in flight (provider HTTP / spawned child running)
 * - transform: payload translation (request/response shape conversion)
 * - respond:   response written / dispatched to caller (latencyMs typically populated here)
 * - cleanup:   error path, abort, teardown
 */
export type LogStage = 'intake' | 'route' | 'auth' | 'dispatch' | 'upstream' | 'transform' | 'respond' | 'cleanup';
export declare const LOG_STAGES: readonly LogStage[];
export interface LogErrorInfo {
    name: string;
    message: string;
    code?: string;
    stack?: string;
}
export interface LogEntry {
    id: string;
    timestamp: string;
    level: LoggingLevel;
    source: string;
    event: string;
    message: string;
    processId: number;
    runId: string;
    context?: Record<string, unknown>;
    /** Correlates entries belonging to a single inbound request across stages. */
    requestId?: string;
    /** Lifecycle stage tag — see {@link LogStage}. */
    stage?: LogStage;
    /** Elapsed time in milliseconds, typically attached to `respond`/`cleanup`. */
    latencyMs?: number;
    /** Structured error metadata; never stores raw token strings. */
    error?: LogErrorInfo;
}
export interface LogSourceSummary {
    source: string;
    label: string;
    kind: 'native' | 'legacy';
    count: number;
    lastTimestamp: string | null;
}
export interface ReadLogEntriesOptions {
    source?: string;
    level?: LoggingLevel;
    search?: string;
    limit?: number;
}
export declare const LOG_LEVELS: readonly LoggingLevel[];
export declare function shouldWriteLogLevel(level: LoggingLevel, configuredLevel: LoggingLevel): boolean;
export declare function isLoggingLevel(value: string | undefined): value is LoggingLevel;
export declare function isLogStage(value: string | undefined): value is LogStage;
//# sourceMappingURL=log-types.d.ts.map