import type { ChatType } from "../channels/chat-type.js";
export { getSubagentDepth, isCronSessionKey, isAcpSessionKey, isSubagentSessionKey, parseAgentSessionKey, type ParsedAgentSessionKey, } from "../sessions/session-key-utils.js";
export declare const DEFAULT_AGENT_ID = "main";
export declare const DEFAULT_MAIN_KEY = "main";
export declare const DEFAULT_ACCOUNT_ID = "default";
export type SessionKeyShape = "missing" | "agent" | "legacy_or_alias" | "malformed_agent";
export declare function normalizeMainKey(value: string | undefined | null): string;
export declare function toAgentRequestSessionKey(storeKey: string | undefined | null): string | undefined;
export declare function toAgentStoreSessionKey(params: {
    agentId: string;
    requestKey: string | undefined | null;
    mainKey?: string | undefined;
}): string;
export declare function resolveAgentIdFromSessionKey(sessionKey: string | undefined | null): string;
export declare function classifySessionKeyShape(sessionKey: string | undefined | null): SessionKeyShape;
export declare function normalizeAgentId(value: string | undefined | null): string;
export declare function sanitizeAgentId(value: string | undefined | null): string;
export declare function normalizeAccountId(value: string | undefined | null): string;
export declare function buildAgentMainSessionKey(params: {
    agentId: string;
    mainKey?: string | undefined;
}): string;
export declare function buildAgentPeerSessionKey(params: {
    agentId: string;
    mainKey?: string | undefined;
    channel: string;
    accountId?: string | null;
    peerKind?: ChatType | null;
    peerId?: string | null;
    identityLinks?: Record<string, string[]>;
    /** DM session scope. */
    dmScope?: "main" | "per-peer" | "per-channel-peer" | "per-account-channel-peer";
}): string;
/**
 * Appends a variant suffix to a base session key for parallel sessions.
 * Variant 1 returns the base key unchanged (primary session).
 */
export declare function buildParallelSessionKey(baseKey: string, variant: number): string;
/**
 * Parses a session key that may contain a variant suffix (:v2, :v3, etc.).
 * Returns { base, variant } where variant is 1 for the primary session.
 */
export declare function parseSessionVariant(sessionKey: string): {
    base: string;
    variant: number;
};
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;
};
