Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat(session): 会话检索族——FTS5 派生索引 + 关系追踪 + 工作区授权检索工具 + 导出(借 DSH session-query)

Closed
#131 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, sql

Research direction

Start by comparing the existing JSONL transcript and sessions list/rewind flow with the referenced DSH files: session-query-sqlite/src/schema.ts, session-query/src/observation.ts, tracing.ts, and tool-session-query/src/index.ts. Read session-log-export/README.md for the export behavior. Done means the derived index can be rebuilt with consistent results, cross-session search enforces cwd boundaries, and exports include child sessions and attachments with only one simultaneous download per session.

Written by the indexing model from the issue text.

Description

场景 gap 单(okguitar 提报)· 优先级 P2 · 依赖:无 · 来源:DSH session-query 包借鉴(jeffkit 拍板跟进)

基线 HEAD = 4e1aee98。

Summary

recursive 的会话面只有 JSONL transcript + sessions list/rewind:模型无跨会话检索、无关系追踪、无导出。相关但不重合:#93(向量记忆未接线)/ #80(知识检索域拆层)/ #122(OTel span 覆盖)。

参照 DSH packages/session-query/:

  • 可丢弃派生索引 + 就地重置:SQLite FTS5 只当派生读模型——application_id + user_version 识别自有库,版本不符原地重建;持久表存已落盘会话、TEMP 表存活跃会话;库 0600/目录 0700(session-query-sqlite/src/schema.ts:8-11,46-101)。
  • 冷读缓存键 = 实例身份 + stat 修订号:修订未变不重读日志;活跃租约条目不被 LRU 驱逐(session-query/src/observation.ts:56-78,98-150)。
  • 关系追踪语义:replacementChain(事件被后续替换的链)/ source→derived——"为什么历史变成现在这样"的可解释查询(tracing.ts:64-111)。
  • 模型面工具 + 工作区授权:session_search / session_event_search / session_trace / session_event_trace / session_event_read;跨会话搜索要求调用方会话有 cwd(工作区边界),结果上限 100(tool-session-query/src/index.ts:21-25,56-120)。
  • 导出:认证路由流式 ZIP 整棵会话树(含子会话+附件),单会话单下载(session-log-export/README.md)。

建议

  1. 派生索引层(可随时丢弃重建,与主 transcript 解耦);
  2. 关系追踪(替换链/来源链)——审计与可解释性的基础;
  3. 模型检索工具集 + cwd 工作区边界授权;
  4. 流式导出(含子会话与附件)。

验收

  • 删库重建后检索结果与重建前一致(索引纯派生);
  • 模型可跨会话检索但受 cwd 边界限制(越界被拒有测试);
  • 导出产物含子会话与附件、单会话同时仅一个下载。
Dominant language
Rust
Stars
4
Forks
0
Avg merge
5h 32m
Merged PRs (30d)
7

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jeffkit/recursive

All issues in jeffkit/recursive

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.