File size: 1,076 Bytes
81e3673
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import asyncio
import logging
import os
import sys

# Add backend to path
sys.path.append(os.path.join(os.getcwd(), 'backend'))

# Configure logging
logging.basicConfig(level=logging.INFO)

async def main():
    try:
        from ai.automation_engine import AutomationEngine, PlatformType
        print("Successfully imported AutomationEngine")
        
        engine = AutomationEngine()
        print("Successfully initialized AutomationEngine")
        
        # Test connector initialization
        print(f"Platform connectors keys: {len(engine.platform_connectors)}")
        
        # Try to access a connector
        connector = engine.platform_connectors.get(PlatformType.SLACK)
        print(f"Slack connector: {connector}")
        
        # Try to execute a mock action
        result = await engine._mock_platform_connector("test", "entity", {})
        print(f"Mock result: {result}")
        
    except Exception as e:
        print(f"Error: {e}")
        import traceback
        traceback.print_exc()

if __name__ == "__main__":
    asyncio.run(main())