import { Computed, Schema } from "koishi"; import { SystemConfig } from "../config"; export declare const SystemBaseTemplate: string; export declare const UserBaseTemplate: string; export declare const MultiModalSystemBaseTemplate = "Images that appear in the conversation will be provided first, numbered in the format 'Image #[ID]:'.\nIn the subsequent conversation text, placeholders in the format will be used to refer to these images.\nPlease participate in the conversation considering the full context of both images and text.\nIf image data is not provided, use `get_image_description` to describe the image."; export type ChannelDescriptor = { platform: string; type: "private" | "guild"; id: string; }; /** Agent 的唤醒条件配置 */ export interface ArousalConfig { /** 允许 Agent 响应的频道 */ allowedChannels: ChannelDescriptor[]; /** 消息防抖时间 (毫秒),防止短时间内对相同模式的重复响应 */ debounceMs: number; } export declare const ArousalConfigSchema: Schema; export interface WillingnessConfig { base: { /** 收到普通文本消息的基础分。这是对话的基石 */ text: Computed; }; attribute: { /** 被 @ 提及时的额外加成。这是最高优先级的信号 */ atMention: Computed; /** 作为"回复/引用"出现时的额外加成。表示对话正在延续 */ isQuote: Computed; /** 在私聊场景下的额外加成。私聊通常期望更高的响应度 */ isDirectMessage: Computed; }; interest: { /** 触发"高兴趣"的关键词列表 */ keywords: Computed; /** 消息包含关键词时,应用此乘数。>1 表示增强,<1 表示削弱 */ keywordMultiplier: Computed; /** 默认乘数(当没有关键词匹配时)。设为1表示不影响 */ defaultMultiplier: Computed; }; lifecycle: { /** 意愿值的最大上限 */ maxWillingness: Computed; /** 意愿值衰减到一半所需的时间(秒)。这是一个基础值,会受对话热度影响 */ decayHalfLifeSeconds: Computed; /** 将意愿值转换为回复概率的"激活门槛" */ probabilityThreshold: Computed; /** 超过门槛后,转换为概率时的放大系数 */ probabilityAmplifier: Computed; /** 决定回复后,扣除的"发言精力惩罚"基础值 */ replyCost: Computed; }; readonly system?: SystemConfig; } /** 视觉与多模态相关配置 */ export interface VisionConfig { /** 是否启用视觉功能 */ enableVision: boolean; /** 允许的图片类型 */ allowedImageTypes: string[]; /** 允许在上下文中包含的最大图片数量 */ maxImagesInContext: number; /** * 图片在上下文中的最大生命周期。 * 一张图片在上下文中出现 N 次后将被视为"过期",除非它被引用。 */ imageLifecycleCount: number; detail: "low" | "high" | "auto"; } export declare const VisionConfigSchema: Schema; export type AgentBehaviorConfig = ArousalConfig & WillingnessConfig & VisionConfig & { systemTemplate: string; userTemplate: string; multiModalSystemTemplate: string; } & { streamAction: boolean; heartbeat: number; newMessageStrategy: "skip" | "immediate" | "deferred"; deferredProcessingTime?: number; }; export declare const AgentBehaviorConfigSchema: Schema;