1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! YAML Agent Definition loading, interpolation, serialization, and hot reload.
//!
//! This module provides a complete YAML-based agent configuration layer:
//!
//! - [`schema`] — YAML schema types for agent definitions, including model config,
//! tool references, sub-agent references, plugin references, and session/memory config
//! - [`loader`] — Agent config loader for parsing, interpolating, validating, and
//! resolving YAML files into live `Agent` instances
//! - [`interpolator`] — Environment variable interpolation with `${VAR}` and
//! `${VAR:-default}` syntax for all string fields
//! - [`serializer`] — Round-trip YAML serialization of agent definitions
//! - [`watcher`] — Hot reload watcher for filesystem changes with debouncing
//!
//! ## Environment Variable Interpolation
//!
//! All string fields in a YAML agent definition support environment variable
//! placeholders:
//!
//! - `${VARIABLE_NAME}` — replaced with the env var value; error if unset
//! - `${VARIABLE_NAME:-default_value}` — uses the default if the var is unset
//!
//! Interpolation is applied automatically during `load_file()` before validation.
//!
//! ## Plugins, Session, and Memory
//!
//! Agent definitions can reference plugins by name and configure session/memory
//! backends declaratively:
//!
//! ```yaml
//! plugins:
//! - name: telemetry
//! config:
//! endpoint: "${OTEL_ENDPOINT:-http://localhost:4317}"
//!
//! session:
//! backend: postgres
//! connection_string: "${DATABASE_URL}"
//!
//! memory:
//! backend: inmemory
//! ```
//!
//! Enabled by the `yaml-agent` feature flag.
// Re-export key types for convenient access.
pub use ;
pub use ;
pub use serialize_definition;
pub use HotReloadWatcher;