export namespace config {
	
	export class Config {
	    LLMBaseURL: string;
	    LLMAPIKey: string;
	    LLMModel: string;
	    LLMProvider: string;
	    EmbeddingModel: string;
	    Live2DModel: string;
	    RenderBackend: string;
	    VRMModel: string;
	    EmbeddingDim: number;
	    EmbeddingProvider: string;
	    EmbeddingBaseURL: string;
	    EmbeddingAPIKey: string;
	    SystemPrompt: string;
	    ShortTermLimit: number;
	    MaxContextTokens: number;
	    NudgeInterval: number;
	    AllowedPaths: string[];
	    ShellTimeout: number;
	    ShellTrustedCommands: string[];
	    CodeTimeout: number;
	    SMSWatcherEnabled: boolean;
	    SMSAllMessagesEnabled: boolean;
	    VoiceAutoSend: boolean;
	    SoundsEnabled: boolean;
	    SkillsDirs: string[];
	    PetSize: number;
	    ChatWidth: number;
	    ChatHeight: number;
	    PomodoroFocusDuration: number;
	    PomodoroShortBreakDuration: number;
	    PomodoroLongBreakDuration: number;
	    PomodoroRoundsBeforeLongBreak: number;
	    SystemStatsInterval: number;
	    ActiveProfileID: number;
	    TTSModelDir: string;
	    TTSVoice: string;
	    TTSSpeed: number;
	    TTSAutoPlay: boolean;
	    TTSSummarizeThreshold: number;
	    TTSBackend: string;
	    ThemeStyle: string;
	    SupportsVision: boolean;
	    JinaAPIKey: string;
	    TavilyAPIKey: string;
	    AIAvatar: string;
	    UserAvatar: string;
	    ThinkingLevel: string;
	    UseKnowledge: boolean;
	    UseMemory: boolean;
	    Language: string;
	    ClaudeCodeEnabled: boolean;
	    ClaudeCodePort: number;
	
	    static createFrom(source: any = {}) {
	        return new Config(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.LLMBaseURL = source["LLMBaseURL"];
	        this.LLMAPIKey = source["LLMAPIKey"];
	        this.LLMModel = source["LLMModel"];
	        this.LLMProvider = source["LLMProvider"];
	        this.EmbeddingModel = source["EmbeddingModel"];
	        this.Live2DModel = source["Live2DModel"];
	        this.RenderBackend = source["RenderBackend"];
	        this.VRMModel = source["VRMModel"];
	        this.EmbeddingDim = source["EmbeddingDim"];
	        this.EmbeddingProvider = source["EmbeddingProvider"];
	        this.EmbeddingBaseURL = source["EmbeddingBaseURL"];
	        this.EmbeddingAPIKey = source["EmbeddingAPIKey"];
	        this.SystemPrompt = source["SystemPrompt"];
	        this.ShortTermLimit = source["ShortTermLimit"];
	        this.MaxContextTokens = source["MaxContextTokens"];
	        this.NudgeInterval = source["NudgeInterval"];
	        this.AllowedPaths = source["AllowedPaths"];
	        this.ShellTimeout = source["ShellTimeout"];
	        this.ShellTrustedCommands = source["ShellTrustedCommands"];
	        this.CodeTimeout = source["CodeTimeout"];
	        this.SMSWatcherEnabled = source["SMSWatcherEnabled"];
	        this.SMSAllMessagesEnabled = source["SMSAllMessagesEnabled"];
	        this.VoiceAutoSend = source["VoiceAutoSend"];
	        this.SoundsEnabled = source["SoundsEnabled"];
	        this.SkillsDirs = source["SkillsDirs"];
	        this.PetSize = source["PetSize"];
	        this.ChatWidth = source["ChatWidth"];
	        this.ChatHeight = source["ChatHeight"];
	        this.PomodoroFocusDuration = source["PomodoroFocusDuration"];
	        this.PomodoroShortBreakDuration = source["PomodoroShortBreakDuration"];
	        this.PomodoroLongBreakDuration = source["PomodoroLongBreakDuration"];
	        this.PomodoroRoundsBeforeLongBreak = source["PomodoroRoundsBeforeLongBreak"];
	        this.SystemStatsInterval = source["SystemStatsInterval"];
	        this.ActiveProfileID = source["ActiveProfileID"];
	        this.TTSModelDir = source["TTSModelDir"];
	        this.TTSVoice = source["TTSVoice"];
	        this.TTSSpeed = source["TTSSpeed"];
	        this.TTSAutoPlay = source["TTSAutoPlay"];
	        this.TTSSummarizeThreshold = source["TTSSummarizeThreshold"];
	        this.TTSBackend = source["TTSBackend"];
	        this.ThemeStyle = source["ThemeStyle"];
	        this.SupportsVision = source["SupportsVision"];
	        this.JinaAPIKey = source["JinaAPIKey"];
	        this.TavilyAPIKey = source["TavilyAPIKey"];
	        this.AIAvatar = source["AIAvatar"];
	        this.UserAvatar = source["UserAvatar"];
	        this.ThinkingLevel = source["ThinkingLevel"];
	        this.UseKnowledge = source["UseKnowledge"];
	        this.UseMemory = source["UseMemory"];
	        this.Language = source["Language"];
	        this.ClaudeCodeEnabled = source["ClaudeCodeEnabled"];
	        this.ClaudeCodePort = source["ClaudeCodePort"];
	    }
	}
	export class ModelProfile {
	    id: number;
	    name: string;
	    provider: string;
	    base_url: string;
	    api_key: string;
	    model: string;
	    embedding_model: string;
	    embedding_dim: number;
	    embedding_inherit: boolean;
	    embedding_provider: string;
	    embedding_base_url: string;
	    embedding_api_key: string;
	    tts_model_dir: string;
	    tts_voice: string;
	    tts_speed: number;
	    tts_backend: string;
	    supports_vision: boolean;
	
	    static createFrom(source: any = {}) {
	        return new ModelProfile(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.id = source["id"];
	        this.name = source["name"];
	        this.provider = source["provider"];
	        this.base_url = source["base_url"];
	        this.api_key = source["api_key"];
	        this.model = source["model"];
	        this.embedding_model = source["embedding_model"];
	        this.embedding_dim = source["embedding_dim"];
	        this.embedding_inherit = source["embedding_inherit"];
	        this.embedding_provider = source["embedding_provider"];
	        this.embedding_base_url = source["embedding_base_url"];
	        this.embedding_api_key = source["embedding_api_key"];
	        this.tts_model_dir = source["tts_model_dir"];
	        this.tts_voice = source["tts_voice"];
	        this.tts_speed = source["tts_speed"];
	        this.tts_backend = source["tts_backend"];
	        this.supports_vision = source["supports_vision"];
	    }
	}

}

export namespace frontend {
	
	export class FileFilter {
	    DisplayName: string;
	    Pattern: string;
	
	    static createFrom(source: any = {}) {
	        return new FileFilter(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.DisplayName = source["DisplayName"];
	        this.Pattern = source["Pattern"];
	    }
	}

}

export namespace main {
	
	export class ChatOptions {
	    thinkingLevel: string;
	    useKnowledge: boolean;
	    useMemory: boolean;
	
	    static createFrom(source: any = {}) {
	        return new ChatOptions(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.thinkingLevel = source["thinkingLevel"];
	        this.useKnowledge = source["useKnowledge"];
	        this.useMemory = source["useMemory"];
	    }
	}
	export class DiskStats {
	    used: number;
	    total: number;
	    percent: number;
	
	    static createFrom(source: any = {}) {
	        return new DiskStats(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.used = source["used"];
	        this.total = source["total"];
	        this.percent = source["percent"];
	    }
	}
	export class FileAttachment {
	    name: string;
	    mimeType: string;
	    content: string;
	
	    static createFrom(source: any = {}) {
	        return new FileAttachment(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.name = source["name"];
	        this.mimeType = source["mimeType"];
	        this.content = source["content"];
	    }
	}
	export class LinkPreview {
	    url: string;
	    title: string;
	    description: string;
	    image: string;
	    siteName: string;
	
	    static createFrom(source: any = {}) {
	        return new LinkPreview(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.url = source["url"];
	        this.title = source["title"];
	        this.description = source["description"];
	        this.image = source["image"];
	        this.siteName = source["siteName"];
	    }
	}
	export class MemoryStats {
	    used: number;
	    total: number;
	    percent: number;
	
	    static createFrom(source: any = {}) {
	        return new MemoryStats(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.used = source["used"];
	        this.total = source["total"];
	        this.percent = source["percent"];
	    }
	}
	export class MousePosition {
	    x: number;
	    y: number;
	
	    static createFrom(source: any = {}) {
	        return new MousePosition(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.x = source["x"];
	        this.y = source["y"];
	    }
	}
	export class ScreenInfo {
	    width: number;
	    height: number;
	
	    static createFrom(source: any = {}) {
	        return new ScreenInfo(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.width = source["width"];
	        this.height = source["height"];
	    }
	}
	export class SystemStats {
	    cpu: number;
	    cpuModel: string;
	    memory: MemoryStats;
	    disk: DiskStats;
	    network: system.NetworkStats;
	
	    static createFrom(source: any = {}) {
	        return new SystemStats(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.cpu = source["cpu"];
	        this.cpuModel = source["cpuModel"];
	        this.memory = this.convertValues(source["memory"], MemoryStats);
	        this.disk = this.convertValues(source["disk"], DiskStats);
	        this.network = this.convertValues(source["network"], system.NetworkStats);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class UpdateInfo {
	    current_version: string;
	    latest_version: string;
	    download_url: string;
	    has_update: boolean;
	
	    static createFrom(source: any = {}) {
	        return new UpdateInfo(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.current_version = source["current_version"];
	        this.latest_version = source["latest_version"];
	        this.download_url = source["download_url"];
	        this.has_update = source["has_update"];
	    }
	}
	export class VRMModelInfo {
	    name: string;
	    url: string;
	    source: string;
	    size_kb: number;
	
	    static createFrom(source: any = {}) {
	        return new VRMModelInfo(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.name = source["name"];
	        this.url = source["url"];
	        this.source = source["source"];
	        this.size_kb = source["size_kb"];
	    }
	}

}

export namespace mcp {
	
	export class ServerConfig {
	    id: number;
	    name: string;
	    transport: string;
	    command: string;
	    args: string[];
	    url: string;
	    headers: Record<string, string>;
	    enabled: boolean;
	    created_at: string;
	
	    static createFrom(source: any = {}) {
	        return new ServerConfig(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.id = source["id"];
	        this.name = source["name"];
	        this.transport = source["transport"];
	        this.command = source["command"];
	        this.args = source["args"];
	        this.url = source["url"];
	        this.headers = source["headers"];
	        this.enabled = source["enabled"];
	        this.created_at = source["created_at"];
	    }
	}

}

export namespace memory {
	
	export class Message {
	    ID: number;
	    Role: string;
	    Content: string;
	    ThinkingContent: string;
	    Images: string[];
	    Files: string[];
	    MigratedToLong: boolean;
	    CreatedAt: string;
	
	    static createFrom(source: any = {}) {
	        return new Message(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.ID = source["ID"];
	        this.Role = source["Role"];
	        this.Content = source["Content"];
	        this.ThinkingContent = source["ThinkingContent"];
	        this.Images = source["Images"];
	        this.Files = source["Files"];
	        this.MigratedToLong = source["MigratedToLong"];
	        this.CreatedAt = source["CreatedAt"];
	    }
	}

}

export namespace pomodoro {
	
	export class Config {
	    FocusDuration: number;
	    ShortBreakDuration: number;
	    LongBreakDuration: number;
	    RoundsBeforeLongBreak: number;
	
	    static createFrom(source: any = {}) {
	        return new Config(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.FocusDuration = source["FocusDuration"];
	        this.ShortBreakDuration = source["ShortBreakDuration"];
	        this.LongBreakDuration = source["LongBreakDuration"];
	        this.RoundsBeforeLongBreak = source["RoundsBeforeLongBreak"];
	    }
	}
	export class StatusPayload {
	    state: string;
	    phase: string;
	    remaining: number;
	    currentRound: number;
	    totalRounds: number;
	    config: Config;
	
	    static createFrom(source: any = {}) {
	        return new StatusPayload(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.state = source["state"];
	        this.phase = source["phase"];
	        this.remaining = source["remaining"];
	        this.currentRound = source["currentRound"];
	        this.totalRounds = source["totalRounds"];
	        this.config = this.convertValues(source["config"], Config);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace proactive {
	
	export class Item {
	    ID: number;
	    TriggerAt: string;
	    Prompt: string;
	    CreatedAt: string;
	
	    static createFrom(source: any = {}) {
	        return new Item(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.ID = source["ID"];
	        this.TriggerAt = source["TriggerAt"];
	        this.Prompt = source["Prompt"];
	        this.CreatedAt = source["CreatedAt"];
	    }
	}

}

export namespace scheduler {
	
	export class Job {
	    ID: number;
	    Name: string;
	    Description: string;
	    Schedule: string;
	    Prompt: string;
	    Enabled: boolean;
	    SaveToMemory: boolean;
	    Notify: boolean;
	    LastRun?: string;
	    NextRunAt?: string;
	    CreatedAt: string;
	
	    static createFrom(source: any = {}) {
	        return new Job(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.ID = source["ID"];
	        this.Name = source["Name"];
	        this.Description = source["Description"];
	        this.Schedule = source["Schedule"];
	        this.Prompt = source["Prompt"];
	        this.Enabled = source["Enabled"];
	        this.SaveToMemory = source["SaveToMemory"];
	        this.Notify = source["Notify"];
	        this.LastRun = source["LastRun"];
	        this.NextRunAt = source["NextRunAt"];
	        this.CreatedAt = source["CreatedAt"];
	    }
	}

}

export namespace system {
	
	export class NetworkStats {
	    downRate: number;
	    upRate: number;
	
	    static createFrom(source: any = {}) {
	        return new NetworkStats(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.downRate = source["downRate"];
	        this.upRate = source["upRate"];
	    }
	}
	export class ProcessInfo {
	    pid: number;
	    name: string;
	    cpu: number;
	    memory: number;
	
	    static createFrom(source: any = {}) {
	        return new ProcessInfo(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.pid = source["pid"];
	        this.name = source["name"];
	        this.cpu = source["cpu"];
	        this.memory = source["memory"];
	    }
	}
	export class TopProcesses {
	    topCpu: ProcessInfo[];
	    topMemory: ProcessInfo[];
	
	    static createFrom(source: any = {}) {
	        return new TopProcesses(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.topCpu = this.convertValues(source["topCpu"], ProcessInfo);
	        this.topMemory = this.convertValues(source["topMemory"], ProcessInfo);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice && a.map) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

export namespace tools {
	
	export class PermissionRow {
	    ToolName: string;
	    Level: string;
	    Granted: boolean;
	
	    static createFrom(source: any = {}) {
	        return new PermissionRow(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.ToolName = source["ToolName"];
	        this.Level = source["Level"];
	        this.Granted = source["Granted"];
	    }
	}

}

