1#ifndef YAZE_CLI_SERVICE_AI_AI_GUI_CONTROLLER_H_
2#define YAZE_CLI_SERVICE_AI_AI_GUI_CONTROLLER_H_
9#include "absl/status/status.h"
10#include "absl/status/statusor.h"
20class GuiAutomationClient;
102 absl::StatusOr<ControlResult>
ExecuteCommand(
const std::string& command);
110 const std::vector<ai::AIAction>& actions);
120 bool verify_with_vision =
true);
128 const std::string& context =
"");
150 const std::string& description);
156 const std::filesystem::path& before_screenshot,
157 const std::filesystem::path& after_screenshot);
Client for automating YAZE GUI through gRPC.
High-level controller for AI-driven GUI automation with vision feedback.
std::unique_ptr< VisionActionRefiner > vision_refiner_
absl::StatusOr< AIAction > RefineActionWithVision(const AIAction &original_action, const VisionAnalysisResult &analysis)
absl::Status ExecuteGRPCAction(const AIAction &action)
GeminiAIService * gemini_service_
absl::Status Initialize(const ControlLoopConfig &config)
Initialize the controller with configuration.
std::filesystem::path GenerateScreenshotPath(const std::string &suffix)
std::filesystem::path screenshots_dir_
absl::StatusOr< std::filesystem::path > CaptureCurrentState(const std::string &description)
absl::StatusOr< ControlResult > ExecuteActions(const std::vector< ai::AIAction > &actions)
Execute a sequence of pre-parsed actions.
absl::StatusOr< ControlResult > ExecuteCommand(const std::string &command)
Execute a natural language command with AI vision guidance.
gui::GuiActionGenerator action_generator_
absl::StatusOr< VisionAnalysisResult > ExecuteSingleAction(const AIAction &action, bool verify_with_vision=true)
Execute a single action with optional vision verification.
GuiAutomationClient * gui_client_
const ControlLoopConfig & config() const
Get the current configuration.
ControlLoopConfig config_
absl::StatusOr< VisionAnalysisResult > AnalyzeCurrentGUIState(const std::string &context="")
Analyze the current GUI state without executing actions.
~AIGUIController()=default
void EnsureScreenshotsDirectory()
void SetConfig(const ControlLoopConfig &config)
Update configuration.
absl::StatusOr< VisionAnalysisResult > VerifyActionSuccess(const AIAction &action, const std::filesystem::path &before_screenshot, const std::filesystem::path &after_screenshot)
Converts high-level AI actions into executable GUI test scripts.
Main namespace for the application.
Represents a single action to be performed in the GUI.
Configuration for the AI GUI control loop.
std::string screenshots_dir
bool enable_vision_verification
bool enable_iterative_refinement
int max_retries_per_action
Result of AI-controlled GUI automation.
std::vector< std::filesystem::path > screenshots_taken
std::vector< ai::AIAction > actions_executed
std::vector< VisionAnalysisResult > vision_analyses
std::string error_message
std::string final_state_description
Result of analyzing a screenshot with Gemini Vision.