import { z } from "zod"; import { Agent, type AgentInvokeOptions, type AgentOptions, type Message } from "./agent.js"; export declare abstract class Model extends Agent { options?: (Omit, "model"> & { modelOptions?: Record; }) | undefined; constructor(options?: (Omit, "model"> & { modelOptions?: Record; }) | undefined); /** * Resolves model options by merging instance-level and input-level options, * and recursively resolving getter patterns * * @param input - The input message containing potential modelOptions * @param options - The agent invocation options containing context * @returns Resolved model options with all getters replaced by actual values */ getModelOptions(input: Message, options: AgentInvokeOptions): Promise>; protected preprocess(input: I, options: AgentInvokeOptions): Promise; transformFileType(fileType: "file", data: FileUnionContent): Promise; transformFileType(fileType: "local" | undefined, data: FileUnionContent): Promise; transformFileType(fileType: FileType | undefined, data: FileUnionContent): Promise; static getFileExtension(type: string): Promise; static getMimeType(filename: string): Promise; downloadFile(url: string): Promise; } export type FileType = "local" | "file" | "url"; export declare const fileTypeSchema: z.ZodEnum<["local", "file", "url"]>; export interface FileContentBase { filename?: string; mimeType?: string; } export declare const fileContentBaseSchema: z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; }, "strip", z.ZodTypeAny, { filename?: string | undefined; mimeType?: string | undefined; }, { filename?: string | undefined; mimeType?: string | undefined; }>; export interface UrlContent extends FileContentBase { type: "url"; url: string; } export declare const urlContentSchema: z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }>; export interface FileContent extends FileContentBase { type: "file"; data: string; } export declare const fileContentSchema: z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"file">; data: z.ZodString; }, "strip", z.ZodTypeAny, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }>; export interface LocalContent extends FileContentBase { type: "local"; path: string; } export declare const localContentSchema: z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"local">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }>; export type FileUnionContent = LocalContent | UrlContent | FileContent; export declare const fileUnionContentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"local">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"file">; data: z.ZodString; }, "strip", z.ZodTypeAny, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }>]>; export declare const fileUnionContentsSchema: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"local">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"file">; data: z.ZodString; }, "strip", z.ZodTypeAny, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }>]>, z.ZodArray; mimeType: z.ZodType; } & { type: z.ZodLiteral<"local">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }, { path: string; type: "local"; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"url">; url: z.ZodString; }, "strip", z.ZodTypeAny, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "url"; url: string; filename?: string | undefined; mimeType?: string | undefined; }>, z.ZodObject<{ filename: z.ZodType; mimeType: z.ZodType; } & { type: z.ZodLiteral<"file">; data: z.ZodString; }, "strip", z.ZodTypeAny, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }, { type: "file"; data: string; filename?: string | undefined; mimeType?: string | undefined; }>]>, "many">]>;