//! VCS-agnostic workspace isolation for code-modifying agents.
//!
//! Provides [`WorktreeManager`] backed by a [`WorkspaceBackend`] implementation
//! selected at construction time. Supports jj (native workspaces, stable
//! change IDs) and git (worktrees). Auto-detection via [`detect_vcs`].

pub mod backend;
pub mod detect;
pub mod error;
pub mod handle;
pub mod manager;

#[cfg(feature = "git")]
pub mod git;

#[cfg(feature = "jj")]
pub mod jj;

pub use backend::{
    ConflictInfo, MergeStatus, VcsCapabilities, VcsMetadata, WorkspaceBackend, WorkspaceInfo,
};
pub use detect::{detect_vcs, VcsDetection};
pub use error::{Result, WorktreeError};
#[cfg(feature = "git")]
pub use git::{GitBackend, GitConstraints};
pub use handle::WorktreeHandle;
#[cfg(feature = "jj")]
pub use jj::JjBackend;
pub use manager::WorktreeManager;
