feat(policy-file): move channel overrides to standalone channelPoliciesFile with hot reload

This commit is contained in:
2026-02-26 00:28:34 +00:00
parent d6f908b813
commit 682d9a336e
8 changed files with 79 additions and 39 deletions

View File

@@ -13,13 +13,7 @@
"humanList": ["561921120408698910"],
"agentList": [],
"endSymbols": ["🔚"],
"channelPolicies": {
"1476369680632647721": {
"listMode": "agent-list",
"agentList": ["1474088632750047324"],
"endSymbols": ["🔚"]
}
},
"channelPoliciesFile": "~/.openclaw/whispergate-channel-policies.json",
"noReplyProvider": "whisper-gateway",
"noReplyModel": "no-reply",
"enableDiscordControlTool": true,

View File

@@ -54,7 +54,8 @@ Environment overrides:
- `LIST_MODE` (`human-list` or `agent-list`)
- `HUMAN_LIST_JSON`
- `AGENT_LIST_JSON`
- `CHANNEL_POLICIES_JSON`
- `CHANNEL_POLICIES_FILE` (standalone channel policy file path)
- `CHANNEL_POLICIES_JSON` (only used to initialize file when missing)
- `END_SYMBOLS_JSON`
The script:

View File

@@ -0,0 +1,12 @@
{
"1476369680632647721": {
"listMode": "agent-list",
"agentList": ["1474088632750047324"],
"endSymbols": ["🔚"]
},
"another-channel-id": {
"listMode": "human-list",
"humanList": ["561921120408698910"],
"endSymbols": ["🔚"]
}
}