#!/usr/bin/env python3

# Quick test of the clean agent syntax
import sys
import os

# Add the src directory to the Python path
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'src'))

try:
    from alloy import parser, Interpreter
    
    print("🚀 Testing Clean Agent Syntax")
    print("=" * 40)
    
    # Test 1: Clean agent definition
    test_code1 = 'claude = agent "claude-3.5-sonnet"'
    print(f"Testing: {test_code1}")
    
    try:
        ast = parser.parse(test_code1)
        print("✅ Parser success!")
        
        interpreter = Interpreter()
        interpreter.interpret(ast)
        print("✅ Interpreter success!")
        
        # Check if agent was defined
        claude_model = interpreter.global_env.get_agent('claude')
        print(f"✅ Claude agent defined: {claude_model}")
        
    except Exception as e:
        print(f"❌ Error: {e}")
        import traceback
        traceback.print_exc()
    
    print("\n" + "=" * 40)
    print("🎉 Quick test complete!")
    
except ImportError as e:
    print(f"Import error: {e}")
    print("Make sure alloy_interpreter.py is in the same directory")