Skip to content

Access And Approvals

Gateway has two separate safety layers: which external messages may enter DuckAgent, and who can approve risky actions after a message has entered.

Common channel fields include:

FieldPurpose
allowed_usersSender ids that may use the channel.
allowed_chatsGroup, room, channel, topic, or conversation ids that may route to DuckAgent.
dm_accessDirect-message access mode.
group_accessGroup or channel access mode.
require_mentionRequire a mention or wake pattern in noisy rooms.
pairingRequire owner approval before unknown users can chat.
ModeMeaning
openReachable DM users can enter DuckAgent.
allowlistOnly allowed_users can enter.
pairingUnknown DM users receive a one-time pairing code that must be approved.
disabledDMs do not enter DuckAgent.

Publicly reachable channels should prefer pairing or allowlist.

ModeMeaning
mentionMessages require a bot mention or wake pattern.
openGroup messages enter by default.
allowlistOnly allowed_chats can enter.
disabledGroup messages do not enter DuckAgent.

Mention gating reduces noise. It is not a security boundary by itself.

When a tool needs approval, Gateway prefers native buttons, cards, or interaction callbacks. If a platform cannot provide that, users can send text commands:

/approve
/approve all
/approve <approval-id>
/deny
/deny all
/deny <approval-id>

If the current chat has pending approvals and the user sends a normal new message, DuckAgent denies the pending approvals for that route before treating the message as new input.

Channel adapters translate platform-specific interactions into these shared approval commands. Gateway core owns matching, state updates, and policy decisions.