1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use std::path::PathBuf;
use clap::{Args, Subcommand};
#[derive(Debug, Args)]
pub(crate) struct ProvidersArgs {
#[command(subcommand)]
pub command: ProvidersCommand,
}
#[derive(Debug, Subcommand)]
pub(crate) enum ProvidersCommand {
/// Run the provider catalog refresh workflow.
Refresh(ProvidersRefreshArgs),
/// Validate the loaded catalog and generated artifact contract.
Validate(ProvidersValidateArgs),
/// Generate JSON, schema, TypeScript, and Swift catalog artifacts.
Export(ProvidersExportArgs),
}
#[derive(Debug, Args)]
pub(crate) struct ProvidersRefreshArgs {
/// Hit live provider/model sources instead of bundled fixtures.
#[arg(long)]
pub live: bool,
/// Compare fixture output with committed refresh goldens.
#[arg(long)]
pub check: bool,
/// Refresh committed refresh goldens. Implies --check.
#[arg(long)]
pub update: bool,
/// Refresh workflow script path.
#[arg(long, default_value = "scripts/update_provider_catalog.harn")]
pub script: PathBuf,
}
#[derive(Debug, Args)]
pub(crate) struct ProvidersValidateArgs {
/// Merge an additional providers.toml-style overlay before validating.
#[arg(long)]
pub overlay: Option<PathBuf>,
/// Also verify checked-in generated artifacts match the current catalog.
#[arg(long = "check-artifacts")]
pub check_artifacts: bool,
/// Directory containing generated provider catalog artifacts.
#[arg(long, default_value = "spec/provider-catalog")]
pub artifact_dir: PathBuf,
/// Emit validation details as JSON.
#[arg(long)]
pub json: bool,
}
#[derive(Debug, Args)]
pub(crate) struct ProvidersExportArgs {
/// Directory to write generated artifacts into.
#[arg(long, default_value = "spec/provider-catalog")]
pub output_dir: PathBuf,
/// Check whether existing files are up to date without writing them.
#[arg(long)]
pub check: bool,
/// Merge an additional providers.toml-style overlay before exporting.
#[arg(long)]
pub overlay: Option<PathBuf>,
}