use std::path::PathBuf;
use clap::{Args, Subcommand};
#[derive(Debug, Args)]
pub(crate) struct FlowArgs {
#[command(subcommand)]
pub command: FlowCommand,
}
#[derive(Debug, Subcommand)]
pub(crate) enum FlowCommand {
ReplayAudit(FlowReplayAuditArgs),
Ship(FlowShipArgs),
Archivist(FlowArchivistArgs),
}
#[derive(Debug, Args)]
pub(crate) struct FlowReplayAuditArgs {
#[arg(long, value_name = "PATH", default_value = ".harn/flow.sqlite")]
pub store: PathBuf,
#[arg(
long = "predicate-root",
alias = "root",
value_name = "PATH",
default_value = "."
)]
pub predicate_root: PathBuf,
#[arg(long = "touched-dir", alias = "target-dir", value_name = "PATH")]
pub touched_dirs: Vec<PathBuf>,
#[arg(long, value_name = "DATE")]
pub since: Option<String>,
#[arg(long)]
pub json: bool,
#[arg(long)]
pub fail_on_drift: bool,
}
#[derive(Debug, Args)]
pub(crate) struct FlowShipArgs {
#[command(subcommand)]
pub command: FlowShipCommand,
}
#[derive(Debug, Subcommand)]
pub(crate) enum FlowShipCommand {
Watch(FlowShipWatchArgs),
}
#[derive(Debug, Args)]
pub(crate) struct FlowShipWatchArgs {
#[arg(long, value_name = "PATH", default_value = ".harn/flow.sqlite")]
pub store: PathBuf,
#[arg(
long = "predicate-root",
alias = "root",
value_name = "PATH",
default_value = "."
)]
pub predicate_root: PathBuf,
#[arg(long = "touched-dir", alias = "target-dir", value_name = "PATH")]
pub touched_dirs: Vec<PathBuf>,
#[arg(long, value_name = "NAME", default_value = "ship_captain")]
pub persona: String,
#[arg(long = "mock-pr-out", value_name = "PATH")]
pub mock_pr_out: Option<PathBuf>,
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Args)]
pub(crate) struct FlowArchivistArgs {
#[command(subcommand)]
pub command: FlowArchivistCommand,
}
#[derive(Debug, Subcommand)]
pub(crate) enum FlowArchivistCommand {
Scan(FlowArchivistScanArgs),
}
#[derive(Debug, Args)]
pub(crate) struct FlowArchivistScanArgs {
#[arg(value_name = "REPO", default_value = ".")]
pub repo: PathBuf,
#[arg(long, value_name = "PATH")]
pub manifest: Option<PathBuf>,
#[arg(long, value_name = "PATH", default_value = ".harn/flow.sqlite")]
pub store: PathBuf,
#[arg(long = "shadow-days", value_name = "DAYS", default_value_t = 30)]
pub shadow_days: u32,
#[arg(long, value_name = "PATH")]
pub out: Option<PathBuf>,
#[arg(long)]
pub json: bool,
}