mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:50:42 +00:00
fix(config): write through single-file includes
This commit is contained in:
@@ -3903,6 +3903,8 @@ Split config into multiple files:
|
||||
- Sibling keys: merged after includes (override included values).
|
||||
- Nested includes: up to 10 levels deep.
|
||||
- Paths: resolved relative to the including file, but must stay inside the top-level config directory (`dirname` of `openclaw.json`). Absolute/`../` forms are allowed only when they still resolve inside that boundary.
|
||||
- OpenClaw-owned writes that change only one top-level section backed by a single-file include write through to that included file. For example, `plugins install` updates `plugins: { $include: "./plugins.json5" }` in `plugins.json5` and leaves `openclaw.json` intact.
|
||||
- Root includes, include arrays, and includes with sibling overrides are read-only for OpenClaw-owned writes; those writes fail closed instead of flattening the config.
|
||||
- Errors: clear messages for missing files, parse errors, and circular includes.
|
||||
|
||||
---
|
||||
|
||||
@@ -508,6 +508,12 @@ placeholders such as `***` or shortened token values.
|
||||
- **Sibling keys**: merged after includes (override included values)
|
||||
- **Nested includes**: supported up to 10 levels deep
|
||||
- **Relative paths**: resolved relative to the including file
|
||||
- **OpenClaw-owned writes**: when a write changes only one top-level section
|
||||
backed by a single-file include such as `plugins: { $include: "./plugins.json5" }`,
|
||||
OpenClaw updates that included file and leaves `openclaw.json` intact
|
||||
- **Unsupported write-through**: root includes, include arrays, and includes
|
||||
with sibling overrides fail closed for OpenClaw-owned writes instead of
|
||||
flattening the config
|
||||
- **Error handling**: clear errors for missing files, parse errors, and circular includes
|
||||
|
||||
</Accordion>
|
||||
|
||||
Reference in New Issue
Block a user