import asyncio
from website_factory_orchestrator import execute_p1_pipeline, ProspectIntakeRequest

async def run_test():
    print("Generating Master Plumber Template via Zero-Touch Factory...")
    reqs = [
        ProspectIntakeRequest(
            business_name="Apex Plumbing Services", 
            transcript_summary="We are a 24/7 master plumbing service based in Brisbane. We handle everything from blocked drains and burst pipes to full bathroom renovations and commercial fit-outs. We want to be positioned as the absolute premium, most reliable emergency plumber in the city. Fast response, lifetime guarantees, and heavily branded.", 
            target_audience="Homeowners needing emergency plumbing and commercial property managers"
        )
    ]
    
    tasks = [execute_p1_pipeline(r) for r in reqs]
    results = await asyncio.gather(*tasks, return_exceptions=True)
    
    for r in results:
        if isinstance(r, Exception):
            print(f"Pipeline error: {r}")
            
    print("Master Pipeline Generation finished.")

if __name__ == "__main__":
    asyncio.run(run_test())
