use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(tag = "type", rename_all = "snake_case")]
pub enum HandoffAction {
Request { agent: String },
Activate { agent: String },
Clear,
}
pub fn request_handoff(agent: impl Into<String>) -> HandoffAction {
HandoffAction::Request {
agent: agent.into(),
}
}
pub fn activate_handoff(agent: impl Into<String>) -> HandoffAction {
HandoffAction::Activate {
agent: agent.into(),
}
}
pub fn clear_handoff() -> HandoffAction {
HandoffAction::Clear
}