feat(policy-runtime): in-memory policy state with whispergate_policy tool and atomic persist

This commit is contained in:
2026-02-26 00:35:17 +00:00
parent 682d9a336e
commit e5999743fe
5 changed files with 148 additions and 41 deletions

View File

@@ -30,6 +30,7 @@ Optional:
- `humanList` (default [])
- `agentList` (default [])
- `channelPoliciesFile` (per-channel overrides in a standalone JSON file)
- `enableWhispergatePolicyTool` (default true)
- `bypassUserIds` (deprecated alias of `humanList`)
- `endSymbols` (default ["🔚"])
- `enableDiscordControlTool` (default true)
@@ -39,6 +40,12 @@ Optional:
Per-channel policy file example: `docs/channel-policies.example.json`.
Policy file behavior:
- loaded once on startup into memory
- runtime decisions read memory state only
- direct file edits do NOT affect memory state
- `whispergate_policy` tool updates memory first, then persists to file (atomic write)
## Optional tool: `discord_control`
This plugin now registers an optional tool named `discord_control`.