Skip to main content

Module sources

Module sources 

Source
Expand description

Remote sources management for cass.

This module provides functionality for configuring and syncing agent session data from remote machines via SSH. It enables cass to search across conversation history from multiple machines.

§Architecture

  • config: Configuration types for defining remote sources
  • provenance: Types for tracking conversation origins
  • sync: Sync engine for pulling sessions from remotes via rsync/SSH
  • status (future): Sync status tracking

§Configuration

Sources are configured in ~/.config/cass/sources.toml:

[[sources]]
name = "laptop"
type = "ssh"
host = "user@laptop.local"
paths = ["~/.claude/projects", "~/.cursor"]

§Provenance

Each conversation tracks where it came from via provenance::Origin:

use coding_agent_search::sources::provenance::{Origin, SourceKind};

// Local conversation
let local = Origin::local();

// Remote conversation
let remote = Origin::remote("work-laptop");

§Syncing

The sync engine uses rsync over SSH for efficient delta transfers:

use coding_agent_search::sources::sync::SyncEngine;
use coding_agent_search::sources::config::SourcesConfig;

let config = SourcesConfig::load()?;
let engine = SyncEngine::new(&data_dir);

for source in config.remote_sources() {
    let report = engine.sync_source(source)?;
    println!("Synced {}: {} files", source.name, report.total_files());
}

§Usage

use coding_agent_search::sources::config::SourcesConfig;

// Load configuration
let config = SourcesConfig::load()?;

// Iterate remote sources
for source in config.remote_sources() {
    println!("Source: {} ({})", source.name, source.host.as_deref().unwrap_or("-"));
}

Re-exports§

pub use config::BackupInfo;
pub use config::ConfigError;
pub use config::ConfigPreview;
pub use config::DiscoveredHost;
pub use config::MergeResult;
pub use config::SkipReason;
pub use config::SourceConfigGenerator;
pub use config::SourceDefinition;
pub use config::SourcesConfig;
pub use config::SyncSchedule;
pub use config::discover_ssh_hosts;
pub use config::get_preset_paths;
pub use provenance::Source;
pub use provenance::SourceFilter;
pub use sync::PathSyncResult;
pub use sync::SourceHealthKind;
pub use sync::SourceSyncAction;
pub use sync::SourceSyncDecision;
pub use sync::SourceSyncInfo;
pub use sync::SyncEngine;
pub use sync::SyncError;
pub use sync::SyncMethod;
pub use sync::SyncReport;
pub use sync::SyncResult;
pub use sync::SyncStatus;
pub use probe::CassStatus;
pub use probe::DetectedAgent;
pub use probe::HostProbeResult;
pub use probe::ProbeCache;
pub use probe::ResourceInfo;
pub use probe::SystemInfo;
pub use probe::probe_host;
pub use probe::probe_hosts_parallel;
pub use install::InstallError;
pub use install::InstallMethod;
pub use install::InstallProgress;
pub use install::InstallResult;
pub use install::InstallStage;
pub use install::RemoteInstaller;
pub use index::IndexError;
pub use index::IndexProgress;
pub use index::IndexResult;
pub use index::IndexStage;
pub use index::RemoteIndexer;
pub use interactive::CassStatusDisplay;
pub use interactive::HostDisplayInfo;
pub use interactive::HostSelectionResult;
pub use interactive::HostSelector;
pub use interactive::HostState;
pub use interactive::InteractiveError;
pub use interactive::confirm_action;
pub use interactive::confirm_with_details;
pub use interactive::probe_to_display_info;
pub use interactive::run_host_selection;
pub use setup::SetupError;
pub use setup::SetupOptions;
pub use setup::SetupResult;
pub use setup::SetupState;
pub use setup::run_setup;

Modules§

config
Configuration types for remote sources.
index
Remote cass indexing via SSH.
install
Remote cass installation via SSH.
interactive
Interactive terminal prompts for the remote sources setup wizard.
probe
SSH host probing for remote source setup.
provenance
Provenance types for tracking conversation origins.
setup
Setup wizard for configuring remote sources.
sync
Sync engine for pulling agent sessions from remote sources.

Structs§

Origin
Per-conversation provenance metadata.
PathMapping
A single path mapping rule for rewriting paths.

Enums§

Platform
Platform hint for choosing default paths.
SourceKind
The kind/type of a source.

Constants§

LOCAL_SOURCE_ID
The default source ID for local conversations.