From bcf1f71506b8f12917293d6a907cf55f5d5e4d90 Mon Sep 17 00:00:00 2001 From: Kai <266347349+thefoxkai@users.noreply.github.com> Date: Mon, 24 Aug 2026 21:49:45 +0200 Subject: [PATCH] include OMP session media --- README.md | 2 +- src/sessiontrove/archive.py | 7 +++++++ tests/test_archive.py | 13 +++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 87c66e1..dc6ad82 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ sessiontrove ~/Backups/agent-sessions --machine macbookpro-m4 | --- | --- | | Claude Code | Project transcripts and `history.jsonl` under `$CLAUDE_CONFIG_DIR` or `~/.claude` | | Codex | `~/.codex/sessions`, `~/.codex/archived_sessions`, and `~/.codex/history.jsonl` | -| Oh My Pi (OMP) | `sessions` under `$PI_CODING_AGENT_DIR` or `~/.omp/agent` | +| Oh My Pi (OMP) | `sessions` and referenced media `blobs` under `$PI_CODING_AGENT_DIR` or `~/.omp/agent` | | OpenClaw | Every agent's `sessions` directory under `$OPENCLAW_STATE_DIR/agents` or `~/.openclaw/agents` | | Pi | `~/.pi/agent/sessions` | diff --git a/src/sessiontrove/archive.py b/src/sessiontrove/archive.py index 377b0fc..06b47f3 100644 --- a/src/sessiontrove/archive.py +++ b/src/sessiontrove/archive.py @@ -94,6 +94,13 @@ def default_sources( ("*",), ("*.lock", "*.tmp"), ), + Source( + "omp", + omp_home / "blobs", + Path("blobs"), + ("*",), + ("*.lock", "*.tmp"), + ), *openclaw_sources, ) diff --git a/tests/test_archive.py b/tests/test_archive.py index a41f0b9..f4ce077 100644 --- a/tests/test_archive.py +++ b/tests/test_archive.py @@ -66,6 +66,13 @@ def test_source_registry_covers_each_persistent_conversation_store( ("*",), ("*.lock", "*.tmp"), ), + Source( + "omp", + home / ".omp/agent/blobs", + Path("blobs"), + ("*",), + ("*.lock", "*.tmp"), + ), ) @@ -96,6 +103,7 @@ def test_archives_complete_agent_layouts_without_unrelated_state( write(home / ".omp/agent/sessions/project/session/worker.md") write(home / ".omp/agent/sessions/project/session/1.bash.log") write(home / ".omp/agent/sessions/project/session.jsonl.lock", "ephemeral") + write(home / ".omp/agent/blobs/sha256") write(home / ".omp/agent/history.db", "not a conversation") destination = tmp_path / "archive" @@ -105,7 +113,7 @@ def test_archives_complete_agent_layouts_without_unrelated_state( "claude-code": 4, "codex": 3, "pi": 1, - "omp": 4, + "omp": 5, } archived = { path.relative_to(destination).as_posix() @@ -125,6 +133,7 @@ def test_archives_complete_agent_layouts_without_unrelated_state( "macbookpro-m4/omp/sessions/project/session/worker.jsonl", "macbookpro-m4/omp/sessions/project/session/worker.md", "macbookpro-m4/omp/sessions/project/session/1.bash.log", + "macbookpro-m4/omp/blobs/sha256", } @@ -137,7 +146,7 @@ def test_omp_honors_custom_agent_directory(tmp_path: Path) -> None: tmp_path / "home", {"PI_CODING_AGENT_DIR": str(agent_dir)} ) if source.agent == "omp" - ] == [agent_dir / "sessions"] + ] == [agent_dir / "sessions", agent_dir / "blobs"] def test_discovers_and_archives_openclaw_session_directories(tmp_path: Path) -> None: