import type { WorkProfile } from "@oh-my-pi/pi-natives"; import type { CpuProfile, HeapSnapshot } from "./profiler"; export interface ReportBundleOptions { /** Session file path */ sessionFile: string | undefined; /** Settings to include */ settings?: Record; /** CPU profile (for performance reports) */ cpuProfile?: CpuProfile; /** Heap snapshot (for memory reports) */ heapSnapshot?: HeapSnapshot; /** Work profile (for work scheduling reports) */ workProfile?: WorkProfile; } export interface ReportBundleResult { path: string; files: string[]; } export interface DebugLogSource { getInitialText(): Promise; hasOlderLogs(): boolean; loadOlderLogs(limitDays?: number): Promise; } /** * Create a debug report bundle. * * Bundle contents: * - session.jsonl: Current session transcript * - artifacts/: Session artifacts directory * - subagents/: Subagent sessions + artifacts * - logs.txt: Recent log entries * - system.json: OS, arch, CPU, memory, versions * - env.json: Sanitized environment variables * - config.json: Resolved settings * - profile.cpuprofile: CPU profile (performance report only) * - profile.md: Markdown CPU profile (performance report only) * - heap.heapsnapshot: Heap snapshot (memory report only) * - work.folded: Work profile folded stacks (work report only) * - work.md: Work profile summary (work report only) * - work.svg: Work profile flamegraph (work report only) */ export declare function createReportBundle(options: ReportBundleOptions): Promise; /** Get recent log entries for display (tail-limited to avoid OOM on large files). */ export declare function getLogText(): Promise; export declare function createDebugLogSource(): Promise; /** Calculate total size of artifact cache */ export declare function getArtifactCacheStats(sessionsDir: string): Promise<{ count: number; totalSize: number; oldestDate: Date | null; }>; /** Clear artifact cache older than N days */ export declare function clearArtifactCache(sessionsDir: string, daysOld?: number): Promise<{ removed: number; }>;