Skip to main content

cageforge_command/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2
3//! Portable command invocation intent for Cageforge backends.
4//!
5//! [`CommandRequest`] describes what a caller wants to execute without
6//! selecting an operating-system backend or launching a process. The request
7//! is deliberately separate from sandbox policy, configuration parsing, PTY
8//! handling, and process lifecycle management.
9//!
10//! # Reading this crate
11//!
12//! Start with [`CommandRequest`], which owns the complete execution intent.
13//! Its [`CommandSpec`] describes native argv values, [`EnvironmentSpec`]
14//! describes the environment transformation, and [`StdioSpec`] plus
15//! [`TimeoutPolicy`] describe backend-facing execution options. Construction
16//! errors are reported through [`CommandError`]. The implementation keeps
17//! these concerns separate so a caller can reuse the command model without
18//! adopting Cageforge's policy or TOML layers.
19
20#![doc = include_str!("../README.md")]
21#![deny(missing_docs)]
22
23mod command;
24mod environment;
25mod error;
26mod request;
27mod stdio;
28mod timeout;
29
30pub use command::CommandSpec;
31pub use environment::{
32    CoreEnvironment, EnvironmentBase, EnvironmentFilterAction, EnvironmentInput,
33    EnvironmentNameKey, EnvironmentOverride, EnvironmentPattern, EnvironmentSpec,
34};
35pub use error::CommandError;
36pub use request::CommandRequest;
37pub use stdio::{StdioMode, StdioSpec};
38pub use timeout::TimeoutPolicy;