export { isAcpSessionKey, isSubkoiSessionKey, parseKoiSessionKey, type ParsedKoiSessionKey, } from "../sessions/session-key-utils.js";
export declare const DEFAULT_KOI_ID = "main";
export declare const DEFAULT_MAIN_KEY = "main";
export declare const DEFAULT_ACCOUNT_ID = "default";
export type SessionKeyShape = "missing" | "koi" | "legacy_or_alias" | "malformed_koi";
export declare function normalizeMainKey(value: string | undefined | null): string;
export declare function toKoiRequestSessionKey(storeKey: string | undefined | null): string | undefined;
export declare function toKoiStoreSessionKey(params: {
    koiId: string;
    requestKey: string | undefined | null;
    mainKey?: string | undefined;
}): string;
export declare function resolveKoiIdFromSessionKey(sessionKey: string | undefined | null): string;
export declare function classifySessionKeyShape(sessionKey: string | undefined | null): SessionKeyShape;
export declare function normalizeKoiId(value: string | undefined | null): string;
export declare function sanitizeKoiId(value: string | undefined | null): string;
export declare function normalizeAccountId(value: string | undefined | null): string;
export declare function buildKoiMainSessionKey(params: {
    koiId: string;
    mainKey?: string | undefined;
}): string;
export declare function buildKoiPeerSessionKey(params: {
    koiId: string;
    mainKey?: string | undefined;
    channel: string;
    accountId?: string | null;
    peerKind?: "dm" | "group" | "channel" | null;
    peerId?: string | null;
    identityLinks?: Record<string, string[]>;
    /** DM session scope. */
    dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
}): string;
export declare function buildGroupHistoryKey(params: {
    channel: string;
    accountId?: string | null;
    peerKind: "group" | "channel";
    peerId: string;
}): string;
export declare function resolveThreadSessionKeys(params: {
    baseSessionKey: string;
    threadId?: string | null;
    parentSessionKey?: string;
    useSuffix?: boolean;
}): {
    sessionKey: string;
    parentSessionKey?: string;
};
