import type { ChatMetadata } from "../transport/types.js"; /** 一次隔离工作流。非话题群时 threadId 为空,scopeKey === chatId。 */ export interface SessionScope { chatId: string; platformChatId: string; threadId?: string; scopeKey: string; isolated: boolean; /** 话题群/话题形式群即使关掉隔离,也禁止 create 新话题。 */ strict: boolean; } export declare const CHAT_MODE_TTL_MS: number; /** 话题形式群与话题群同等隔离(D11)。整机 kill-switch 仍是 NIUBOT_TOPIC_ISOLATION=0。 */ export declare const ISOLATE_TOPIC_FORM_GROUPS = true; export declare function buildScopeKey(chatId: string, threadId?: string): string; export declare function parseScopeKey(key: string): { chatId: string; threadId?: string; }; export declare function shouldIsolateChat(meta: Pick): boolean; export declare function shouldStrictTopicReply(meta: Pick): boolean; export declare function resolveSessionScope(input: { chatId: string; platformChatId: string; chatType: "p2p" | "group"; chatMode?: string | null; groupMessageType?: string | null; threadId?: string; }): SessionScope; export declare function scopeForMessage(scopeKey: string, platformChatId: string): SessionScope;