refactor: centralize channel DM access resolution

This commit is contained in:
Peter Steinberger
2026-04-29 15:05:15 +01:00
parent 606c881d27
commit 8c68e7535f
46 changed files with 380 additions and 346 deletions

View File

@@ -472,6 +472,8 @@ should use `resolveInboundMentionDecision({ facts, policy })`.
});
```
For channels that accept both canonical top-level DM keys and legacy nested keys, use the helpers from `plugin-sdk/channel-config-helpers`: `resolveChannelDmAccess`, `resolveChannelDmPolicy`, `resolveChannelDmAllowFrom`, and `normalizeChannelDmPolicy` keep account-local values ahead of inherited root values. Pair the same resolver with doctor repair through `normalizeLegacyDmAliases` so runtime and migration read the same contract.
<Accordion title="What createChatChannelPlugin does for you">
Instead of implementing low-level adapter interfaces manually, you pass
declarative options and the builder composes them: