config_update
config_update is implemented by handleConfigUpdate in src/api/handlers/server/config_update.osl.
Deep-merges updates into config.json. Sensitive keys cannot be written, hosted paths can be locked, and only the owner role may change top-level DB, websocket, auth_mode, or cracked. Listener changes require restart.
Access
Section titled “Access”| Gate | Requirement |
|---|---|
| Authentication | Required by the central API gate. |
| Central permission | manage_config |
| Broadcast | Not marked global directly by this adapter. A helper may emit focused or server-wide updates. |
Request
Section titled “Request”Every request includes cmd: "config_update" and may include an opaque listener correlation value.
| Field | Validation / meaning |
|---|---|
updates |
schema.record(schema.any()).minLen(1) |
Validator source
Section titled “Validator source”The handler and shared validation path use these OSL schema definitions before normalization:
*schema.Schema schemaConfigUpdate = schema.object({ updates: schema.record(schema.any()).minLen(1)})Processing path
Section titled “Processing path”handleCmdenforces authentication and themanage_configpermission.dispatchCmdroutesconfig_updatetohandleConfigUpdate.- The adapter validates and normalizes input, then calls its domain collaborators.
- Durable mutations complete before the response or event is returned.
onMessageadds the request listener to direct responses and performs any marked broadcast.
Direct collaborators visible in the handler: userFromId, configApply, auditRecord, getKeys
Responses and events
Section titled “Responses and events”Response/event command names visible in this adapter: config_update.
Validation and domain failures use:
{ "cmd": "error", "val": "<message>", "src": "config_update", "listener": "<copied from request>"}