type DebugLevel = 'debug' | 'info' | 'warn' | 'error'; type DebugDetailLevel = 'debug' | 'verbose' | 'trace'; type DebugFormat = 'ai' | 'human'; type DebugMeta = Record; interface DebugEntry { timestamp: number; namespace: string; level: DebugLevel; message: string; meta?: DebugMeta; traceId?: string; spanId?: string; parentSpanId?: string; duration?: number; group?: string; groupDepth?: number; } interface DebugContext { format?: DebugFormat; detailLevel?: DebugDetailLevel; namespace?: string; traceId?: string; spanId?: string; parentSpanId?: string; groupDepth?: number; enabled?: boolean; } interface DebugTreeNode { entry: DebugEntry; children: DebugTreeNode[]; depth: number; } interface DebugFilterOptions { namespace?: string | RegExp; level?: DebugLevel | DebugLevel[]; timeRange?: { from?: number; to?: number; }; search?: string; traceId?: string; } interface DebugExportOptions { format?: 'json' | 'chrome' | 'text'; path?: string; filter?: DebugFilterOptions; includeMeta?: boolean; } declare function formatDebugEntryAI(entry: DebugEntry): string; declare function formatDebugEntriesAI(entries: DebugEntry[]): string; declare function shouldUseAIFormat(format?: DebugFormat, jsonMode?: boolean): boolean; interface HumanFormatterOptions { showTimestamp?: boolean; showDuration?: boolean; groupBy?: 'namespace' | 'group' | 'none'; } declare function formatDebugEntryHuman(entry: DebugEntry, options?: HumanFormatterOptions): string; declare function formatDebugEntriesHuman(entries: DebugEntry[], options?: HumanFormatterOptions): string; declare function formatTimelineNode(node: DebugTreeNode, isLast: boolean, prefix?: string, maxDepth?: number): string[]; declare function formatTimeline(entries: DebugEntry[]): string; declare function formatTimelineWithSummary(entries: DebugEntry[]): string; interface DebugOutputOptions extends HumanFormatterOptions { format?: DebugFormat; detailLevel?: DebugDetailLevel; useTimeline?: boolean; } declare function formatDebugOutput(entry: DebugEntry, options?: DebugOutputOptions): string; declare function formatDebugOutputs(entries: DebugEntry[], options?: DebugOutputOptions): string; declare class DebugSection { private readonly entries; private readonly title; private readonly options; constructor(title: string, options?: DebugOutputOptions); add(entry: DebugEntry): void; addAll(entries: DebugEntry[]): void; clear(): void; format(): string; get count(): number; } declare class DebugOutput { private readonly sections; private readonly globalEntries; private readonly options; constructor(options?: DebugOutputOptions); add(entry: DebugEntry): void; addToSection(sectionName: string, entry: DebugEntry): void; getSection(sectionName: string): DebugSection; format(): string; clear(): void; get totalCount(): number; } interface DebugTreeOptions { showSummary?: boolean; maxDepth?: number; } declare class DebugTree { private tree; private readonly options; constructor(entries: DebugEntry[], options?: DebugTreeOptions); update(entries: DebugEntry[]): void; format(): string; private getSummary; private collectStats; get root(): DebugTreeNode | null; } interface TraceOptions { showSummary?: boolean; groupByPlugin?: boolean; maxDepth?: number; } declare class DebugTrace { private readonly entries; private readonly options; constructor(entries?: DebugEntry[], options?: TraceOptions); add(entry: DebugEntry): void; addAll(entries: DebugEntry[]): void; clear(): void; format(): string; private formatGrouped; getStats(): { totalEntries: number; plugins: string[]; totalDuration: number; errorCount: number; warnCount: number; }; } declare function filterByNamespace(entries: DebugEntry[], pattern: string | RegExp): DebugEntry[]; declare function filterByLevel(entries: DebugEntry[], level: string | string[]): DebugEntry[]; declare function filterByTimeRange(entries: DebugEntry[], from?: number, to?: number): DebugEntry[]; declare function searchInLogs(entries: DebugEntry[], query: string): DebugEntry[]; declare function filterDebugEntries(entries: DebugEntry[], options: DebugFilterOptions): DebugEntry[]; declare function groupByNamespace(entries: DebugEntry[]): Map; declare function groupByGroup(entries: DebugEntry[]): Map; declare function createDebugTree(entries: DebugEntry[]): DebugTreeNode | null; declare function exportToJSON(entries: DebugEntry[], options?: DebugExportOptions): string; declare function exportToChromeFormat(entries: DebugEntry[], options?: DebugExportOptions): string; declare function exportToPlainText(entries: DebugEntry[], options?: DebugExportOptions): string; declare function exportDebugEntries(entries: DebugEntry[], options: DebugExportOptions): string; declare function describeEntriesHuman(entries: DebugEntry[], options?: DebugFilterOptions): string; declare function describeEntriesAI(entries: DebugEntry[], options?: DebugFilterOptions): string; declare function describeEntriesTimeline(entries: DebugEntry[], options?: DebugFilterOptions): string; export { type DebugContext, type DebugDetailLevel, type DebugEntry, type DebugExportOptions, type DebugFilterOptions, type DebugFormat, type DebugLevel, type DebugMeta, DebugOutput, type DebugOutputOptions, DebugSection, DebugTrace, DebugTree, type DebugTreeNode, type DebugTreeOptions, type HumanFormatterOptions, type TraceOptions, createDebugTree, describeEntriesAI, describeEntriesHuman, describeEntriesTimeline, exportDebugEntries, exportToChromeFormat, exportToJSON, exportToPlainText, filterByLevel, filterByNamespace, filterByTimeRange, filterDebugEntries, formatDebugEntriesAI, formatDebugEntriesHuman, formatDebugEntryAI, formatDebugEntryHuman, formatDebugOutput, formatDebugOutputs, formatTimeline, formatTimelineNode, formatTimelineWithSummary, groupByGroup, groupByNamespace, searchInLogs, shouldUseAIFormat };