Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |

Expand Down
7 changes: 7 additions & 0 deletions src/sessiontrove/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ def default_sources(
("*",),
("*.lock", "*.tmp"),
),
Source(
"omp",
omp_home / "blobs",
Path("blobs"),
("*",),
("*.lock", "*.tmp"),
),
*openclaw_sources,
)

Expand Down
13 changes: 11 additions & 2 deletions tests/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
),
)


Expand Down Expand Up @@ -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"
Expand All @@ -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()
Expand All @@ -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",
}


Expand All @@ -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:
Expand Down