Skip to main content

ralph/cli/machine/
mod.rs

1//! `ralph machine` CLI facade.
2//!
3//! Purpose:
4//! - Provide the stable machine-command entrypoint for `main.rs`, tests, and the macOS app.
5//!
6//! Responsibilities:
7//! - Re-export the machine-facing Clap surface consumed by the macOS app.
8//! - Keep routing and JSON/document helpers in focused companion modules.
9//! - Re-export queue/task machine documents from their companion builders.
10//!
11//! Scope:
12//! - Facade and re-exports only.
13//! - Does not own queue/task/run business logic.
14//! - Does not define machine contract types.
15//!
16//! Usage:
17//! - Import `crate::cli::machine::*` or call `handle_machine` from CLI entrypoints.
18//! - The queue continuation document builders live in `queue_docs.rs` and are re-exported here.
19//!
20//! Invariants/assumptions:
21//! - Machine responses remain versioned and deterministic.
22//! - This facade stays thin as machine sub-surfaces evolve.
23
24mod args;
25mod common;
26mod error;
27mod handle;
28mod io;
29mod queue;
30mod queue_docs;
31mod run;
32mod task;
33
34pub use args::{
35    MachineArgs, MachineCommand, MachineConfigArgs, MachineConfigCommand, MachineDashboardArgs,
36    MachineDoctorArgs, MachineDoctorCommand, MachineQueueArgs, MachineQueueCommand,
37    MachineQueueRepairArgs, MachineQueueUndoArgs, MachineRunArgs, MachineRunCommand,
38    MachineRunLoopArgs, MachineRunOneArgs, MachineSystemArgs, MachineSystemCommand,
39    MachineTaskArgs, MachineTaskCommand, MachineTaskCreateArgs, MachineTaskDecomposeArgs,
40    MachineTaskMutateArgs,
41};
42pub(crate) use common::{
43    machine_doctor_report_command, machine_run_loop_command, machine_run_parallel_status_command,
44};
45pub use error::print_machine_error;
46pub use handle::handle_machine;
47pub(crate) use queue_docs::{
48    build_repair_document as build_queue_repair_document,
49    build_undo_document as build_queue_undo_document,
50    build_validate_document as build_queue_validate_document,
51};
52pub(crate) use task::{
53    build_decompose_document as build_task_decompose_document, build_task_mutation_document,
54};