objectiveai_sdk/functions/expression/mod.rs
1//! Expression evaluation engine for Function compilation.
2//!
3//! This module provides the expression system used by Functions to define
4//! dynamic behavior. Expressions are evaluated against input data and task
5//! results to produce concrete values.
6//!
7//! # Supported Languages
8//!
9//! - **JMESPath** (`{"$jmespath": "..."}`) - JSON query language
10//! - **Starlark** (`{"$starlark": "..."}`) - Python-like configuration language
11//!
12//! # Key Types
13//!
14//! - [`Expression`] - Either a JMESPath or Starlark expression
15//! - [`WithExpression<T>`] - Either a literal value or an expression
16//! - [`InputValue`] - The input data structure passed to expressions
17//! - [`Params`] - Context available during expression evaluation
18//!
19//! # Expression Context
20//!
21//! Expressions can access:
22//! - `input` - The function's input data
23//! - `tasks` - Results from previously executed tasks
24//! - `map` - Current map element (when in mapped task context)
25
26mod error;
27mod expression;
28mod input_schema;
29mod input_value;
30mod params;
31mod runtime;
32mod special;
33mod starlark;
34
35pub use error::*;
36pub use expression::*;
37pub use input_schema::*;
38pub use input_value::*;
39pub use params::*;
40pub use runtime::*;
41pub use special::{FromSpecial, Special};
42pub(crate) use special::impl_from_special_unsupported;
43pub use starlark::{FromStarlarkValue, ToStarlarkValue};
44
45#[cfg(test)]
46mod expression_tests;
47#[cfg(test)]
48mod special_tests;
49#[cfg(test)]
50mod starlark_tests;
51#[cfg(test)]
52mod input_schema_tests;