Skip to content

Commit 8d82797

Browse files
emo-ethemo-nmnicosuave
authored
Add Oh My Pi source support and Herdr resume scoping (#89)
* Add Oh My Pi session support * Add distinct Oh My Pi source support * Add OMP source support and Herdr resume scoping * Fix Oh My Pi discovery and skill setup * Consolidate shared agent skill installation * Fix OMP agent root test fixture --------- Co-authored-by: emo-nm <james@gs.xyz> Co-authored-by: Nico Ritschel <ritschel@gmail.com>
1 parent 314fac0 commit 8d82797

25 files changed

Lines changed: 784 additions & 453 deletions

File tree

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# memex
22

3-
Fast local history search for Claude, Codex CLI, Cursor, OpenCode, Pi Coding Agent, OpenClaw, GitHub Copilot CLI, and Hermes usage records. Uses BM-25 and optionally embeds your transcripts locally for hybrid search.
3+
Fast local history search for Claude, Codex CLI, Cursor, OpenCode, Pi Coding Agent, Oh My Pi, OpenClaw, GitHub Copilot CLI, and Hermes usage records. Uses BM-25 and optionally embeds your transcripts locally for hybrid search.
44

55
Mostly intended for agents to use via skill. The intended workflow is to ask agent about a previous session & then the agent can narrow things down & retrieve history as needed.
66

@@ -109,7 +109,11 @@ Then run setup to install the skills:
109109
memex setup
110110
```
111111

112-
Restart Claude, Codex, OpenCode, or Pi after setup.
112+
The shared `memex-search` skill is installed once at
113+
`~/.agents/skills/memex-search/SKILL.md` for Codex, OpenCode, Pi, and Oh My Pi.
114+
Claude Code uses `~/.claude/skills/memex-search/SKILL.md`.
115+
116+
Restart Claude, Codex, OpenCode, Pi, or Oh My Pi after setup.
113117

114118
## Quickstart
115119

@@ -118,6 +122,9 @@ Index (incremental):
118122
memex index
119123
```
120124

125+
The default scan indexes Pi sessions from `~/.pi/agent/sessions` and Oh My Pi sessions
126+
separately from `~/.omp/agent/sessions` plus named profile session directories.
127+
121128
Plaintext reasoning is excluded by default because it is usually low-value search noise. Opt
122129
in with `memex index --include-reasoning`; reasoning records remain BM25-only. Encrypted and
123130
redacted payloads, along with reasoning signature fields, are always excluded.
@@ -210,7 +217,7 @@ Token tracking is disabled by default because it scans and caches local agent lo
210217
token_usage = true
211218
```
212219

213-
Then reconstruct historical token usage from local Claude Code, Codex, Cursor, OpenCode, Pi, OpenClaw, Copilot, and Hermes records:
220+
Then reconstruct historical token usage from local Claude Code, Codex, Cursor, OpenCode, Pi, Oh My Pi, OpenClaw, Copilot, and Hermes records:
214221

215222
```
216223
memex usage
@@ -252,7 +259,7 @@ If you built from source, run setup to install:
252259
memex setup
253260
```
254261

255-
This detects which tools are installed (Claude/Codex/OpenCode/Pi) and presents an interactive menu to select which to configure.
262+
This detects which tools are installed (Claude/Codex/OpenCode/Pi/Oh My Pi) and presents an interactive menu to select which to configure.
256263
## Search modes
257264

258265
| Need | Command |
@@ -267,7 +274,7 @@ This detects which tools are installed (Claude/Codex/OpenCode/Pi) and presents a
267274
- `--role <user|assistant|tool_use|tool_result>`
268275
- `--tool <tool_name>`
269276
- `--session <session_id>`
270-
- `--source claude|codex|cursor|opencode|pi|openclaw|copilot|hermes`
277+
- `--source claude|codex|cursor|opencode|pi|omp|openclaw|copilot|hermes`
271278
- `--since <iso|unix>` / `--until <iso|unix>`
272279
- `--limit <n>`
273280
- `--min-score <float>`
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"type":"title","v":1,"title":"Inspect the project","source":"auto","updatedAt":"2026-08-13T00:00:03.000Z"}
2+
{"type":"session","version":3,"id":"omp-session","timestamp":"2026-08-13T00:00:00.000Z","cwd":"/workspace/omp-project","title":"Inspect the project","titleSource":"auto"}
3+
{"type":"model_change","id":"model-1","parentId":null,"timestamp":"2026-08-13T00:00:00.100Z","model":"openai-codex/gpt-5.6-luna"}
4+
{"type":"message","id":"user-1","parentId":"model-1","timestamp":"2026-08-13T00:00:01.000Z","message":{"role":"user","content":[{"type":"text","text":"Inspect the project"}],"timestamp":1786665601000}}
5+
{"type":"message","id":"assistant-1","parentId":"user-1","timestamp":"2026-08-13T00:00:02.000Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":"I will inspect the project."},{"type":"text","text":"I will inspect the project."},{"type":"toolCall","id":"tool-1","name":"Read","arguments":{"path":"README.md"}}],"timestamp":1786665602000,"usage":{"input":12,"output":8,"cacheRead":2,"cacheWrite":1},"model":"gpt-5.6-luna","provider":"openai"}}
6+
{"type":"message","id":"tool-result-1","parentId":"assistant-1","timestamp":"2026-08-13T00:00:03.000Z","message":{"role":"toolResult","toolCallId":"tool-1","toolName":"Read","content":[{"type":"text","text":"project contents"}],"isError":false,"timestamp":1786665603000}}

herdr-plugin.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# memex as a herdr plugin: a session desk for your agent history.
22
#
33
# memex indexes the transcripts every coding agent on this machine leaves behind (Claude Code,
4-
# Codex, Cursor, OpenCode, Pi, OpenClaw, Copilot). Inside herdr it becomes a native pane: browse
5-
# and search past sessions, then resume one straight into a new herdr tab.
4+
# Codex, Cursor, OpenCode, Pi, Oh My Pi, OpenClaw, Copilot). Inside herdr it becomes a native
5+
# pane: browse and search past sessions, then resume one straight into a new herdr tab.
66
#
77
# The version here must match Cargo.toml — herdr/install.sh downloads the release tarball tagged
88
# with exactly this version.
@@ -11,7 +11,7 @@ name = "memex"
1111
version = "0.10.1"
1212
min_herdr_version = "0.7.0"
1313
platforms = ["macos", "linux"]
14-
description = "Session desk for your agent history: search every past Claude Code / Codex / Cursor session and resume one into a herdr tab."
14+
description = "Session desk for your agent history: search past Claude Code / Codex / Cursor / Pi / Oh My Pi sessions and resume one into a herdr tab."
1515

1616
# On `herdr plugin install`, put a working memex binary under $HERDR_PLUGIN_ROOT/bin: reuse one
1717
# already on PATH if it speaks the herdr surface, else download the matching release tarball, else

herdr/plugin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ resume-last)
203203
refuse "cannot read pane context ($ctx_state); refusing to resume without directory scoping"
204204
# memex resolves the most recent resumable session and opens it in a new herdr tab itself,
205205
# driving the herdr CLI with the HERDR_* env this action already carries.
206-
args=(herdr resume-last)
206+
args=(herdr resume-last --strict-cwd)
207207
[ -n "$ctx_cwd" ] && args+=(--cwd "$ctx_cwd")
208208
# MEMEX_ROOT (matching memex-pane.sh) points every memex call at an alternate data directory.
209209
[ -n "${MEMEX_ROOT:-}" ] && args+=(--root "$MEMEX_ROOT")

skills/codex/memex-search/SKILL.md

Lines changed: 0 additions & 168 deletions
This file was deleted.

skills/memex-search/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: memex-search
3-
description: Search, filter, and retrieve Claude/Codex/Cursor/OpenCode/Pi/Copilot history indexed by the memex CLI. Use when the user wants to index history, run lexical/semantic/hybrid search, fetch full transcripts, or produce LLM-friendly JSON output for RAG.
3+
description: Search, filter, and retrieve Claude/Codex/Cursor/OpenCode/Pi/Oh My Pi/Copilot history indexed by the memex CLI. Use when the user wants to index history, run lexical/semantic/hybrid search, fetch full transcripts, or produce LLM-friendly JSON output for RAG.
44
allowed-tools: Bash(memex:*)
55
---
66

@@ -27,6 +27,7 @@ Use this skill to index local history and retrieve results in a structured, LLM-
2727
- `--codex/--no-codex` to include or skip Codex logs
2828
- `--opencode/--no-opencode` to include or skip OpenCode logs
2929
- `--pi/--no-pi` to include or skip Pi logs
30+
- `--omp/--no-omp` to include or skip Oh My Pi logs
3031
- `--copilot/--no-copilot` to include or skip GitHub Copilot CLI logs
3132
- `--model <minilm|bge|nomic|gemma|potion>` to select embedding model
3233
- `--root <path>` to change data root (default: `~/.memex`)

skills/opencode/memex-search/SKILL.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)