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
//! CLI spec command implementation (wired into the hidden/internal `cueloop __cli-spec` command).
//!
//! Purpose:
//! - CLI spec command implementation (wired into the hidden/internal `cueloop __cli-spec` command).
//!
//! Responsibilities:
//! - Provide a small "command layer" entrypoint that produces the deterministic CLI spec JSON for
//! the current build of CueLoop.
//! - Keep the execution/IO boundary separate from clap introspection and contract modeling.
//!
//! Not handled here:
//! - Registering a user-facing `cueloop cli-spec` (or similar) top-level command in clap.
//! - Reading/writing files or printing to stdout/stderr.
//!
//!
//! Usage:
//! - Used through the crate module tree or integration test harness.
//!
//! Invariants/assumptions:
//! - Uses `Cli::command()` as the canonical source of the clap command tree.
//! - Output must be deterministic across invocations within the same build.
use Result;
use CommandFactory;
use crateCliSpec;
/// Build the structured `CliSpec` for the current CueLoop CLI.
/// Emit deterministic pretty JSON for the current CueLoop CLI.