Skip to main content

luft_service/
lib.rs

1//! # luft-service
2//!
3//! **Presentation-free run lifecycle and query functions.**
4//!
5//! The service layer sits between the facade (`luft`) and the runtime /
6//! scheduler. It provides:
7//!
8//! - **Run preparation**: resolve script source (NL / workflow file / raw Lua),
9//!   extract meta, assign run directories.
10//! - **Execution**: build the sandboxed runtime and execute the script.
11//! - **Query**: synchronous read-only operations for status, events, findings,
12//!   reports, and logs.
13//! - **Phases view**: build structured phase/agent trees for UI rendering.
14//!
15//! ## Modules
16//!
17//! | Module | Responsibility |
18//! |--------|---------------|
19//! | [`run`] | Run lifecycle: validate, resolve, prepare, execute |
20//! | [`query`] | Read-only queries: status, events, findings, report, cancel |
21//! | [`phases`] | Phase tree builder for CLI / UI rendering |
22//!
23//! [`run`]: run
24//! [`query`]: query
25//! [`phases`]: phases
26
27pub mod phases;
28pub mod query;
29pub mod run;
30
31#[cfg(test)]
32mod tests {
33    #[test]
34    fn submodules_are_accessible() {
35        // Compile-time check: referencing each submodule's marker proves the
36        // module path resolves. If any module becomes private / removed,
37        // this file will fail to compile.
38        let _: phases::__PhasesProbe = ();
39        let _: query::__QueryProbe = ();
40        let _: run::__RunProbe = ();
41    }
42
43    mod phases {
44        #[cfg(test)]
45        pub type __PhasesProbe = ();
46    }
47    mod query {
48        #[cfg(test)]
49        pub type __QueryProbe = ();
50    }
51    mod run {
52        #[cfg(test)]
53        pub type __RunProbe = ();
54    }
55}