Skip to content

Slack channel

Slack is the first workplace channel: one app install serves the whole workspace, and the daemon answers it as the single process behind the bot. Personal channels (Telegram, Matrix) are DM-shaped; Slack is workspace-shaped, so it follows the team rules: senders arrive as workspace users, a DM is that person’s own session, and a shared channel is shared context under a read-only per-channel account.

Shipped in v0.14.0. The contract text is docs/contract/rbac.md (workplace channels section).

[slack]
enabled = true
app_token_secret = "slack.app" # xapp-…, connections:write scope
bot_token_secret = "slack.bot" # xoxb-…
teams = ["T0123ABC"] # workspaces allowed to talk to this daemon
auto_provision = false # create a user for an unknown sender

Both tokens live in the secret store, never in the config. The app needs Socket Mode enabled with the connections:write app-level token.

Why Socket Mode: the daemon opens one outbound WebSocket (apps.connections.open returns a short-lived WSS URL) and reconnects when Slack closes it. No public inbound endpoint beyond the web panel you may already publish, and every inbound frame is acknowledged before it is dispatched (events_api messages, interactive button presses, slash_commands, disconnect).

  • A DM is the person’s own private session (source slack:<team>:<user>): their memory, workspace, toolset, quota and audit stamp, exactly like a Telegram DM.
  • A shared channel answers only on an @mention, and the turn runs as a per-channel account (slack-<team>-<channel>) holding channels.shared_channel_role: its own partition, no personal memory, notes or grants. The default channel role is read-only and grants nothing, so a shared surface can never write as one of its members.
  • The workspace allowlist gates everything: an unknown team id is ignored with one slack.unauthorized_workspace audit row.
  • auto_provision = true creates a user (named after the Slack handle, role channels.default_role, default member) for an unknown sender in an allowed workspace; the default refuses them.

Replies go to the conversation the message came from, threaded for mentions. Outbound sends share the rate limiter: Slack’s Retry-After header sets when the next call may go out, so a burst waits instead of hammering the API.

An ask renders as a Block Kit message with Allow / Deny buttons and its expiry. The decision is authorized server-side: the person the turn belongs to decides when it is in their self-scope, an escalation card goes to the admins, and a click by anyone else is refused with an audit row. The card states it: only the person this turn belongs to (or an admin) can decide. See approvals for routing and re-authorization at execute time.

Files work in both directions: documents the agent sends arrive as Slack files, and files posted to a DM or a mention thread land in the caller’s workspace attachments with an @reference. Before a reply is posted to a shared channel, its provenance is re-checked against the channel account’s groups, and a miss blocks the post.