export interface SwarmEvent { id: string; type: 'wiki_query' | 'wiki_publish' | 'tool_call' | 'collaboration'; label: string; detail: string; timestamp: number; } export interface SwarmSpan { id: string; parentId?: string | undefined; sessionId: string; agentKey: string; agentName: string; department: string; task: string; status: 'running' | 'completed' | 'failed'; startedAt: number; endedAt?: number; durationMs?: number; events: SwarmEvent[]; error?: string; } export declare class SwarmTraceTracker { private static instance; private storage; private activeSpans; private constructor(); static getInstance(): SwarmTraceTracker; getActiveSpanId(): string | undefined; startSpan(config: { sessionId: string; agentKey: string; agentName: string; department: string; task: string; }): Promise; runWithSpan(span: SwarmSpan, callback: () => Promise): Promise; endSpan(id: string, status: 'completed' | 'failed', error?: string): Promise; recordEvent(type: SwarmEvent['type'], label: string, detail: string): Promise; private writeLogLine; } export declare function loadSessionSpans(sessionId: string): Promise; export declare function renderTraceTree(spans: SwarmSpan[]): string; export declare function filterSpans(spans: SwarmSpan[], filters: { dept?: string; agent?: string; status?: string; }): SwarmSpan[]; export interface DeptStats { dept: string; spans: number; durationMs: number; tools: number; collabs: number; wikiQueries: number; wikiPublishes: number; } export interface SessionStats { sessionId: string; totalSpans: number; totalDurationMs: number; totalTools: number; totalCollabs: number; totalWikiQueries: number; totalWikiPublishes: number; depts: DeptStats[]; } export declare function computeSessionStats(spans: SwarmSpan[], sessionId: string): SessionStats; export declare function printStatsTable(stats: SessionStats): void; export declare function openBrowser(urlOrPath: string): void; export declare function generateHtmlDashboard(spans: SwarmSpan[], sessionId: string): string; //# sourceMappingURL=traces.d.ts.map