Skip to main content

ralph/cli/machine/
mod.rs

1//! `ralph machine` CLI facade.
2//!
3//! Responsibilities:
4//! - Re-export the machine-facing Clap surface consumed by the macOS app.
5//! - Keep routing and JSON/document helpers in focused companion modules.
6//! - Preserve the stable public entrypoint for `main.rs` and tests.
7//!
8//! Not handled here:
9//! - Queue/task/run business logic beyond delegated machine handlers.
10//! - Machine contract type definitions (see `crate::contracts::machine`).
11//! - Human-facing CLI output.
12//!
13//! Invariants/assumptions:
14//! - Machine responses remain versioned and deterministic.
15//! - This facade stays thin as machine sub-surfaces evolve.
16
17mod args;
18mod common;
19mod handle;
20mod io;
21mod queue;
22mod run;
23mod task;
24
25pub use args::{
26    MachineArgs, MachineCommand, MachineConfigArgs, MachineConfigCommand, MachineDashboardArgs,
27    MachineDoctorArgs, MachineDoctorCommand, MachineQueueArgs, MachineQueueCommand,
28    MachineQueueRepairArgs, MachineQueueUndoArgs, MachineRunArgs, MachineRunCommand,
29    MachineRunLoopArgs, MachineRunOneArgs, MachineSystemArgs, MachineSystemCommand,
30    MachineTaskArgs, MachineTaskCommand, MachineTaskCreateArgs, MachineTaskDecomposeArgs,
31    MachineTaskMutateArgs,
32};
33pub use handle::handle_machine;
34pub(crate) use queue::{
35    build_repair_document as build_queue_repair_document,
36    build_undo_document as build_queue_undo_document,
37    build_validate_document as build_queue_validate_document,
38};
39pub(crate) use task::{
40    build_decompose_document as build_task_decompose_document, build_task_mutation_document,
41};