use std::sync::Arc;
use super::blackbox::{AgentAction, AgentActionReply, AgentWidget};
use super::command::{Command, CommandReply};
use super::log::AgentLogEntry;
use super::snapshot::{AgentSnapshot, WidgetSnapshot};
use serde_json::Value;
pub trait AgentControl: Send + Sync + 'static {
fn snapshot(&self) -> AgentSnapshot;
fn widgets(&self) -> Vec<WidgetSnapshot>;
fn dispatch(&self, cmd: Command) -> CommandReply;
fn screenshot_png(&self, _window: &str) -> Option<Vec<u8>> {
None
}
fn log_since(&self, _since: u64, _limit: usize) -> Vec<AgentLogEntry> {
Vec::new()
}
fn log_tail(&self, _n: usize) -> Vec<AgentLogEntry> {
Vec::new()
}
fn blackbox_slots(&self) -> Vec<String> { Vec::new() }
fn blackbox_widgets(&self, _slot_id: &str) -> Option<Vec<AgentWidget>> { None }
fn blackbox_state(&self, _slot_id: &str) -> Option<Value> { None }
fn blackbox_action(&self, _slot_id: &str, _action: AgentAction) -> Option<AgentActionReply> {
None
}
fn blackbox_click_widget(&self, _slot_id: &str, _sub_id: &str) -> Option<CommandReply> {
None
}
}
pub type AgentControlObj = Arc<dyn AgentControl>;