import type { GatewayAgentRow, GatewaySessionRow, GatewaySessionsDefaults, SessionsListResult } from "./session-utils.types.js"; import { type BotConfig } from "../config/config.js"; import { type SessionEntry, type SessionScope } from "../config/sessions.js"; export { archiveFileOnDisk, archiveSessionTranscripts, capArrayByJsonBytes, readFirstUserMessageFromTranscript, readLastMessagePreviewFromTranscript, readSessionTitleFieldsFromTranscript, readSessionPreviewItemsFromTranscript, readSessionMessages, resolveSessionTranscriptCandidates, } from "./session-utils.fs.js"; export type { GatewayAgentRow, 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: BotConfig; storePath: string; store: Record; entry: SessionEntry | undefined; canonicalKey: string; legacyKey: string | undefined; }; /** * Find all on-disk store keys that match the given key case-insensitively. * Returns every key from the store whose lowercased form equals the target's lowercased form. */ export declare function findStoreKeysIgnoreCase(store: Record, targetKey: string): string[]; /** * Remove legacy key variants for one canonical session key. * Candidates can include aliases (for example, "agent:ops:main" when canonical is "agent:ops:work"). */ export declare function pruneLegacyStoreKeys(params: { store: Record; canonicalKey: string; candidates: Iterable; }): void; 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 listAgentsForGateway(cfg: BotConfig): { defaultId: string; mainKey: string; scope: SessionScope; agents: GatewayAgentRow[]; }; export declare function resolveSessionStoreKey(params: { cfg: BotConfig; sessionKey: string; }): string; export declare function canonicalizeSpawnedByForAgent(cfg: BotConfig, agentId: string, spawnedBy?: string): string | undefined; export declare function resolveGatewaySessionStoreTarget(params: { cfg: BotConfig; key: string; scanLegacyKeys?: boolean; store?: Record; }): { agentId: string; storePath: string; canonicalKey: string; storeKeys: string[]; }; export declare function loadCombinedSessionStoreForGateway(cfg: BotConfig): { storePath: string; store: Record; }; export declare function getSessionDefaults(cfg: BotConfig): GatewaySessionsDefaults; export declare function resolveSessionModelRef(cfg: BotConfig, entry?: SessionEntry | Pick, agentId?: string): { provider: string; model: string; }; export declare function resolveSessionModelIdentityRef(cfg: BotConfig, entry?: SessionEntry | Pick, agentId?: string): { provider?: string; model: string; }; export declare function listSessionsFromStore(params: { cfg: BotConfig; storePath: string; store: Record; opts: import("./protocol/index.js").SessionsListParams; }): SessionsListResult;