//! NATS admin integration — operational bus for the supervisor toolkit.
//!
//! Enabled by the `nats-admin` cargo feature.
//!
//! # Architecture
//!
//! The web server connects **outbound** to the NATS hub (leaf-node topology).
//! No inbound ports are required in k8s. The supervisor toolkit publishes
//! admin commands; the server subscribes and responds.
//!
//! Full subject path: `{namespace.prefix}.{namespace.env}.{leaf}`
//! e.g. `evol.website.prod.admin.logs`
//!
//! # Usage
//!
//! ```rust,ignore
//! use rustelo_server::nats::NatsAdminClient;
//!
//! let client = NatsAdminClient::connect(&config.external_services.nats_admin.unwrap()).await?;
//! client.publish("health", b"ping").await?;
//! ```

pub mod client;
pub mod executor;
pub mod pipeline;
pub mod subjects;

#[cfg(feature = "pipeline-watcher")]
pub mod watcher;

pub use client::{NatsAdminClient, PublishError, RequestError, SubscribeError};
pub use executor::PipelineContext;
pub use pipeline::{load_pipeline_config, Pipeline, PipelineConfig, PipelineTrigger};
pub use subjects::SubjectBuilder;
