agent-migrate-adapters 0.6.1

Codex, Pi, and Claude Code configuration adapters for agent-migrate
Documentation
use std::path::PathBuf;

use agent_migrate_core::{BundleError, BundlePathError, PathMappingError, SecretError};
use thiserror::Error;

#[derive(Debug, Error)]
pub enum AdapterError {
    #[error("project scope requires --workspace")]
    WorkspaceRequired,
    #[error("symlink escapes scan root: {logical_path}")]
    SymlinkEscape { logical_path: String },
    #[error("filesystem error at {path}")]
    Io {
        path: PathBuf,
        #[source]
        source: std::io::Error,
    },
    #[error("directory traversal failed: {0}")]
    Walk(String),
    #[error("structured config is invalid at {path}: {message}")]
    Structured { path: PathBuf, message: String },
    #[error("adapter invariant failed")]
    InternalInvariant,
    #[error("lossy conversion requires explicit acceptance: {path}")]
    LossyAcceptanceRequired { path: String },
    #[error("required bridge is unavailable: {path}")]
    BridgeUnavailable { path: String },
    #[error("compatibility blocks import: {path}")]
    CompatibilityBlocked { path: String },
    #[error("render failed for {path}: {message}")]
    Render { path: String, message: String },
    #[error(transparent)]
    BundlePath(#[from] BundlePathError),
    #[error(transparent)]
    Bundle(#[from] BundleError),
    #[error(transparent)]
    Secret(#[from] SecretError),
    #[error(transparent)]
    PathMapping(#[from] PathMappingError),
}