feat(debug): add whispergate hook diagnostics with channel-scoped debug logs

This commit is contained in:
2026-02-26 01:58:01 +00:00
parent 46ea43b3fe
commit 51149dd6a0
4 changed files with 81 additions and 4 deletions

View File

@@ -42,6 +42,8 @@ Unified optional tool:
- `discordControlApiBaseUrl` (default `http://127.0.0.1:8790`)
- `discordControlApiToken`
- `discordControlCallerId`
- `enableDebugLogs` (default false)
- `debugLogChannelIds` (default [], empty = all channels when debug enabled)
Per-channel policy file example: `docs/channel-policies.example.json`.
@@ -61,3 +63,8 @@ To use it, add tool allowlist entry for either:
Supported actions:
- Discord: `channel-private-create`, `channel-private-update`, `member-list`
- Policy: `policy-get`, `policy-set-channel`, `policy-delete-channel`
Debug logging:
- set `enableDebugLogs: true` to emit detailed hook diagnostics
- optionally set `debugLogChannelIds` to only log selected channel IDs
- logs include key ctx fields + decision status at `message_received`, `before_model_resolve`, `before_prompt_build`