export interface OutputFile {
  name: string;
  mimeType: string;
  blob: Blob;
  sizeBefore?: number;
  sizeAfter?: number;
}

export type ToolOutputDefinition =
  | { type: "text" }
  | { type: "files" }
  | { type: "json" }
  | { type: "table" };

export type ToolResult =
  | {
      type: "text";
      value: string;
      language?: "plain" | "json" | "html" | "markdown";
    }
  | {
      type: "files";
      files: OutputFile[];
    }
  | {
      type: "json";
      value: unknown;
    }
  | {
      type: "table";
      columns: string[];
      rows: Array<Array<string | number | boolean | null>>;
    };
