gemini_adk_fluent_rs/compose/
mod.rs

1//! Composition modules -- S, C, P, M, T, A, E, G.
2//!
3//! Eight namespaces for composing different aspects of agent configuration:
4//!
5//! | Module | Namespace | Operator | Purpose                        |
6//! |--------|-----------|----------|--------------------------------|
7//! | S      | `S::`     | `>>`     | State transforms               |
8//! | C      | `C::`     | `+`      | Context engineering             |
9//! | P      | `P::`     | `+`      | Prompt composition              |
10//! | M      | `M::`     | `\|`     | Middleware composition           |
11//! | T      | `T::`     | `\|`     | Tool composition                |
12//! | A      | `A::`     | `+`      | Artifact schemas                |
13//! | E      | `E::`     | `\|`     | Evaluation criteria             |
14//! | G      | `G::`     | `\|`     | Guard composition               |
15//!
16//! # Quick Reference
17//!
18//! ```rust
19//! use gemini_adk_fluent_rs::compose::{S, C, P, T, A, E, G};
20//! use serde_json::json;
21//! use gemini_genai_rs::prelude::Content;
22//!
23//! // S: State transforms — pick, rename, chain with >>
24//! let transform = S::pick(&["a", "b"]) >> S::rename(&[("a", "x")]);
25//!
26//! // C: Context policies — window, filter, chain with +
27//! let context = C::window(10) + C::user_only();
28//!
29//! // P: Prompt sections — role, task, format, chain with +
30//! let prompt = P::role("analyst") + P::task("analyze data") + P::format("JSON");
31//!
32//! // T: Tool composition — built-ins and custom, chain with |
33//! let tools = T::google_search() | T::code_execution();
34//!
35//! // A: Artifact schemas — inputs and outputs, chain with +
36//! let artifacts = A::json_output("report", "Analysis report")
37//!     + A::text_input("source", "Source document");
38//!
39//! // E: Evaluation — criteria composition with |
40//! let eval = E::response_match() | E::safety();
41//!
42//! // G: Guards — output validation with |
43//! let guards = G::length(1, 1000) | G::json();
44//! ```
45
46pub mod artifacts;
47pub mod context;
48pub mod ctx;
49pub mod eval;
50pub mod guards;
51#[doc(hidden)]
52pub mod middleware;
53pub mod prompt;
54pub mod state;
55pub mod tools;
56
57pub use artifacts::{ArtifactOp, A};
58pub use context::C;
59pub use ctx::Ctx;
60pub use eval::E;
61pub use guards::G;
62pub use middleware::M;
63pub use prompt::P;
64pub use state::S;
65pub use tools::T;