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
use clap::{Args, Subcommand};
#[derive(Debug, Args)]
pub(crate) struct DoctorArgs {
/// Emit a single JSON document instead of human-readable output. The
/// document conforms to the `harn --json-schemas --command doctor`
/// envelope (`schemaVersion: 3`).
#[arg(long)]
pub json: bool,
/// Actively probe every configured provider over the network
/// (`/v1/models` GET or the provider's healthcheck endpoint) and
/// record per-provider reachability and latency. Off by default
/// because probes add network round-trips.
#[arg(long)]
pub check_providers: bool,
/// Deprecated no-op. `harn doctor` stays offline unless
/// `--check-providers` is supplied.
#[arg(long, conflicts_with = "check_providers")]
pub no_network: bool,
/// Actively `cargo check --target <triple>` every Rustup-installed
/// target plus the canonical Linux/macOS/Windows/WASM triples. Off
/// by default because each probe spawns Cargo.
#[arg(long)]
pub check_targets: bool,
#[command(subcommand)]
pub command: Option<DoctorCommand>,
}
#[derive(Debug, Subcommand)]
pub(crate) enum DoctorCommand {
/// Run every process-sandbox conformance case against this host's live
/// backend and report which confinement is actually enforced. Exits
/// nonzero unless every case that applies here was measured and holds.
Sandbox(DoctorSandboxArgs),
}
#[derive(Debug, Args)]
pub(crate) struct DoctorSandboxArgs {
/// Emit a single JSON document instead of human-readable output.
#[arg(long)]
pub json: bool,
}