import { type ToolCallSummary } from "./stream-helpers.js"; import type { Cost, SessionUpdate, SessionUpdateNotification } from "./types.js"; type SessionUpdateStreamItem = SessionUpdateNotification | SessionUpdate; export type RunExitStatus = "success" | "failed"; export interface RunReportUsage { used: number; size: number; updates: number; cost?: Cost | null; } export interface RunReportError { message: string; toolCallId?: string; } export interface RunReport { runId: string; startTime: string; endTime: string; exitStatus: RunExitStatus; toolCalls: ToolCallSummary[]; usage: RunReportUsage; errors: RunReportError[]; } export interface GenerateRunReportOptions { runId?: string; startTime?: string | Date; endTime?: string | Date; exitStatus?: RunExitStatus; errors?: string[]; now?: () => Date; } export type RunReportFileSystem = { mkdir(path: string, options?: { recursive?: boolean; }): Promise; writeFile(path: string, data: string, options?: { encoding?: BufferEncoding; flag?: string; }): Promise; rm(path: string, options?: { force?: boolean; }): Promise; rename?(oldPath: string, newPath: string): Promise; realpath?(path: string): Promise; }; export interface SaveRunReportOptions { fs?: RunReportFileSystem; homeDir?: string; includeRawContent?: boolean; now?: () => Date; } export interface SavedRunReportPaths { reportsDir: string; jsonPath: string; summaryPath: string; } export declare function generateRunReportFromSessionUpdateStream(stream: AsyncIterable | Iterable, options?: GenerateRunReportOptions): Promise; export declare function formatRunReportSummary(report: RunReport): string; export declare function saveRunReport(report: RunReport, options?: SaveRunReportOptions): Promise; export {};