refactor(coding-agent): improve settings storage semantics and error handling
This commit is contained in:
@@ -700,6 +700,13 @@ Settings load from two locations and merge:
|
||||
|
||||
Project overrides global. Nested objects merge keys. Setters modify global settings by default.
|
||||
|
||||
**Persistence and error handling semantics:**
|
||||
|
||||
- Settings getters/setters are synchronous for in-memory state.
|
||||
- Setters enqueue persistence writes asynchronously.
|
||||
- Call `await settingsManager.flush()` when you need a durability boundary (for example, before process exit or before asserting file contents in tests).
|
||||
- `SettingsManager` does not print settings I/O errors. Use `settingsManager.drainErrors()` and report them in your app layer.
|
||||
|
||||
> See [examples/sdk/10-settings.ts](../examples/sdk/10-settings.ts)
|
||||
|
||||
## ResourceLoader
|
||||
|
||||
Reference in New Issue
Block a user