#!/usr/bin/env python3 """ CLI interface to test the Capital Project Orchestrator """ import sys import os # Add src directory to path sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'src')) from orchestrator.master_orchestrator import MasterOrchestrator def main(): print("\nšŸ—ļø CAPITAL PROJECT EXECUTIVE DASHBOARD") print("="*80) # Initialize orchestrator orchestrator = MasterOrchestrator() # Example queries to test example_queries = [ "What is the current supplier risk across our portfolio?", "Show me the contract exposure and CE backlog", "Are there any critical issues I should be aware of?", ] print("\nExample queries:") for i, q in enumerate(example_queries, 1): print(f" {i}. {q}") print("\n" + "-"*80) # Interactive mode while True: query = input("\nšŸ’¬ Enter your query (or 'q' to quit): ").strip() if query.lower() in ['q', 'quit', 'exit']: print("\nšŸ‘‹ Goodbye!") break if not query: continue # Process query through orchestrator result = orchestrator.orchestrate(query) # Display formatted output print(orchestrator.format_output(result)) # Ask if user wants to continue continue_prompt = input("\nPress Enter to ask another question or 'q' to quit: ").strip() if continue_prompt.lower() in ['q', 'quit', 'exit']: print("\nšŸ‘‹ Goodbye!") break if __name__ == "__main__": main()