config: add override config foundation

# Conflicts:
#	codex-rs/config/src/loader/mod.rs
This commit is contained in:
Brent Traut
2026-05-19 13:29:23 -07:00
parent 5c43a64e2b
commit ed68380a48
27 changed files with 1814 additions and 125 deletions
@@ -7443,6 +7443,27 @@
"title": "SystemConfigLayerSource",
"type": "object"
},
{
"description": "System override layer from a sibling `config.override.toml`.",
"properties": {
"file": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": {
"enum": [
"systemOverride"
],
"title": "SystemOverrideConfigLayerSourceType",
"type": "string"
}
},
"required": [
"file",
"type"
],
"title": "SystemOverrideConfigLayerSource",
"type": "object"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"properties": {
@@ -7476,6 +7497,27 @@
"title": "UserConfigLayerSource",
"type": "object"
},
{
"description": "User override layer from `$CODEX_HOME/config.override.toml`.",
"properties": {
"file": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": {
"enum": [
"userOverride"
],
"title": "UserOverrideConfigLayerSourceType",
"type": "string"
}
},
"required": [
"file",
"type"
],
"title": "UserOverrideConfigLayerSource",
"type": "object"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"properties": {
@@ -7497,6 +7539,27 @@
"title": "ProjectConfigLayerSource",
"type": "object"
},
{
"description": "Project override layer from a sibling `.codex/config.override.toml`.",
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": {
"enum": [
"projectOverride"
],
"title": "ProjectOverrideConfigLayerSourceType",
"type": "string"
}
},
"required": [
"dotCodexFolder",
"type"
],
"title": "ProjectOverrideConfigLayerSource",
"type": "object"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"properties": {
@@ -7591,6 +7654,12 @@
"$ref": "#/definitions/v2/ConfigLayerMetadata"
},
"type": "object"
},
"userConfigVersion": {
"type": [
"string",
"null"
]
}
},
"required": [