<?php
// 直接测试 ManagerAgent 的自动化方法
require_once 'api/agent_manager.php';

echo "=== 测试自动化统计 ===\n";
$agent = new ManagerAgent();
$result = $agent->getAutoStats();
echo json_encode($result, JSON_UNESCAPED_UNICODE) . "\n\n";

echo "=== 测试智能任务分配 ===\n";
$result2 = $agent->autoAssignTask('检查音响设备和麦克风', '12:00', 'high');
echo json_encode($result2, JSON_UNESCAPED_UNICODE) . "\n\n";

echo "=== 测试启动自动模式 ===\n";
$result3 = $agent->startAutoMode();
echo json_encode($result3, JSON_UNESCAPED_UNICODE) . "\n\n";

echo "=== 测试自动化处理 ===\n";
$result4 = $agent->processAutoTasks();
echo json_encode($result4, JSON_UNESCAPED_UNICODE) . "\n\n";

echo "=== 再次测试自动化统计 ===\n";
$result5 = $agent->getAutoStats();
echo json_encode($result5, JSON_UNESCAPED_UNICODE) . "\n\n";

echo "=== 测试暂停自动模式 ===\n";
$result6 = $agent->pauseAutoMode();
echo json_encode($result6, JSON_UNESCAPED_UNICODE) . "\n";
?>