import type { GatewayKoiRow, GatewaySessionRow, GatewaySessionsDefaults, SessionsListResult } from "./session-utils.types.js";
import { type SKYKOIConfig } from "../config/config.js";
import { type SessionEntry, type SessionScope } from "../config/sessions.js";
export { archiveFileOnDisk, capArrayByJsonBytes, readFirstUserMessageFromTranscript, readLastMessagePreviewFromTranscript, readSessionPreviewItemsFromTranscript, readSessionMessages, resolveSessionTranscriptCandidates, } from "./session-utils.fs.js";
export type { GatewayKoiRow, GatewaySessionRow, GatewaySessionsDefaults, SessionsListResult, SessionsPatchResult, SessionsPreviewEntry, SessionsPreviewResult, } from "./session-utils.types.js";
export declare function deriveSessionTitle(entry: SessionEntry | undefined, firstUserMessage?: string | null): string | undefined;
export declare function loadSessionEntry(sessionKey: string): {
    cfg: SKYKOIConfig;
    storePath: string;
    store: Record<string, SessionEntry>;
    entry: SessionEntry;
    canonicalKey: string;
};
export declare function classifySessionKey(key: string, entry?: SessionEntry): GatewaySessionRow["kind"];
export declare function parseGroupKey(key: string): {
    channel?: string;
    kind?: "group" | "channel";
    id?: string;
} | null;
export declare function listKoisForGateway(cfg: SKYKOIConfig): {
    defaultId: string;
    mainKey: string;
    scope: SessionScope;
    kois: GatewayKoiRow[];
};
export declare function resolveSessionStoreKey(params: {
    cfg: SKYKOIConfig;
    sessionKey: string;
}): string;
export declare function resolveGatewaySessionStoreTarget(params: {
    cfg: SKYKOIConfig;
    key: string;
}): {
    koiId: string;
    storePath: string;
    canonicalKey: string;
    storeKeys: string[];
};
export declare function loadCombinedSessionStoreForGateway(cfg: SKYKOIConfig): {
    storePath: string;
    store: Record<string, SessionEntry>;
};
export declare function getSessionDefaults(cfg: SKYKOIConfig): GatewaySessionsDefaults;
export declare function resolveSessionModelRef(cfg: SKYKOIConfig, entry?: SessionEntry, koiId?: string): {
    provider: string;
    model: string;
};
export declare function listSessionsFromStore(params: {
    cfg: SKYKOIConfig;
    storePath: string;
    store: Record<string, SessionEntry>;
    opts: import("./protocol/index.js").SessionsListParams;
}): SessionsListResult;
