Performance: 增量社区摘要 + session_end 防线 + maintenance 可观测性#60
Open
zhuyankarl wants to merge 2 commits intoadoresever:mainfrom
Open
Performance: 增量社区摘要 + session_end 防线 + maintenance 可观测性#60zhuyankarl wants to merge 2 commits intoadoresever:mainfrom
zhuyankarl wants to merge 2 commits intoadoresever:mainfrom
Conversation
问题: - session_end对所有session(含短命subagent)都执行finalize+maintenance,645/1928个短session白白消耗大量LLM调用 - 社区摘要每次maintenance全量刷新所有社区,LLM调用成本高 - 缺少maintenance触发次数等可观测数据 修复: 1. index.ts: 两道防线(消息<3条跳过 + 无节点跳过maintenance) 2. community.ts: 增量摘要模式(只处理新增+成员变化社区),24h自动全量兜底 3. maintenance.ts: gm_meta触发计数器 + 结果记录 4. db.ts: 新增m7_meta迁移(gm_meta表) 5. store.ts: getMeta/setMeta/getIncrementalCommunities辅助函数
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
修复
index.ts:session_end 两道防线 — 消息 <3 条跳过 finalize,无节点跳过 maintenancecommunity.ts:增量摘要模式 —getIncrementalCommunities()只查 24h 内新增/变化的社区,24h 自动全量兜底maintenance.ts:gm_meta 触发计数器 + 结果记录,summaryMode参数传递db.ts:新增m7_meta迁移(gm_meta 表)store.ts:getMeta/setMeta/getIncrementalCommunities辅助方法配套参数建议
compactTurnCount: 7 → 20(降低维护触发频率约 3x)excludeAgents: 排除不需要记忆的 agent(如 chat、damie)