/** * Slack bridge configuration. Reads tokens + policy from env (mirroring the * omp env-config pattern), with optional overrides for tests/flags. * * Tokens (both required): * - SLACK_BOT_TOKEN (xoxb-…) — bot user OAuth token * - SLACK_APP_TOKEN (xapp-…) — app-level token with `connections:write` (Socket Mode) * * Policy (required): * - SLACK_ALLOWED_USERS csv of user IDs; `*` = explicit allow everyone opt-in * - SLACK_REQUIRE_MENTION "true"/"false" (default true) — require @mention in channels * - COPILOT_TMUX_SESSION passthrough to comms session resolution */ export interface SlackConfig { botToken: string; appToken: string; /** Non-empty; ["*"] means explicit allow all. */ allowedUsers: string[]; /** require an @mention to respond in channels (DMs always respond). */ requireMention: boolean; /** explicit Copilot tmux session name, if set. */ sessionEnv?: string; } export interface SlackConfigOverrides { botToken?: string; appToken?: string; } export declare const SLACK_ALLOWED_USERS_REQUIRED_MESSAGE = "SLACK_ALLOWED_USERS is required. Set it to a comma-separated Slack user ID allowlist, or set SLACK_ALLOWED_USERS=* to explicitly allow all Slack users."; export declare function ensureSlackAllowedUsersConfigured(allowedUsers: readonly string[]): void; export declare function isSlackAllowAll(allowedUsers: readonly string[]): boolean; /** * Load + validate Slack config. Throws a clear error if a token is missing. * `env` defaults to process.env; tests can pass a custom map. */ export declare function loadSlackConfig(overrides?: SlackConfigOverrides, env?: NodeJS.ProcessEnv): SlackConfig;