Repository navigation
feat(profile): 「Agent 眼中的你」阅读面摘要——事实清单蒸馏成分节散文(opt-in) #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,6 +192,7 @@ | |
| | `personaStrictAddressing` | `false` | 人格寻址口径。关(历史行为):会话身份没建卡、或该卡被显式关掉时,落 `default` 卡 | 开:这两种情况都不注入人格,`default` 只兜「解析不到会话身份」的无名会话。用途是宿主里跑着自带身份的外部 bot 时,别让某个人格无条件进它每一帧。默认关 = 升级零变化 | | ||
| | `profileExtractEnabled` **light** | `false` | 画像提取草稿:`POST /api/dsh-mneme/profile/extract` 从活跃记忆反向写一段「助手眼中的用户」草稿(面板「Agent 眼中的你」卡上的按钮) | opt-in;一次调用一轮 LLM + 读上百行记忆,故 `LIGHT_MODE_OFF` 里有它。**只出草稿副本**:它不写 `user_settings`,面板也只把结果当副本展示、可一键复制(2026-11-04 改口径,此前「采用为画像」会直接覆盖手写画像且无撤销)——画像正文必须是用户自己手写的原文。空库直接报 `no-input`、模型没按格式回报 `unparseable`,两者都不回空草稿 | | ||
| | `profileFactsEnabled` **light** | `false` | 自动画像事实:「Agent 眼中的你」按会话身份分卡维护一份逐条事实清单(对标 ChatGPT 记忆 / DS Bot 每 bot 的 MEMORY.md)——dream 巩固轮成功后逐卡增量维护(有新记忆才跑),注入在手填画像之后;面板可手动触发与逐条增改归档,账本逐 op 可查 | opt-in;自动维护轮是 dream 级 LLM 调用 + 读上百行记忆,故 `LIGHT_MODE_OFF` 里有它(注入段本身是几十行常驻文本,关掉省的是维护调用不是注入)。事实住 `profile_facts` 独立三表,**绝不写 `user_settings`**(#497 口径不变:手填画像是用户原文,模型只有读权)。输入行严格按 `agent_scope` 分区、排除外来行;账本 `profile_fact_journal` 每卡裁剪到最近 200 条 | | ||
| | `profileDigestEnabled` **light** | `false` | 摘要蒸馏(2026-11-18):把「Agent 眼中的你」的事实清单蒸馏成分节散文,作面板的阅读面投影——事实清单是原子可修正的事实源,但几十条并列行没法扫读;dream 维护轮事实有变后自动重蒸馏 + 面板手动重蒸馏,`profile_digests` 每卡一份、重生成即覆盖,过期由读侧锚点对比现算(`facts_revision` vs 当前事实修订号 = `profile_fact_journal` 的 `MAX(id)`;用修订号而不用 `updated_at`,因为后者只有毫秒精度,同毫秒写入会漏判过期) | opt-in;一次额外 LLM 调用,进 `LIGHT_MODE_OFF`。**摘要只作阅读面,注入不读它**(注入仍从 `profile_facts` 事实行渲染),生成失败有过期提示兜底、绝不拿残缺输出冒充摘要 | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 说明过期提示不等于生成失败提示。 首次生成遇到
|
||
|
|
||
| ## 巩固(autoDream) | ||
|
|
||
|
|
@@ -412,6 +413,7 @@ | |
| `organizeEnabled`(#231) · | ||
| `profileExtractEnabled`(#497) · | ||
| `profileFactsEnabled`(2026-11-06) · | ||
| `profileDigestEnabled`(摘要蒸馏,跟事实维护轮走) · | ||
| `preInjectGate.enabled`(#380) · `distillRecords.enabled`(#399) · | ||
| `imageDescribeEnabled`(每张图一次视觉调用) · | ||
| `imageMemoryEnabled`(图像溯源的写入) · | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
事实修改与修订号推进不是原子的。journal 写入失败时,摘要不会被标为过期。
applyOps对每条 op 单独捕获异常。异常不会回滚到事务外层。若updateProfileFact成功,而insertProfileFactJournal抛错,事实修改仍会随事务提交。该卡的修订号MAX(id)不会增加。过期判定因此返回 false,面板会把与事实不一致的旧摘要当作最新显示。add分支也有相同路径。CHANGELOG 第 7 行写明「每次 add/update/archive 都在同一事务里落一行」。在 journal 写入可能失败的情况下,这句话不成立。
需要的行为:事实值变更与修订号推进必须同时生效,或同时不生效。可以选用以下任一方式:
failures。二者只需择一。无论选哪种,CHANGELOG 中的保证表述都必须与实际行为一致。
LanguageTool
[uncategorized] ~7-~7: 数词与名词之间一般应存在量词,可能缺少量词。
Context: ...able
),所以直接改列名、不留迁移代码。updated_at` 的业务语义一字未动。 测试 +2:新增一条不依赖时钟的用例——改完事实后把 ...(wa5)