You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c39abce
Browse filesBrowse the repository at this point in the historyBrowse files
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.
872
872
873
+
If a channel intentionally applies stricter DM session routing than the
874
+
global config, expose that behavior through `security.dmRouting` so Doctor
875
+
and security audit resolve the same session owner as runtime. The optional
876
+
`resolveDmScope` callback runs before core route resolution; its context
877
+
includes `cfg`, `accountId`, the resolved `account`, and a `principalId`
878
+
for finite allowlist entries. `resolveDmRoute` receives those fields plus
879
+
the resolved core `route`; it may return `{ sessionKey }` for a shared final
880
+
bucket, `{ kind: "isolated" }` for an unknown peer, or `{ kind: "core" }`
881
+
to preserve core `dmScope` namespace analysis. For wildcard/open policy,
882
+
`principalId` is absent and an undefined result is reported as unverified.
883
+
Diagnostics never invent a peer ID. Keep both callbacks pure and
884
+
import-safe because read-only diagnostics run without channel runtime.
885
+
873
886
<Accordion title="What createChatChannelPlugin does for you">
874
887
Instead of implementing low-level adapter interfaces manually, you pass
875
888
declarative options and the builder composes them:
0 commit comments