refactor more

This commit is contained in:
Adil Hafeez 2026-03-12 13:54:23 -07:00
parent 8c71acfc76
commit efa677683a
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
5 changed files with 61 additions and 41 deletions

View file

@ -36,15 +36,23 @@ pub struct AgentFilterChain {
pub filter_chain: Option<Vec<String>>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "lowercase")]
pub enum ListenerType {
Model,
Agent,
Prompt,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Listener {
#[serde(rename = "type")]
pub listener_type: ListenerType,
pub name: String,
pub router: Option<String>,
pub agents: Option<Vec<AgentFilterChain>>,
pub filter_chain: Option<Vec<String>>,
pub port: u16,
#[serde(skip)]
pub filter_agents: Option<HashMap<String, Agent>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]