Skip to main content

lean_ctx_ext/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2//! LeanCTX | Engine extensions: the engine modules above the core, split
3//! upward out of the Engine (crate split cut 2, docs/internal/engine-core-split.md).
4//!
5//! Nothing in the Engine uses these modules; they depend on the Engine
6//! library (package lean-ctx-engine, lib `lean_ctx`) and the crates above
7//! use them. The moved modules keep their engine paths: the crate root
8//! glob-imports the engine and `core` re-exports `lean_ctx::core::*` next
9//! to the moved modules, so `crate::core::X`, `crate::test_env` and
10//! `super::X` resolve unchanged and each move stays a pure rename.
11#![recursion_limit = "256"]
12// Every `unsafe` block must carry a `// SAFETY:` comment justifying soundness.
13#![warn(clippy::undocumented_unsafe_blocks)]
14
15// The glob keeps `crate::X` paths of the moved modules resolving to the Engine.
16#[allow(unused_imports, clippy::wildcard_imports)]
17use lean_ctx::*;
18
19pub mod core;
20
21pub mod compound_lexer;
22/// Protected GitLab source bootstrap for agent launches.
23pub mod gitlab_bootstrap;
24pub mod heatmap;
25pub mod mcp_stdio;
26pub mod report;
27pub mod rewrite_registry;
28
29/// The containment helper test of this crate's unit-test harness, at the path
30/// the Engine starts its helpers and guards on (`shell::containment::tests`).
31/// The moved sandbox and GitLab bootstrap tests spawn this harness as their
32/// guard. The module shadows the glob-imported engine `shell`, so it
33/// re-exports the engine paths those tests use next to the helper.
34#[cfg(all(test, unix))]
35mod shell {
36    #[allow(unused_imports)]
37    pub(crate) use lean_ctx::shell::*;
38
39    pub(crate) mod containment {
40        #[allow(unused_imports)]
41        pub(crate) use lean_ctx::shell::containment::*;
42
43        pub(crate) mod tests {
44            pub(crate) use lean_ctx::shell::containment::tests::*;
45
46            #[test]
47            #[ignore = "subprocess helper for the containment tests"]
48            fn containment_helper() {
49                lean_ctx::shell::containment::tests::containment_helper_main();
50            }
51        }
52    }
53}