cargo-tupa 0.9.3

Cargo subcommand for Tupã Rust-DSL pipelines
use anyhow::Result;
use std::path::PathBuf;
use tupa_engine::Executor;

/// Run `cargo tupa run` — execute a Rust-DSL pipeline with JSON input.
pub fn run(
    manifest_path: &Option<PathBuf>,
    input: Option<PathBuf>,
    parallel: bool,
) -> Result<()> {
    // Locate Cargo.toml and find the package with a pipeline
    let project_root = manifest_path
        .as_ref()
        .map(|p| p.parent().unwrap())
        .unwrap_or_else(|| std::path::Path::new("."));

    // In a real implementation, we would parse Cargo.toml to find the target
    // and locate the pipeline struct. For now, expect user to specify via env or config.
    anyhow::bail!(
        "cargo-tupa run requires integration with Cargo workspace discovery.\n\
         Planned for 0.9.3 — auto-detect pipeline target in current package."
    )
}