omp packages

omp-history-recall0.8.0

Local full-text search over Oh My Pi session history

white-season Published 1 month ago ~94 downloads/mo

Built for omp

The author tagged this package oh-my-pi.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

OMP History Recall

English · 简体中文

在本地搜索你的每一段 Oh My Pi 会话。

OMP History Recall 是 Oh My Pi(OMP)的开源插件。它把会话文件增量写入本地 SQLite FTS5 索引,并给 Agent 提供查找、引用历史工作的工具。不调用模型,不做 embedding,不上传数据。

  • 所有会话: 覆盖当前 OMP profile,跨工作目录。
  • 增量: 只入库变化的文件,单次有界处理,并返回 pending_files。
  • 全文检索: 消息、工具调用与输出、compaction/branch summary、custom message;中文使用 bigram。
  • 证据而非摘要: 搜索只给定位;读取时分页返回原始 JSONL 条目,带稳定 ID 和哈希。
  • 本地私有: 数据不出本机;入库前会脱敏常见凭据。
  • 安全: 排除当前会话,从不修改原始会话文件。

快速开始

前置条件

  • Oh My Pi 18.2.6 或更高版本

安装

omp install omp-history-recall

等价完整命令为 omp plugin install omp-history-recall。安装后重启 OMP。

使用

/history-recall sync
/history-recall conversations
/history-recall status

Agent 可以使用 history_recall_search、history_recall_conversations、history_recall_read_conversation 和 history_recall_trace。搜索覆盖当前 profile;传入 source_cwd 或 workspace_only 可限定到某个工作目录,命中结果通过 next_cursor 翻页。命中带最佳 snippet,可用 kinds 过滤;match=phrase 切换为字面短语匹配。传入 session_id 可只针对某个会话;当前会话直接读取,文件较大时才建立本地索引。last=N 返回会话最新 N 条,history_recall_trace 查看会话 lineage 或条目分支。

可选环境变量:OMP_HISTORY_RECALL_DB(索引路径)、OMP_HISTORY_RECALL_INGEST_FILES(默认 64)、OMP_HISTORY_RECALL_INGEST_BYTES(默认 32 MiB)、OMP_HISTORY_RECALL_DISABLED=1。

开发

npm install
npm run typecheck
npm test
npm run bench:offline

许可证

本仓库尚未选择许可证。