pub async fn run_staged(
print_only: bool,
no_ai: bool,
model: Option<String>,
beta_header: Option<(String, String)>,
context_dir: Option<&Path>,
repo_path: Option<&Path>,
) -> Result<StagedOutcome>Expand description
Public entry point for the staged-commit command.
Mirrors crate::cli::git::run_twiddle’s shape so the MCP server can wrap
it the same way: resolve the repo root (the injected path, or the CWD as the
default), run AI preflight, build the client, and delegate to the
test-injectable inner [run_staged_with_client].
no_ai skips AI entirely (no credential preflight, no client, no network
call) and returns a deterministic type(scope): skeleton instead — see
[run_staged_no_ai].