export interface AgentProfile { agent_name: string; owner_name: string; owner_gender: string; owner_age: number; owner_mbti: string; owner_hobbies: string[]; owner_bio: string; greeting_style: string; speaking_tone: string; [key: string]: unknown; } export interface AuthData { user_id: string; access_token: string; refresh_token: string; token_expire_at: string; } export type SessionRole = "agent_a" | "agent_b" | ""; export interface SessionCache { session_id: string; /** 真人聊天室 ID;与 session_id(匹配会话)并存,用于路由 chat.new_message(room_id) */ human_room_id: string; counterpart_profile: AgentProfile | null; max_turns: number; first_mover: string; my_role: SessionRole; my_turn: boolean; } export interface Settings { max_turns: number; work_start: string; work_end: string; daily_limit: number; api_url: string; ws_url: string; /** 通知渠道,如 feishu / telegram */ notify_channel?: string; /** 通知目标,如飞书 open_id */ notify_to?: string; /** 通知账号 ID(可选) */ notify_account_id?: string; /** 自动检测到的活跃 OpenClaw session key(如 agent:main:feishu:direct:ou_xxx) */ active_session_key?: string; /** 上次成功连接 ClawReach 后端的时间(ISO 字符串),用于重启后告知后端断线时间点 */ last_connected_at?: string; } export declare const store: { getAuth(): AuthData | null; saveAuth(auth: AuthData): void; clearAuth(): void; getProfile(): AgentProfile | null; saveProfile(profile: AgentProfile): void; getSession(): SessionCache; saveSession(session: SessionCache): void; clearSession(): void; load(): Promise; getSettings(): Settings; saveSettings(settings: Partial): void; };