Skip to main content

agentmux_srv_core/registry/
complete_enumeration.rs

1// Copyright 2026, AgentMux Corp.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Listing every channel's `objects.db`, or saying the list is partial.
5
6use std::path::{Path, PathBuf};
7
8use super::migrate::enumerate_sources;
9
10/// Every channel's `objects.db` under `home`, or `None` when a directory that
11/// should have been listed could not be read. A caller that must see EVERY
12/// channel's store (to know nothing elsewhere still uses a thing) can't trust a
13/// partial list.
14pub fn enumerate_objects_dbs_complete(home: &Path) -> Option<Vec<PathBuf>> {
15    let (sources, incomplete) = enumerate_sources(home);
16    (!incomplete).then(|| sources.into_iter().map(|s| s.db_path).collect())
17}