/** * Pure helper functions for CLI log filtering and formatting. * Extracted from cli.ts registerLogsCommand for testability. * @since v2.10.0 */ export declare const LOG_LEVEL_ORDER: Record; export interface JsonlEntry { ts: string; level: string; cat?: string; msg: string; dur?: number; ctx?: Record; err?: { name: string; message: string; stack?: string[]; }; } export interface LogFilterOptions { level?: string; grep?: string; limit?: number; } /** * Creates a regex or substring matcher with ReDoS protection. * Falls back to case-insensitive substring for long (>200 chars) or invalid patterns. */ export declare function createSafeMatcher(pattern: string): (s: string) => boolean; /** * Filters plain text log lines by [LEVEL] tags and grep pattern, with limit. * Lines are expected in chronological order; limit takes the last N lines. */ export declare function filterPlainLogLines(lines: string[], options: LogFilterOptions): string[]; /** * Parses JSONL lines, dropping invalid JSON silently. */ export declare function parseJsonlEntries(lines: string[]): JsonlEntry[]; /** * Filters parsed JSONL entries by level threshold and grep across msg/cat/ctx. * Level threshold means e.g. "warn" includes warn + error. */ export declare function filterJsonlEntries(entries: JsonlEntry[], options: LogFilterOptions): JsonlEntry[]; /** * Returns structured data for terminal display (no chalk -- caller colors). */ export declare function formatJsonlEntry(entry: JsonlEntry): { time: string; level: string; cat: string; msg: string; dur: string; ctx: Array<{ key: string; value: string; }>; err: { name: string; message: string; } | null; }; //# sourceMappingURL=cli-log-helpers.d.ts.map