| 1060 | /// config_source: Path to a config file (.acl), or inline config string |
| 1061 | #[staticmethod] |
| 1062 | fn create(py: Python<'_>, config_source: String) -> PyResult<Self> { |
| 1063 | let agent = py |
| 1064 | .allow_threads(move || get_runtime().block_on(RustAgent::new(config_source))) |
| 1065 | .map_err(|e| PyRuntimeError::new_err(format!("Failed to create agent: {e}")))?; |
| 1066 | |
| 1067 | Ok(Self { |
| 1068 | inner: Arc::new(agent), |
| 1069 | }) |
| 1070 | } |
| 1071 | |
| 1072 | /// Serve a filesystem-first agent directory's cron schedules until stopped. |
| 1073 | /// |