import type { App } from "@slack/bolt"; import type { HistoryEntry } from "../../auto-reply/reply/history.js"; import type { BotConfig, SlackReactionNotificationMode } from "../../config/config.js"; import type { DmPolicy, GroupPolicy } from "../../config/types.js"; import type { RuntimeEnv } from "../../runtime.js"; import type { SlackMessageEvent } from "../types.js"; import type { SlackChannelConfigEntries } from "./channel-config.js"; import { type SessionScope } from "../../config/sessions.js"; import { getChildLogger } from "../../logging.js"; export { inferSlackChannelType, normalizeSlackChannelType } from "./channel-type.js"; export type SlackMonitorContext = { cfg: BotConfig; accountId: string; botToken: string; app: App; runtime: RuntimeEnv; botUserId: string; teamId: string; apiAppId: string; historyLimit: number; channelHistories: Map; sessionScope: SessionScope; mainKey: string; dmEnabled: boolean; dmPolicy: DmPolicy; allowFrom: string[]; allowNameMatching: boolean; groupDmEnabled: boolean; groupDmChannels: string[]; defaultRequireMention: boolean; channelsConfig?: SlackChannelConfigEntries; channelsConfigKeys: string[]; groupPolicy: GroupPolicy; useAccessGroups: boolean; reactionMode: SlackReactionNotificationMode; reactionAllowlist: Array; replyToMode: "off" | "first" | "all"; threadHistoryScope: "thread" | "channel"; threadInheritParent: boolean; slashCommand: Required; textLimit: number; ackReactionScope: string; typingReaction: string; mediaMaxBytes: number; removeAckAfterReply: boolean; logger: ReturnType; markMessageSeen: (channelId: string | undefined, ts?: string) => boolean; shouldDropMismatchedSlackEvent: (body: unknown) => boolean; resolveSlackSystemEventSessionKey: (params: { channelId?: string | null; channelType?: string | null; senderId?: string | null; }) => string; isChannelAllowed: (params: { channelId?: string; channelName?: string; channelType?: SlackMessageEvent["channel_type"]; }) => boolean; resolveChannelName: (channelId: string) => Promise<{ name?: string; type?: SlackMessageEvent["channel_type"]; topic?: string; purpose?: string; }>; resolveUserName: (userId: string) => Promise<{ name?: string; }>; setSlackThreadStatus: (params: { channelId: string; threadTs?: string; status: string; }) => Promise; }; export declare function createSlackMonitorContext(params: { cfg: BotConfig; accountId: string; botToken: string; app: App; runtime: RuntimeEnv; botUserId: string; teamId: string; apiAppId: string; historyLimit: number; sessionScope: SessionScope; mainKey: string; dmEnabled: boolean; dmPolicy: DmPolicy; allowFrom: Array | undefined; allowNameMatching: boolean; groupDmEnabled: boolean; groupDmChannels: Array | undefined; defaultRequireMention?: boolean; channelsConfig?: SlackMonitorContext["channelsConfig"]; groupPolicy: SlackMonitorContext["groupPolicy"]; useAccessGroups: boolean; reactionMode: SlackReactionNotificationMode; reactionAllowlist: Array; replyToMode: SlackMonitorContext["replyToMode"]; threadHistoryScope: SlackMonitorContext["threadHistoryScope"]; threadInheritParent: SlackMonitorContext["threadInheritParent"]; slashCommand: SlackMonitorContext["slashCommand"]; textLimit: number; ackReactionScope: string; typingReaction: string; mediaMaxBytes: number; removeAckAfterReply: boolean; }): SlackMonitorContext;