Repository navigation
feat(v2): 支持退出桌面后的常驻会话检索 - #634
Merged
Merged
Conversation
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.
Summary
V2 桌面完全退出后,本机会话搜索和读取仍可由 CLI / MCP Gateway 使用。独立 Node 后台首次调用时启动,此后常驻,不因闲置、桌面退出或 MCP 断开而结束;无桌面连接时每十分钟增量扫描,搜索与读取前立即补齐索引。
复用原有数据库、解析器和索引游标,无业务 schema 迁移或历史会话搬迁。桌面退出仅释放租约;周期任务不与活动请求或索引重叠,失败会记录并继续下次扫描。更新/卸载持有启动锁并等待后台关闭。保留来源、MCP 总开关及工具权限。
新增 V2 session search/get、backend start/status/stop;状态包含常驻模式与后台刷新周期。首版不注册开机或登录自启。规格与 ADR 同步更新。
Evidence
After: 隔离 HOME 的真实 Node/PostgreSQL 验收通过:Codex/DSH、追加消息、并发 CLI/MCP、来源及工具权限、桌面断开后持续运行、显式停止/重启、崩溃恢复与维护锁。
Merge Danger
Door: two-way
不新增数据库格式。回退或切换版本前先退出桌面并停止后台,避免生命周期归属冲突。
Blast Radius: V2-lifecycle
后台常驻,Node 与内置 PostgreSQL 的资源占用会保留到显式停止、更新/卸载或系统结束。旧版桌面必须先退出;不同安装或版本拒绝混用。独立模式只覆盖本机会话搜索/读取,团队、资源和向量记忆仍需原服务。MCP 使用当前 Gateway;旧版手工直连数据库入口保持原行为,需重新配置 Gateway。