pub struct HarnessCatalog;Expand description
Read-only entry point for discovering, loading, and following persisted harness sessions.
Implementations§
Source§impl HarnessCatalog
impl HarnessCatalog
Sourcepub fn new() -> HarnessCatalog
pub fn new() -> HarnessCatalog
Construct a catalog. It holds no cache or global mutable state.
Sourcepub fn discover(
&self,
query: &DiscoveryQuery,
) -> Result<Vec<SessionDescriptor>, InterchangeError>
pub fn discover( &self, query: &DiscoveryQuery, ) -> Result<Vec<SessionDescriptor>, InterchangeError>
Discover sessions using lightweight headers/indexes rather than full transcript normalization. Malformed or concurrently-created entries are skipped without aborting the rest of the scan.
Sourcepub fn discover_raw_index(
&self,
query: &DiscoveryQuery,
) -> Vec<SessionDescriptor>
pub fn discover_raw_index( &self, query: &DiscoveryQuery, ) -> Vec<SessionDescriptor>
Scan file-backed session metadata without pagination or conversation previews. Child sessions are retained so a long-lived caller can keep an exact in-memory lineage index and project it without rescanning the native stores.
Sourcepub fn project_index(
&self,
query: &DiscoveryQuery,
descriptors: impl IntoIterator<Item = SessionDescriptor>,
) -> Result<Vec<SessionDescriptor>, InterchangeError>
pub fn project_index( &self, query: &DiscoveryQuery, descriptors: impl IntoIterator<Item = SessionDescriptor>, ) -> Result<Vec<SessionDescriptor>, InterchangeError>
Project a raw metadata index through the query’s lineage, search, and pagination rules without reading any transcript content.
Sourcepub fn enrich_index_page(
&self,
query: &DiscoveryQuery,
sessions: Vec<SessionDescriptor>,
) -> Result<Vec<SessionDescriptor>, InterchangeError>
pub fn enrich_index_page( &self, query: &DiscoveryQuery, sessions: Vec<SessionDescriptor>, ) -> Result<Vec<SessionDescriptor>, InterchangeError>
Add the bounded topic/latest-message previews used by list clients to an already projected metadata page.
Sourcepub fn enrich_index_page_with_codex_history(
&self,
query: &DiscoveryQuery,
sessions: Vec<SessionDescriptor>,
codex_history: &CodexHistoryTopicIndex,
) -> Result<Vec<SessionDescriptor>, InterchangeError>
pub fn enrich_index_page_with_codex_history( &self, query: &DiscoveryQuery, sessions: Vec<SessionDescriptor>, codex_history: &CodexHistoryTopicIndex, ) -> Result<Vec<SessionDescriptor>, InterchangeError>
Add list previews using a retained append-aware Codex history index.
Results are identical to Self::enrich_index_page, while a
long-lived caller avoids reparsing all of history.jsonl for every
active transcript write.
Sourcepub fn discover_page(
&self,
query: &DiscoveryQuery,
) -> Result<DiscoveryPage, InterchangeError>
pub fn discover_page( &self, query: &DiscoveryQuery, ) -> Result<DiscoveryPage, InterchangeError>
Discover one stable page and return the cursor for its successor.
Sourcepub fn refresh_file_descriptor(
&self,
locator: &SessionLocator,
workspace: Option<&Path>,
include_topic_candidates: bool,
) -> Result<Option<SessionDescriptor>, InterchangeError>
pub fn refresh_file_descriptor( &self, locator: &SessionLocator, workspace: Option<&Path>, include_topic_candidates: bool, ) -> Result<Option<SessionDescriptor>, InterchangeError>
Refresh one file-backed descriptor without rescanning its native store.
This is the incremental counterpart to Self::discover_page: a
filesystem notification is only an invalidation hint, so callers
re-read the durable file and derive the complete current descriptor.
None means the path disappeared or no longer contains a recognizable
session. SQLite-backed harnesses retain their indexed discovery path.
Sourcepub fn refresh_file_index_descriptor(
&self,
locator: &SessionLocator,
workspace: Option<&Path>,
) -> Result<Option<SessionDescriptor>, InterchangeError>
pub fn refresh_file_index_descriptor( &self, locator: &SessionLocator, workspace: Option<&Path>, ) -> Result<Option<SessionDescriptor>, InterchangeError>
Refresh only stable list metadata for one file-backed descriptor. This avoids reading conversation preview windows for background index maintenance.
Sourcepub fn load(
&self,
locator: &SessionLocator,
) -> Result<Session, InterchangeError>
pub fn load( &self, locator: &SessionLocator, ) -> Result<Session, InterchangeError>
Load the complete normalized session named by a durable locator.
Sourcepub fn load_with_fidelity(
&self,
locator: &SessionLocator,
fidelity: Fidelity,
) -> Result<Session, InterchangeError>
pub fn load_with_fidelity( &self, locator: &SessionLocator, fidelity: Fidelity, ) -> Result<Session, InterchangeError>
Self::load at a declared fidelity.
Read-only surfaces (a session mirror, follow) pass
Fidelity::Semantic so a compacted transcript renders instead of
erroring; every continuation/transfer/export caller keeps the strict
default. See Session::load_with_fidelity.
Sourcepub fn follow(
&self,
locator: &SessionLocator,
) -> Result<SessionFollower, InterchangeError>
pub fn follow( &self, locator: &SessionLocator, ) -> Result<SessionFollower, InterchangeError>
Open a passive change-triggered follower for a durable locator.
Sourcepub fn follow_with_fidelity(
&self,
locator: &SessionLocator,
fidelity: Fidelity,
) -> Result<SessionFollower, InterchangeError>
pub fn follow_with_fidelity( &self, locator: &SessionLocator, fidelity: Fidelity, ) -> Result<SessionFollower, InterchangeError>
Self::follow at a declared fidelity — see Self::load_with_fidelity.
Trait Implementations§
Source§impl Clone for HarnessCatalog
impl Clone for HarnessCatalog
Source§fn clone(&self) -> HarnessCatalog
fn clone(&self) -> HarnessCatalog
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more