refactor(templates): 提示词按用途分组命名 + 压缩回合剔除 [CTX] 注入行

- 命名混乱整治:prompt-*(压缩/标题系统侧指令)与 profile-*(各 profile 的
  system prompt)两组:system-prompt.txt→profile-default.txt、
  advising/lab/zero-system.txt→profile-*.txt、compress/title-prompt.txt→
  prompt-*.txt;全库引用(llm/config/engine/README×2/example/ARCHITECTURE)同步
- compressMessages 输入过滤:memory_note/scheduler_note/errAck/旧 summarize_request
  不进摘要(跨会话噪音+滚雪球,同 engine JOURNAL_SKIP_TYPES 虑);channel_note 刻意
  保留——压缩落库存档全部行,微信约束只能靠摘要转世;task_brief/summary 照常
- 画像快照本就不在 messages 表,压缩/标题均天然不带
This commit is contained in:
2026-10-02 10:16:31 +08:00
parent 0055842d2d
commit abe5673926
13 changed files with 33 additions and 27 deletions
+3 -3
View File
@@ -121,12 +121,12 @@ const DEFAULTS = {
// 与 recall(日记只读翻阅;用户和顾问聊「上次那个事」恰是回忆查询的高峰场景);
// 唯一出口是 handoff;tools_deny 必须显式清空:不配 = 继承全局 ['lab','handoff'],
// allow 滤完再叠 deny 会把 handoff 自己禁掉(同 lab 组合的教训)。
advising: { tools_allow: ['read_file', 'list_directory', 'fetch', 'handoff', 'profile', 'recall'], tools_deny: [], system_prompt_file: 'advising-system.txt' },
advising: { tools_allow: ['read_file', 'list_directory', 'fetch', 'handoff', 'profile', 'recall'], tools_deny: [], system_prompt_file: 'profile-advising.txt' },
// lab:统一入口元工具自测组合——tools 收缩到 1 个,其余能力经 lab(help) 现场发现。
// tools_deny 必须显式清空:不配 = 继承全局 ['lab'],deny 后叠加会把 lab 自己禁掉 → 零工具。
lab: { tools_allow: ['lab'], tools_deny: [], system_prompt_file: 'lab-system.txt' },
lab: { tools_allow: ['lab'], tools_deny: [], system_prompt_file: 'profile-lab.txt' },
// 纯文本对话:一个工具都不发。
zero: { tools_allow: [], system_prompt_file: 'zero-system.txt' },
zero: { tools_allow: [], system_prompt_file: 'profile-zero.txt' },
},
// 登录认证:{users:[{user,password}], secret?, ttl_ms?};null / users 空 = 不启用。
auth: null,