(
agent: Option<&str>,
project_root: &Option<String>,
)
| 78 | } |
| 79 | |
| 80 | pub(crate) fn validate_hermes_project_root_flag( |
| 81 | agent: Option<&str>, |
| 82 | project_root: &Option<String>, |
| 83 | ) -> tracedecay::errors::Result<Option<PathBuf>> { |
| 84 | let Some(project_root) = project_root else { |
| 85 | return Ok(None); |
| 86 | }; |
| 87 | if agent != Some("hermes") { |
| 88 | return Err(tracedecay::errors::TraceDecayError::Config { |
| 89 | message: "`--project-root` is only supported with `--agent hermes`".to_string(), |
| 90 | }); |
| 91 | } |
| 92 | let path = PathBuf::from(project_root); |
| 93 | if !path.is_absolute() { |
| 94 | return Err(tracedecay::errors::TraceDecayError::Config { |
| 95 | message: format!("`--project-root` must be an absolute path, got '{project_root}'"), |
| 96 | }); |
| 97 | } |
| 98 | Ok(Some(path)) |
| 99 | } |
| 100 | |
| 101 | /// How `install --agent codex --automation` should configure the daemon loop. |
| 102 | #[derive(Debug, Clone, Copy)] |
no outgoing calls