export declare function loadOncallChatsByApp(botsJsonPath?: string): Map<string, Set<string>>;
export declare function pickBotEntryByName<T extends {
    larkAppId: string;
    botName: string | null;
}>(botEntries: T[], name: string, targetChatId: string | undefined, oncallChatsByApp: Map<string, Set<string>>): T | undefined;
export type BotMentionEntry = {
    larkAppId: string;
    botOpenId?: string | null;
    botName: string | null;
    cliId?: string | null;
};
export type OutgoingMention = {
    open_id: string;
    name?: string;
};
export declare function knownBotOpenIdsFromCrossRef(crossRef: Record<string, string>, entries?: BotMentionEntry[], selfAppId?: string): Set<string>;
export declare function hasKnownBotMention(_text: string, mentions: OutgoingMention[], entries: BotMentionEntry[], crossRef: Record<string, string>, selfAppId?: string): boolean;
/**
 * Decide who a botmux-generated reply should @ in the footer.
 *
 * The footer is an implicit convenience for human readers. It must not wake a
 * bot: bot-to-bot routing should be explicit in the message body/--mention.
 * When the body already contains an explicit bot target, keep the footer on a
 * human owner if one exists; only bot recipients are suppressed.
 */
export declare function buildFooterAddressing(s: {
    ownerOpenId?: string;
    lastCallerOpenId?: string;
}, opts: {
    isOncall: boolean;
    hasExplicitBotMention?: boolean;
    knownBotOpenIds?: Set<string>;
}): {
    sendTo: string | undefined;
    cc: string[];
};
/**
 * Ordered, de-duplicated @ recipients for the footer `发送给：` line.
 *
 * All real mentions (the human addressee + explicit mention targets + cc) are
 * consolidated onto one footer line instead of dangling a trailing @ block at
 * the bottom of the card body. The human addressee (`sendTo`) goes first, then
 * explicit mention targets (which may include sibling bots for a handoff), then
 * cc. Ids already rendered inline inside the body prose (`inlinedIds`) are
 * skipped so the same person isn't @-ed twice.
 *
 * Placement only — these were already real Lark mentions wherever they sat, so
 * notification / cross-bot wake behaviour is unchanged.
 */
export declare function orderedFooterRecipients(opts: {
    sendTo?: string;
    mentionIds?: string[];
    cc?: string[];
    inlinedIds?: Iterable<string>;
}): string[];
//# sourceMappingURL=bot-routing.d.ts.map