/**
 * Shared eligibility check for the fast responder.
 *
 * A message is "fast-response eligible" if there is a reply-capable channel
 * adapter on the other end. Used by both:
 *   - InterruptHandler: filtering which messages to send fast replies for
 *   - ReplyWatchdog:    deciding whether to arm the watchdog timer at all
 *
 * Keeping this in one place ensures the two call sites can't drift apart
 * (e.g. the watchdog firing for monitor-only wakes when fireWatchdog will
 * just no-op on the same predicate).
 */
import { EXTERNAL_WAKE_KIND } from "../channels/queue.js";
export function isFastResponseEligible(message) {
    // Internal system messages have no real channel adapter — skip them.
    if (message.channel === "system")
        return false;
    // Gmail is asynchronous and threaded — fast replies don't fit the model.
    if (message.channel === "gmail")
        return false;
    // Chat-monitor wake messages are local triggers, not reply-capable channels
    // (e.g. "feishu-monitor", "wechat-monitor" — no adapter is registered).
    if (message.meta?.kind === EXTERNAL_WAKE_KIND)
        return false;
    // Telegram group/supergroup chats: avoid auto-replying in shared rooms.
    if (message.channel === "telegram") {
        const chatType = message.meta?.chatType;
        if (chatType === "group" || chatType === "supergroup")
            return false;
    }
    return true;
}
//# sourceMappingURL=fast-response-eligibility.js.map