pub mod context;
pub mod error;
pub mod features;
pub mod generator;
pub mod hybrid;
pub mod interactive;
pub mod invariants;
pub mod registry;
pub mod templates;
pub use context::{AgentContext, AgentContextBuilder};
pub use error::ScaffoldError;
pub use features::{AgentFeature, MonitoringBackend, QualityLevel, TraceExporter};
pub use generator::{FileContent, GeneratedFiles, TemplateGenerator};
pub use hybrid::{
BoundarySpec, CoreSpec, ErrorPropagation, FallbackStrategy, HybridAgentSpec, ModelType,
SerializationFormat, ValidationStrategy, VerificationMethod, WrapperSpec,
};
pub use interactive::InteractiveScaffolder;
pub use invariants::{
AgentContext as InvariantAgentContext, AgentEvent, AgentState, AgentStateMachine, Invariant,
InvariantChecker, InvariantViolation, ViolationAction, ViolationHandler,
};
pub use registry::TemplateRegistry;
pub use templates::{AgentTemplate, MCPServerTemplate, StateMachineTemplate};
use anyhow::Result;
use std::path::Path;
pub async fn scaffold_agent(context: &AgentContext, output: &Path) -> Result<()> {
let registry = TemplateRegistry::new();
let generator = registry.get(&context.template_type)?;
generator.validate_context(context)?;
let files = generator.generate(context)?;
files.write_to_disk(output).await?;
generator.post_generation_hooks(output)?;
Ok(())
}
#[must_use]
pub fn list_templates() -> Vec<String> {
let registry = TemplateRegistry::new();
registry.list_available()
}
pub fn validate_template(path: &Path) -> Result<()> {
let registry = TemplateRegistry::new();
registry.validate_template_file(path)
}
#[cfg(test)]
mod property_tests {
use proptest::prelude::*;
proptest! {
#[test]
fn basic_property_stability(_input in ".*") {
prop_assert!(true);
}
#[test]
fn module_consistency_check(_x in 0u32..1000) {
prop_assert!(_x < 1001);
}
}
}