import { L as LogIngestConfig, a as LogEventMapping, R as RedactionRule } from './log-config-DAV_sR9A.js'; export { b as RedactionStrategy } from './log-config-DAV_sR9A.js'; import { d as InspectEvent, a as InspectRunTree } from './inspect-event-ClM5Z8om.js'; type ParserWarningCode = "MALFORMED_JSON" | "MISSING_RUN_ID" | "MISSING_EVENT" | "MISSING_TIMESTAMP" | "UNSUPPORTED_LOG4JS_PAYLOAD" | "CONFIG_ERROR" | "UNKNOWN"; interface ParserWarning { code: ParserWarningCode; message: string; file?: string; line?: number; raw?: string; } interface ParseResult { records: T[]; warnings: ParserWarning[]; } declare const DEFAULT_LOG_INGEST_CONFIG: LogIngestConfig; declare function mergeLogIngestConfig(base: LogIngestConfig, override: Partial): LogIngestConfig; declare function loadLogIngestConfig(configPath?: string): Promise; interface RawLogRecord { raw: Record; file?: string; line: number; sourceType: "json-log" | "log4js"; } declare class JsonLogParser { parseLines(lines: string[], filePath?: string): ParseResult; parseFile(filePath: string): Promise>; } declare class Log4jsParser { parseLines(lines: string[], filePath?: string): ParseResult; parseFile(filePath: string): Promise>; } declare function wildcardMatch(pattern: string, value: string): boolean; declare function matchMapping(eventName: string, mappings?: Record): LogEventMapping | undefined; declare const DEFAULT_REDACT_KEYS: readonly ["authorization", "cookie", "token", "apiKey", "password", "secret", "email"]; interface RedactorOptions { rules?: RedactionRule[]; /** Additional exact keys (case-insensitive) to redact in addition to defaults. */ extraKeys?: readonly string[]; } declare class Redactor { #private; constructor(options?: RedactorOptions); /** Field names this redactor treats as sensitive, for value-level helpers. */ get sensitiveKeys(): readonly string[]; redactValue(key: string, value: unknown): unknown; redactRecord(record: Record): Record; } interface NormalizeOptions { config: LogIngestConfig; sourceFile?: string; } declare class EventNormalizer { #private; constructor(options: NormalizeOptions); normalize(record: RawLogRecord): InspectEvent | ParserWarning; normalizeAll(records: RawLogRecord[]): ParseResult; } interface TreeBuilderOptions { config?: LogIngestConfig; } declare class TreeBuilder { constructor(options?: TreeBuilderOptions); build(events: InspectEvent[]): InspectRunTree[]; } interface RenderTreeOptions { verbose?: boolean; showConfidence?: "always" | "non-explicit" | "never"; showMetadata?: boolean; color?: boolean; maxAttributeLength?: number; summary?: boolean; } declare function renderRunTree(tree: InspectRunTree, options?: RenderTreeOptions): string; declare function renderRunTrees(trees: InspectRunTree[], options?: RenderTreeOptions): string; type LogSourceFormat = "json" | "log4js" | "auto"; interface ParseLogLineOptions { format?: LogSourceFormat; file?: string; line?: number; } declare function parseLogLine(line: string, options?: ParseLogLineOptions): ParseResult; interface LiveLogUpdate { events: InspectEvent[]; trees: InspectRunTree[]; warnings: ParserWarning[]; } interface LiveLogAccumulatorOptions { config: LogIngestConfig; format?: LogSourceFormat; file?: string; } declare class LiveLogAccumulator { #private; constructor(options: LiveLogAccumulatorOptions); pushLine(line: string, lineNumber?: number): LiveLogUpdate; getEvents(): InspectEvent[]; getTrees(): InspectRunTree[]; getWarnings(): ParserWarning[]; reset(): void; } interface ParseLogsOptions { format?: "json" | "log4js" | "auto"; config?: LogIngestConfig; configPath?: string; runIdKeys?: string[]; eventKey?: string; timestampKey?: string; messageKey?: string; levelKey?: string; parentIdKey?: string; durationKey?: string; statusKey?: string; warnings?: "none" | "summary" | "all"; } interface LogToTreeResult { events: InspectEvent[]; trees: InspectRunTree[]; warnings: ParserWarning[]; } /** * @experimental Compatibility-oriented API for parsing structured logs into normalized run trees. * Subject to refinement before a future stability declaration. */ declare function parseLogsToTrees(filePath: string, options?: ParseLogsOptions): Promise; export { DEFAULT_LOG_INGEST_CONFIG, DEFAULT_REDACT_KEYS, EventNormalizer, JsonLogParser, LiveLogAccumulator, type LiveLogAccumulatorOptions, type LiveLogUpdate, Log4jsParser, LogEventMapping, LogIngestConfig, type LogSourceFormat, type LogToTreeResult, type NormalizeOptions, type ParseLogLineOptions, type ParseLogsOptions, type ParseResult, type ParserWarning, type ParserWarningCode, type RawLogRecord, RedactionRule, Redactor, type RedactorOptions, type RenderTreeOptions, TreeBuilder, type TreeBuilderOptions, loadLogIngestConfig, matchMapping, mergeLogIngestConfig, parseLogLine, parseLogsToTrees, renderRunTree, renderRunTrees, wildcardMatch };