| 1 | pub mod acp; |
| 2 | pub mod cli_agent; |
| 3 | |
| 4 | pub fn valid_agent_id(id: &str) -> bool { |
| 5 | !id.is_empty() |
| 6 | && id.len() <= 64 |
| 7 | && id |
| 8 | .chars() |
| 9 | .all(|ch| ch.is_ascii_alphanumeric() || matches!(ch, '-' | '_')) |
| 10 | } |
| 11 | |
| 12 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 13 | pub enum DirectCliKind { |
| 14 | Antigravity, |
| 15 | Claude, |
| 16 | Codex, |
| 17 | Grok, |
| 18 | Generic, |
| 19 | } |
| 20 | |
| 21 | pub struct AgentIo { |
| 22 | pub stdin: std::process::ChildStdin, |
| 23 | pub stdout: std::io::BufReader<std::process::ChildStdout>, |
| 24 | } |
| 25 | |
| 26 | impl std::fmt::Debug for AgentIo { |
| 27 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 28 | f.debug_struct("AgentIo").finish_non_exhaustive() |
| 29 | } |
| 30 | } |
| 31 |