pub struct AoConfig {
pub port: u16,
pub terminal_port: Option<u16>,
pub direct_terminal_port: Option<u16>,
pub ready_threshold_ms: u64,
pub poll_interval: u64,
pub power: Option<PowerConfig>,
pub defaults: Option<DefaultsConfig>,
pub projects: HashMap<String, ProjectConfig>,
pub reactions: HashMap<String, ReactionConfig>,
pub notification_routing: NotificationRouting,
pub notifiers: HashMap<String, PluginConfig>,
pub plugins: Vec<HashMap<String, Value>>,
}Expand description
Top-level ao-rs config file shape. All fields use #[serde(default)]
so partial config files parse without error.
Fields§
§port: u16Dashboard port (TS: port).
terminal_port: Option<u16>Terminal server ports (TS: terminalPort, directTerminalPort).
direct_terminal_port: Option<u16>§ready_threshold_ms: u64Milliseconds before a “ready” session becomes “idle” (TS: readyThresholdMs, default 300000).
poll_interval: u64Lifecycle polling interval in seconds (default 10).
power: Option<PowerConfig>Power management settings.
defaults: Option<DefaultsConfig>Orchestrator-wide plugin defaults.
projects: HashMap<String, ProjectConfig>Per-project configs keyed by project id.
reactions: HashMap<String, ReactionConfig>Map from reaction key (e.g. "ci-failed") to its config.
notification_routing: NotificationRoutingPriority-based notification routing table.
notifiers: HashMap<String, PluginConfig>Notifier plugin configurations (TS: notifiers).
plugins: Vec<HashMap<String, Value>>External plugins list (installer-managed). Currently stored for parity only.
Implementations§
Source§impl AoConfig
impl AoConfig
Sourcepub const CONFIG_FILENAME: &str = "ao-rs.yaml"
pub const CONFIG_FILENAME: &str = "ao-rs.yaml"
Config file name in the project directory (like TS’s agent-orchestrator.yaml).
Sourcepub fn load_from_with_warnings(path: &Path) -> Result<LoadedConfig>
pub fn load_from_with_warnings(path: &Path) -> Result<LoadedConfig>
Read and parse a config file at an explicit path, collecting warnings for unknown fields and validating the supported subset.
Sourcepub fn load_from_or_default_with_warnings(path: &Path) -> Result<LoadedConfig>
pub fn load_from_or_default_with_warnings(path: &Path) -> Result<LoadedConfig>
Read a config file at an explicit path, or return an empty config if the file doesn’t exist, collecting warnings and validating.
Sourcepub fn load_from(path: &Path) -> Result<Self>
pub fn load_from(path: &Path) -> Result<Self>
Read and parse a config file at an explicit path.
Distinct from load_default because tests should never touch
~/.ao-rs/config.yaml — they pass a tempfile instead.
Sourcepub fn load_from_or_default(path: &Path) -> Result<Self>
pub fn load_from_or_default(path: &Path) -> Result<Self>
Read a config file at an explicit path, or return an empty config if the file doesn’t exist. Any other I/O or parse error propagates.
Only NotFound short-circuits to Default::default() — a permission
denied or unreadable file should still error, since silently pretending
there’s no config would mask a real misconfiguration.
Takes an explicit path (rather than always using default_path())
so tests can exercise both branches without touching $HOME.
Sourcepub fn load_default() -> Result<Self>
pub fn load_default() -> Result<Self>
Load config from the current directory’s ao-rs.yaml, or return
an empty config if the file doesn’t exist.
Sourcepub fn local_path() -> PathBuf
pub fn local_path() -> PathBuf
Config file path discovered from the current working directory.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AoConfig
impl<'de> Deserialize<'de> for AoConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AoConfig
impl StructuralPartialEq for AoConfig
Auto Trait Implementations§
impl Freeze for AoConfig
impl RefUnwindSafe for AoConfig
impl Send for AoConfig
impl Sync for AoConfig
impl Unpin for AoConfig
impl UnsafeUnpin for AoConfig
impl UnwindSafe for AoConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.