export type ChatRole = 'user' | 'assistant' | 'tool' | 'system' | 'exec';
export type ChatItem = { role: ChatRole; text: string; label?: string };
export type Session = { key: string; title: string };
export type CronJob = { 
  id: string; 
  name: string; 
  enabled: boolean;
  expr?: string;
  schedule?: {
    kind?: string;
    atMs?: number;
    everyMs?: number;
    expr?: string;
    tz?: string;
  };
  message?: string;
  deliver?: boolean;
  channel?: string;
  to?: string;
};
export type Cfg = Record<string, any>;
export type View = 'dashboard' | 'chat' | 'config' | 'cron' | 'memory';
export type Lang = 'en' | 'zh';

export type LogEntry = {
  time: string;
  level: string;
  code?: number;
  msg: string;
  message?: string;
  [key: string]: any;
};

export type Skill = {
  id: string;
  name: string;
  description: string;
  tools: string[];
  system_prompt?: string;
};
