/** Validates character inputs with strict top-level keys and extensible content/settings. Knowledge fills empty documents; template callbacks require in-process input. */ import z from "zod"; import type { Character, TemplateType } from "./types/agent.js"; import type { JsonValue } from "./types/primitives.js"; export declare const uuidSchema: z.ZodString; export declare const mediaSchema: z.ZodObject<{ id: z.ZodString; url: z.ZodString; title: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>; export declare const contentSchema: z.ZodObject<{ text: z.ZodOptional; thought: z.ZodOptional; actions: z.ZodOptional>; providers: z.ZodOptional>; source: z.ZodOptional; target: z.ZodOptional; url: z.ZodOptional; inReplyTo: z.ZodOptional; attachments: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>>>; channelType: z.ZodOptional>; }, z.core.$loose>; export declare const messageExampleSchema: z.ZodObject<{ name: z.ZodString; content: z.ZodObject<{ text: z.ZodOptional; thought: z.ZodOptional; actions: z.ZodOptional>; providers: z.ZodOptional>; source: z.ZodOptional; target: z.ZodOptional; url: z.ZodOptional; inReplyTo: z.ZodOptional; attachments: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>>>; channelType: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>; export declare const documentDirectorySchema: z.ZodObject<{ path: z.ZodString; shared: z.ZodOptional; }, z.core.$strip>; export declare const documentItemSchema: z.ZodUnion; value: z.ZodString; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ item: z.ZodObject<{ case: z.ZodLiteral<"directory">; value: z.ZodObject<{ path: z.ZodString; shared: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>]>; export declare const messageExampleGroupSchema: z.ZodObject<{ examples: z.ZodArray; thought: z.ZodOptional; actions: z.ZodOptional>; providers: z.ZodOptional>; source: z.ZodOptional; target: z.ZodOptional; url: z.ZodOptional; inReplyTo: z.ZodOptional; attachments: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>>>; channelType: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>; }, z.core.$strip>; export declare const styleSchema: z.ZodOptional>; chat: z.ZodDefault>; post: z.ZodDefault>; }, z.core.$strip>>; export declare const settingsSchema: z.ZodOptional; providersTotalTimeoutMs: z.ZodOptional; alwaysRespondChannels: z.ZodOptional; alwaysRespondSources: z.ZodOptional; defaultTemperature: z.ZodOptional; defaultMaxTokens: z.ZodOptional; maxReplyTokens: z.ZodOptional; defaultFrequencyPenalty: z.ZodOptional; defaultPresencePenalty: z.ZodOptional; extra: z.ZodOptional>>>; }, z.core.$loose>, z.ZodTransform, { [x: string]: unknown; shouldRespondModel?: string | undefined; providersTotalTimeoutMs?: number | undefined; alwaysRespondChannels?: string | undefined; alwaysRespondSources?: string | undefined; defaultTemperature?: number | undefined; defaultMaxTokens?: number | undefined; maxReplyTokens?: undefined; defaultFrequencyPenalty?: number | undefined; defaultPresencePenalty?: number | undefined; extra?: Record | undefined; }>>>; export declare const secretsSchema: z.ZodDefault>>; export declare const characterSchema: z.ZodPipe; name: z.ZodString; username: z.ZodOptional; system: z.ZodOptional; templates: z.ZodDefault]>>>; bio: z.ZodPipe]>>, z.ZodTransform>; messageExamples: z.ZodDefault; thought: z.ZodOptional; actions: z.ZodOptional>; providers: z.ZodOptional>; source: z.ZodOptional; target: z.ZodOptional; url: z.ZodOptional; inReplyTo: z.ZodOptional; attachments: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>>>; channelType: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>; }, z.core.$strip>, z.ZodArray; thought: z.ZodOptional; actions: z.ZodOptional>; providers: z.ZodOptional>; source: z.ZodOptional; target: z.ZodOptional; url: z.ZodOptional; inReplyTo: z.ZodOptional; attachments: z.ZodOptional; source: z.ZodOptional; description: z.ZodOptional; text: z.ZodOptional; contentType: z.ZodOptional>; }, z.core.$loose>>>; channelType: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>]>>, z.ZodTransform<{ examples: { name: string; content: { [x: string]: unknown; text?: string | undefined; thought?: string | undefined; actions?: string[] | undefined; providers?: string[] | undefined; source?: string | undefined; target?: string | undefined; url?: string | undefined; inReplyTo?: string | undefined; attachments?: { [x: string]: unknown; id: string; url: string; title?: string | undefined; source?: string | undefined; description?: string | undefined; text?: string | undefined; contentType?: "image" | "video" | "audio" | "document" | "link" | undefined; }[] | undefined; channelType?: "SELF" | "DM" | "GROUP" | "VOICE_DM" | "VOICE_GROUP" | "FEED" | "THREAD" | "WORLD" | "FORUM" | "AUTONOMOUS" | "API" | undefined; }; }[]; }[], ({ name: string; content: { [x: string]: unknown; text?: string | undefined; thought?: string | undefined; actions?: string[] | undefined; providers?: string[] | undefined; source?: string | undefined; target?: string | undefined; url?: string | undefined; inReplyTo?: string | undefined; attachments?: { [x: string]: unknown; id: string; url: string; title?: string | undefined; source?: string | undefined; description?: string | undefined; text?: string | undefined; contentType?: "image" | "video" | "audio" | "document" | "link" | undefined; }[] | undefined; channelType?: "SELF" | "DM" | "GROUP" | "VOICE_DM" | "VOICE_GROUP" | "FEED" | "THREAD" | "WORLD" | "FORUM" | "AUTONOMOUS" | "API" | undefined; }; }[] | { examples: { name: string; content: { [x: string]: unknown; text?: string | undefined; thought?: string | undefined; actions?: string[] | undefined; providers?: string[] | undefined; source?: string | undefined; target?: string | undefined; url?: string | undefined; inReplyTo?: string | undefined; attachments?: { [x: string]: unknown; id: string; url: string; title?: string | undefined; source?: string | undefined; description?: string | undefined; text?: string | undefined; contentType?: "image" | "video" | "audio" | "document" | "link" | undefined; }[] | undefined; channelType?: "SELF" | "DM" | "GROUP" | "VOICE_DM" | "VOICE_GROUP" | "FEED" | "THREAD" | "WORLD" | "FORUM" | "AUTONOMOUS" | "API" | undefined; }; }[]; })[]>>>; postExamples: z.ZodDefault>; topics: z.ZodDefault>; adjectives: z.ZodDefault>; documents: z.ZodDefault; value: z.ZodString; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ item: z.ZodObject<{ case: z.ZodLiteral<"directory">; value: z.ZodObject<{ path: z.ZodString; shared: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>]>>>; knowledge: z.ZodOptional; value: z.ZodString; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ item: z.ZodObject<{ case: z.ZodLiteral<"directory">; value: z.ZodObject<{ path: z.ZodString; shared: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>]>>>; plugins: z.ZodDefault>; settings: z.ZodOptional; providersTotalTimeoutMs: z.ZodOptional; alwaysRespondChannels: z.ZodOptional; alwaysRespondSources: z.ZodOptional; defaultTemperature: z.ZodOptional; defaultMaxTokens: z.ZodOptional; maxReplyTokens: z.ZodOptional; defaultFrequencyPenalty: z.ZodOptional; defaultPresencePenalty: z.ZodOptional; extra: z.ZodOptional>>>; }, z.core.$loose>, z.ZodTransform, { [x: string]: unknown; shouldRespondModel?: string | undefined; providersTotalTimeoutMs?: number | undefined; alwaysRespondChannels?: string | undefined; alwaysRespondSources?: string | undefined; defaultTemperature?: number | undefined; defaultMaxTokens?: number | undefined; maxReplyTokens?: undefined; defaultFrequencyPenalty?: number | undefined; defaultPresencePenalty?: number | undefined; extra?: Record | undefined; }>>>; secrets: z.ZodDefault>>; style: z.ZodOptional>; chat: z.ZodDefault>; post: z.ZodDefault>; }, z.core.$strip>>; advancedPlanning: z.ZodOptional; advancedMemory: z.ZodOptional; }, z.core.$strict>, z.ZodTransform<{ documents: ({ item: { case: "path"; value: string; }; } | { item: { case: "directory"; value: { path: string; shared?: boolean | undefined; }; }; })[]; name: string; templates: Record; bio: string[]; messageExamples: { examples: { name: string; content: { [x: string]: unknown; text?: string | undefined; thought?: string | undefined; actions?: string[] | undefined; providers?: string[] | undefined; source?: string | undefined; target?: string | undefined; url?: string | undefined; inReplyTo?: string | undefined; attachments?: { [x: string]: unknown; id: string; url: string; title?: string | undefined; source?: string | undefined; description?: string | undefined; text?: string | undefined; contentType?: "image" | "video" | "audio" | "document" | "link" | undefined; }[] | undefined; channelType?: "SELF" | "DM" | "GROUP" | "VOICE_DM" | "VOICE_GROUP" | "FEED" | "THREAD" | "WORLD" | "FORUM" | "AUTONOMOUS" | "API" | undefined; }; }[]; }[]; postExamples: string[]; topics: string[]; adjectives: string[]; plugins: string[]; secrets: Record; id?: string | undefined; username?: string | undefined; system?: string | undefined; settings?: Record | undefined; style?: { all: string[]; chat: string[]; post: string[]; } | undefined; advancedPlanning?: boolean | undefined; advancedMemory?: boolean | undefined; }, { name: string; templates: Record; bio: string[]; messageExamples: { examples: { name: string; content: { [x: string]: unknown; text?: string | undefined; thought?: string | undefined; actions?: string[] | undefined; providers?: string[] | undefined; source?: string | undefined; target?: string | undefined; url?: string | undefined; inReplyTo?: string | undefined; attachments?: { [x: string]: unknown; id: string; url: string; title?: string | undefined; source?: string | undefined; description?: string | undefined; text?: string | undefined; contentType?: "image" | "video" | "audio" | "document" | "link" | undefined; }[] | undefined; channelType?: "SELF" | "DM" | "GROUP" | "VOICE_DM" | "VOICE_GROUP" | "FEED" | "THREAD" | "WORLD" | "FORUM" | "AUTONOMOUS" | "API" | undefined; }; }[]; }[]; postExamples: string[]; topics: string[]; adjectives: string[]; documents: ({ item: { case: "path"; value: string; }; } | { item: { case: "directory"; value: { path: string; shared?: boolean | undefined; }; }; })[]; plugins: string[]; secrets: Record; id?: string | undefined; username?: string | undefined; system?: string | undefined; knowledge?: ({ item: { case: "path"; value: string; }; } | { item: { case: "directory"; value: { path: string; shared?: boolean | undefined; }; }; })[] | undefined; settings?: Record | undefined; style?: { all: string[]; chat: string[]; post: string[]; } | undefined; advancedPlanning?: boolean | undefined; advancedMemory?: boolean | undefined; }>>; export interface CharacterValidationResult { success: boolean; data?: Character; error?: { message: string; issues?: z.ZodIssue[]; }; } /** * Safely validates character data using Zod schema */ export declare function validateCharacter(data: unknown): CharacterValidationResult; /** * Safely parses JSON string and validates as character */ export declare function parseAndValidateCharacter(jsonString: string): CharacterValidationResult; /** * Type guard to check if data is a valid Character */ export declare function isValidCharacter(data: unknown): data is Character;