/** * 平台配置模块 * * 集中管理所有平台的配置解析和验证 * * 注意:配置对象使用 getter 延迟读取 process.env, * 确保 dotenv 初始化后才能获取正确的值。 */ export declare const routerConfig: { readonly mode: "legacy" | "dual" | "router"; readonly enabledPlatforms: string[]; isPlatformEnabled(platformId: string): boolean; }; export declare const feishuConfig: { readonly enabled: boolean; readonly appId: string; readonly appSecret: string; readonly encryptKey: string | undefined; readonly verificationToken: string | undefined; }; export declare const discordConfig: { readonly enabled: boolean; readonly token: string; readonly clientId: string; readonly allowedBotIds: string[]; }; export declare const wecomConfig: { readonly enabled: boolean; readonly botId: string; readonly secret: string; }; export declare const telegramConfig: { readonly enabled: boolean; readonly botToken: string; }; export declare const qqConfig: { readonly enabled: boolean; readonly protocol: "official" | "onebot"; readonly onebotWsUrl: string | undefined; readonly onebotHttpUrl: string | undefined; readonly appId: string | undefined; readonly secret: string | undefined; }; export declare const whatsappConfig: { readonly enabled: boolean; readonly mode: "personal" | "business"; readonly sessionPath: string | undefined; readonly businessPhoneId: string | undefined; readonly businessAccessToken: string | undefined; readonly businessWebhookVerifyToken: string | undefined; }; export declare const dingtalkConfig: { readonly enabled: boolean; }; export declare const groupConfig: { readonly requireMentionInGroup: boolean; }; export declare const opencodeConfig: { readonly host: string; readonly port: number; readonly serverUsername: string; readonly serverPassword: string | undefined; readonly autoStart: boolean; /** @deprecated 不再使用,保留仅供旧配置读取迁移 */ readonly autoStartCmd: string; /** * 后台启动成功后是否同时弹出前台 attach 窗口(Windows 专用) * Windows 默认开启:后台 serve 就绪后会自动弹出一个 CMD 窗口运行 `opencode attach http://localhost:`, * 方便在独立窗口里与 opencode CLI 交互。设置 OPENCODE_AUTO_START_FOREGROUND=false 可关闭。 * 非 Windows 平台始终关闭(attach 窗口功能依赖 Windows cmd /start 弹窗机制)。 */ readonly autoStartForeground: boolean; readonly baseUrl: string; }; export declare const userConfig: { readonly allowedUsers: string[]; readonly enableManualSessionBind: boolean; readonly isWhitelistEnabled: boolean; }; export declare const modelConfig: { readonly defaultProvider: string | undefined; readonly defaultModel: string | undefined; readonly chatModelWhitelist: string[]; }; export declare const permissionConfig: { readonly toolWhitelist: string[]; readonly requestTimeout: number; }; export declare const outputConfig: { readonly updateInterval: number; maxMessageLength: number; readonly showThinkingChain: boolean; readonly showToolChain: boolean; readonly feishu: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly discord: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly wecom: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly telegram: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly qq: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly whatsapp: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly weixin: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; readonly dingtalk: { readonly showThinkingChain: boolean; readonly showToolChain: boolean; }; }; export declare const attachmentConfig: { readonly maxSize: number; }; /** * 默认 OCR 提示词(仅当用户未配置 VISION_OCR_PROMPT 时使用) */ export declare const DEFAULT_VISION_OCR_PROMPT = "\u8BF7\u8BE6\u7EC6\u63CF\u8FF0\u8FD9\u5F20\u56FE\u7247\u7684\u5185\u5BB9\uFF0C\u5305\u62EC\u6240\u6709\u53EF\u89C1\u7684\u6587\u5B57\u3001\u8868\u683C\u3001\u7ED3\u6784\u3001\u4EBA\u7269\u548C\u5173\u952E\u89C6\u89C9\u4FE1\u606F\u3002\u8F93\u51FA\u4E2D\u6587\u63CF\u8FF0\u3002"; /** * 非多模态模型图片预处理配置 * * 当主模型不支持 image 输入时,bridge 借用 opencode 内已配置的多模态 model * 做 OCR / 图片描述,把结果注入为 text part 后再转发给主模型。 * * 这三个字段都通过 SQLite + Web UI 维护,不走 .env。 */ export declare const visionPreprocessConfig: { /** 功能总开关 */ readonly enabled: boolean; /** 存储格式:"providerID/modelID",空串代表未配置 */ readonly modelRef: string; /** 解析后的 provider/model 对,未配置返回 undefined */ readonly model: { providerID: string; modelID: string; } | undefined; readonly prompt: string; }; export declare const directoryConfig: { readonly allowedDirectories: string[]; readonly defaultWorkDirectory: string | undefined; readonly projectAliases: Record; readonly gitRootNormalization: boolean; maxPathLength: number; readonly isAllowlistEnforced: boolean; }; export declare const reliabilityConfig: { readonly cronEnabled: boolean; readonly cronApiEnabled: boolean; readonly cronApiHost: string; readonly cronApiPort: number; readonly cronApiToken: string | undefined; readonly cronJobsFile: string | undefined; readonly cronOrphanAutoCleanup: boolean; readonly cronForwardToPrivateChat: boolean; readonly cronFallbackFeishuChatId: string | undefined; readonly cronFallbackDiscordConversationId: string | undefined; readonly proactiveHeartbeatEnabled: boolean; readonly inboundHeartbeatEnabled: boolean; readonly heartbeatIntervalMs: number; readonly heartbeatAgent: string | undefined; readonly heartbeatPrompt: string | undefined; readonly heartbeatAlertChats: string[]; readonly failureThreshold: number; readonly windowMs: number; readonly cooldownMs: number; readonly repairBudget: number; readonly mode: "observe" | "shadow" | "active"; readonly loopbackOnly: boolean; }; export declare function validateConfig(): void; export declare function isPlatformConfigured(platform: 'feishu' | 'discord' | 'wecom' | 'telegram' | 'qq' | 'whatsapp' | 'weixin' | 'dingtalk'): boolean; //# sourceMappingURL=platform.d.ts.map