import { type RoutingContext } from '../im/lark/event-dispatcher.js'; import { type Locale } from '../i18n/index.js'; /** Truncated placeholder chat name from the user's message text (T0 of the * two-phase naming; the async AI title replaces it seconds later). */ export declare function buildPlaceholderName(text: string | null, prefix: string, locale: Locale): string; /** * Does this inbound message decline session-group birth because it is a slash * command? Exported so the CALLER can ask BEFORE it charges message quota. * * A command (`/help`, `/login`, `/close`, …) never reaches a CLI, so it must * neither spend a quota unit nor be blocked by an exhausted one — but the * pre-birth charge has to run before the real Feishu chat is created (a quota * denial must have zero external side effects), i.e. long before the router's * own slash parsing. Hoisting THIS predicate is what keeps both invariants. * * Single source of truth on purpose: the caller's "skip the charge" decision and * this function's "don't birth" decision have to be the SAME decision. A caller * predicate NARROWER than this one re-opens the charge-a-command bug; a WIDER * one silently stops births for messages this function would still birth. Both * sides must call this. * * Leading @mentions are stripped FIRST, with the same helper and the same * mention list the router later uses to build `cmdContent`. Without that step * this predicate and the router disagree about the exact same message: Lark * delivers "@Bot /help" as text "@_user_1 /help" (resolved to "@Bot /help"), * which does not start with "/" here — so the message was charged a quota unit * AND birthed a group — while the router, reading the mention-stripped text, * still routed it as /help and never reached a CLI. That is a pure quota loss * on the most natural way to type a command at a bot. */ export declare function declinesSessionGroupBirthAsSlashCommand(data: any): boolean; export declare function maybeBirthSessionGroup(data: any, ctx: RoutingContext): Promise; //# sourceMappingURL=session-group-birth.d.ts.map