会话接力 SessionRelay — 属于项目、不属于任何厂商的本地记忆层(跨 Agent 会话记忆 / 中文检索 / MCP / HOP 交接协议)
SessionRelay demonstrates solid tool design with 16 well-named, verb-prefixed tools covering a coherent session memory domain. All tools have descriptions (10 - 200 chars, within baseline 194 avg). Input schemas are present and use Zod with type declarations. However, output schemas are NOT documented in the visible code, responses are assembled ad-hoc via toolOut() helper without formal schema declarations. Parameter descriptions are present but vary in quality; some are excellent (e.g., search_sessions query param), others are minimal. Error handling exists (UnresolvedProject guard) but lacks recovery guidance in most tools. No tool annotations (readOnlyHint/destructiveHint) despite clear risk levels (READ_ONLY, WRITE, DESTRUCTIVE marked in metadata). Composition is strong, tools chain well (search → get_detail → link_sessions). Naming is consistent and action-oriented.
导出会话为 Markdown 或 JSON(支持 scope 过滤、压缩打包)。用于备份、分享、外部分析
永久删除会话(支持预览、批量、审计日志)。删除后不可恢复,但 forget --history 可查删除记录
取本项目全部决策(结论、方案选型、问题排查结果)。轻量级:仅含决策文本 + 出处会话 ID,省 token。需要背景时再 get_session_detail 深入
查询与某会话相关的其他会话(因果链接)。可按方向过滤(入链/出链)
基于语义相似度推荐相关会话(用于发现隐藏的背景、类似问题的历史解决方案)。需启用 semantic 搜索
查询本连接当前的会话可见范围(scope)。返回 mode + 条件 / 列表,以及命中的会话数
取某会话的消息(可按角色过滤、限制范围与长度)。默认安全:最多 20 条 × 1000 字 ≈ 20KB。要更多请显式传 start_msg/end_msg 或 max_chars。session_id 支持前缀
Output schemas not documented. Tools return JSON via toolOut() helper, but no formal schema declarations exist for response fields. LLMs cannot predict downstream field availability or plan chained calls.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Risk levels are documented in metadata (READ_ONLY, WRITE, DESTRUCTIVE) but not exposed via MCP tool annotations. Agents cannot infer safety/idempotency from tool definitions.
Error handling lacks recovery guidance. UnresolvedProject guard catches errors but most tools do not return actionable next steps (e.g., 'Try search_sessions() first' or 'Available options: ...'). Errors are logged but not user-facing.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 61 | 2026-07-28+ | v2 |
项目统计:会话数、消息数、来源分布、状态分布。用于诊断数据库状态、评估记忆库规模
导入会话(从 HOP 包、JSON、Markdown)。支持增量导入、冲突处理、来源标记
建立会话间的因果链接("这个决策基于那个排查结果")。支持多对多、双向查询
保存一条笔记(临时记忆、决策备忘、问题排查过程)。自动归档到本项目的 note 会话,可被搜索、标签、导出。支持 Markdown
搜索本项目的历史会话记忆。何时用:用户问"之前/上次/为什么当时/我们讨论过吗"、接手项目需要背景、实现前确认已有决策、报错排查怀疑有历史结论。何时不调:纯新问题、当前对话刚说过的内容
设置本连接的会话可见范围(scope)。mode='full' 放宽到全部;mode='predicate' 按条件过滤;mode='sessionIds' 指定会话列表。本连接内生效,不影响其他连接。scope.json 每次调用热更新,scope_log 记审计
设置会话的话题标签(单值,用于分类和 scope 过滤)。覆盖旧值
给会话添加用户标签(用于分类、检索、scope 过滤)。支持多标签、重复调用追加
从会话移除用户标签
Parameter descriptions vary in quality. Some are excellent (search_sessions query: 'supports "phrase" exact match'), others minimal (get_stats project param). Inconsistency may confuse LLMs on parameter intent.
Destructive tool (forget_sessions) lacks confirmation/dry-run pattern. Tool accepts preview flag but no explicit confirmation step before permanent deletion. High risk of accidental data loss.