Conversation
| const DEFAULT_REQUIREMENTS_TOML_FILE_UNIX: &str = "/etc/codex/requirements.toml"; | ||
|
|
||
| /// On Unix systems, load default settings from this file path, if present. | ||
| /// Note that /etc/config/ is treated as a "config folder," so subfolders such |
There was a problem hiding this comment.
| /// Note that /etc/config/ is treated as a "config folder," so subfolders such | |
| /// Note that /etc/codex/ is treated as a "config folder," so subfolders such |
| // TODO(gt): Determine the path to load on Windows. | ||
| None |
There was a problem hiding this comment.
https://crates.io/crates/directories solves this generically (though it chooses the macOS Library folders there, so it's not quite what we want) - the crate page has the right folder paths for windows folders however.
| Err(io::Error::new( | ||
| e.kind(), | ||
| format!( | ||
| "Failed to read user config file {}: {e}", |
There was a problem hiding this comment.
| "Failed to read user config file {}: {e}", | |
| "Failed to read config file {}: {e}", |
| io::Error::new( | ||
| io::ErrorKind::InvalidData, | ||
| format!( | ||
| "Error parsing user config file {}: {e}", |
There was a problem hiding this comment.
| "Error parsing user config file {}: {e}", | |
| "Error parsing config file {}: {e}", |
| io::Error::new( | ||
| io::ErrorKind::InvalidData, | ||
| format!( | ||
| "User config file {} has no parent directory", |
There was a problem hiding this comment.
| "User config file {} has no parent directory", | |
| "Config file {} has no parent directory", |
|
For skills we call this "ADMIN" scope, might need to align on the terminology here. |
| /// On Unix systems, load default settings from this file path, if present. | ||
| /// Note that /etc/codex/ is treated as a "config folder," so subfolders such | ||
| /// as skills/ and rules/ will also be honored. | ||
| pub const SYSTEM_CONFIG_TOML_FILE_UNIX: &str = "/etc/codex/config.toml"; |
There was a problem hiding this comment.
This should be admin to conform to https://developers.openai.com/codex/skills . I understand the motivations for system and how it makes sense as config that is system-wide, but we can't have different definitions for different features and it may make sense to stick with admin as a label from a product buckets perspective. The label is also an easier to change in code later even if we decide to perform the heavy lifting of changing skill scope names (which are now proliferated on developer documentation and social media posts/videos), so I suggest sticking with admin for now.
This adds logic to load
/etc/codex/config.tomland associate it withConfigLayerSource::Systemon UNIX. I refactored the code so it shares logic with the creation of theConfigLayerSource::Userlayer.