/** * VariableReplacer:prompt 变量替换模块。 * * 关键点(中文) * - 专职负责模板变量构建与文本替换。 * - 与 message 组装解耦,便于独立复用与测试。 */ /** * Prompt 变量替换模式。 * * 关键点(中文) * - `full`:完整替换(包含时间/地点等上下文动态变量)。 * - `stable`:仅保留稳定替换;但 `current_year` 属于低频年度变量,仍保留真实值。 */ export type PromptVariableMode = "full" | "stable"; /** * 替换 prompt 模板变量。 * * 当前支持(中文) * - `{{current_time}}` * - `{{current_date}}` * - `{{current_year}}` * - `{{timezone}}` * - `{{location}}` * - `{{project_path}}` * - `{{project_root}}` * - `{{session_id}}` */ export declare function replace_variables_in_prompts(prompt: string, options?: { /** * 项目路径(用于 `project_path/project_root`)。 */ projectPath?: string; /** * 会话 ID(用于 `session_id`)。 */ session_id?: string; /** * 变量替换模式(默认 full)。 */ mode?: PromptVariableMode; }): Promise; /** * 构建每轮运行末尾的 runtime clock system prompt。 * * 关键点(中文) * - system/static prompt 使用 stable 模式,不能直接承载每轮变化的时间。 * - 这里在 messages 尾部补齐 `current_date/current_time/timezone`,让 chat、task、prompt 的时间语义统一。 * - 只使用本机 runtime 时区,避免每轮为了地理位置进行网络请求。 */ export declare function build_runtime_clock_system_prompt(options?: { /** * 项目路径(用于 `project_root`)。 */ projectPath?: string; /** * 会话 ID(用于 `session_id`)。 */ session_id?: string; }): string; //# sourceMappingURL=VariableReplacer.d.ts.map