/** * Fallback target for owner-facing Slack notifications. * * `SlackService.sendNotification` needs a channel. Installs that never set * `SLACK_DEFAULT_CHANNEL` (steamfun-ops, 2026-09-18) silently dropped every * notification — including the OKR approval nudge — with "No channel * configured". The owner has, however, already talked to the orchestrator * somewhere: each Slack conversation leaves a directory under * `~/.crewly/slack-threads//`. The most recently active one is * where the owner is, so that is where a notification without an explicit * channel goes. Direct-message channels (`D…`) win over public channels when * both were used within the same window, because a nudge is for the owner, * not the team. * * @module services/slack/slack-notification-fallback */ /** * Pick the channel the owner most recently used, from the thread store. * * @param threadsDir - Override of `~/.crewly/slack-threads` (tests) * @returns A Slack channel id, or null when the store is empty or missing * * @example * ```ts * const channel = notification.channelId ?? config.defaultChannelId ?? resolveFallbackNotificationChannel(); * ``` */ /** * Candidate channels for an owner notification, best first: DMs before * channels, most recently used first. Conversations the master bot cannot * post into are excluded via `exclude` (an agent's own DM belongs to that * agent's app; posting there as the master bot fails with channel_not_found). * * @param threadsDir - Thread store dir (default `/slack-threads`) * @param exclude - Channel ids to skip * @returns Ordered candidates (possibly empty) */ export declare function resolveFallbackNotificationChannels(threadsDir?: string, exclude?: (id: string) => boolean): string[]; export declare function resolveFallbackNotificationChannel(threadsDir?: string): string | null; //# sourceMappingURL=slack-notification-fallback.d.ts.map