refactor: centralize inbound mention policy

This commit is contained in:
Peter Steinberger
2026-04-07 07:50:09 +01:00
parent c8b7058058
commit 625fd5b3e3
31 changed files with 857 additions and 225 deletions

View File

@@ -26,13 +26,24 @@ export {
shouldDebounceTextInbound,
} from "../channels/inbound-debounce-policy.js";
export type {
InboundMentionFacts,
InboundMentionPolicy,
InboundImplicitMentionKind,
InboundMentionDecision,
MentionGateParams,
MentionGateResult,
MentionGateWithBypassParams,
MentionGateWithBypassResult,
ResolveInboundMentionDecisionFlatParams,
ResolveInboundMentionDecisionNestedParams,
ResolveInboundMentionDecisionParams,
} from "../channels/mention-gating.js";
export {
implicitMentionKindWhen,
resolveInboundMentionDecision,
// @deprecated Prefer `resolveInboundMentionDecision({ facts, policy })`.
resolveMentionGating,
// @deprecated Prefer `resolveInboundMentionDecision({ facts, policy })`.
resolveMentionGatingWithBypass,
} from "../channels/mention-gating.js";
export type { NormalizedLocation } from "../channels/location.js";

View File

@@ -11,7 +11,11 @@ export {
readReactionParams,
readStringParam,
} from "../agents/tools/common.js";
export { resolveMentionGatingWithBypass } from "../channels/mention-gating.js";
export {
resolveMentionGating,
resolveMentionGatingWithBypass,
resolveInboundMentionDecision,
} from "../channels/mention-gating.js";
export {
deleteAccountFromConfigSection,
setAccountEnabledInConfigSection,

View File

@@ -19,7 +19,11 @@ export {
resolveDualTextControlCommandGate,
} from "../channels/command-gating.js";
export { logInboundDrop, logTypingFailure } from "../channels/logging.js";
export { resolveMentionGating } from "../channels/mention-gating.js";
export {
resolveInboundMentionDecision,
resolveMentionGating,
resolveMentionGatingWithBypass,
} from "../channels/mention-gating.js";
export type { AllowlistMatch } from "../channels/plugins/allowlist-match.js";
export {
formatAllowlistMatchMeta,

View File

@@ -3,7 +3,11 @@
export { logInboundDrop } from "../channels/logging.js";
export { createAuthRateLimiter } from "../gateway/auth-rate-limit.js";
export { resolveMentionGatingWithBypass } from "../channels/mention-gating.js";
export {
resolveMentionGating,
resolveMentionGatingWithBypass,
resolveInboundMentionDecision,
} from "../channels/mention-gating.js";
export type { AllowlistMatch } from "../channels/plugins/allowlist-match.js";
export {
buildChannelKeyCandidates,

View File

@@ -5,7 +5,11 @@ import { createOptionalChannelSetupSurface } from "./channel-setup.js";
export type { ReplyPayload } from "../auto-reply/types.js";
export { mergeAllowlist, summarizeMapping } from "../channels/allowlists/resolve-utils.js";
export { resolveMentionGatingWithBypass } from "../channels/mention-gating.js";
export {
resolveMentionGating,
resolveMentionGatingWithBypass,
resolveInboundMentionDecision,
} from "../channels/mention-gating.js";
export {
deleteAccountFromConfigSection,
setAccountEnabledInConfigSection,