import type * as LlmsProviders from "@cline/llms"; import type { BasicLogger } from "@cline/shared"; import { SessionArtifacts } from "../../services/session-artifacts"; import type { SessionMessagesArtifactUploader, SessionPersistenceAdapter } from "../../types/session"; import { type SessionCompactionState } from "../models/session-compaction"; import { type SessionManifest } from "../models/session-manifest"; export declare class SessionManifestStore { private readonly adapter; private readonly messagesArtifactUploader?; private readonly logger?; readonly artifacts: SessionArtifacts; constructor(adapter: SessionPersistenceAdapter, messagesArtifactUploader?: SessionMessagesArtifactUploader | undefined, logger?: BasicLogger | undefined); ensureSessionsDir(): string; initializeMessagesFile(sessionId: string, path: string, startedAt: string): void; writeSessionManifest(manifestPath: string, manifest: SessionManifest): void; readSessionManifest(sessionId: string): SessionManifest | undefined; /** * Asynchronously read only the manifest `metadata.title`. * * The session-listing hot path needs nothing from the manifest except the * title, but the manifest JSON can be large (it embeds metadata and prompt * text). This reads the file off the event-loop thread and pulls the title * out of the parsed JSON directly, skipping the full `SessionManifestSchema` * (Zod) validation that `readSessionManifest` performs. On any error (missing * file, malformed JSON, non-string title) it resolves to `undefined` so * callers fall back to the row metadata/prompt title. */ readSessionManifestTitle(sessionId: string): Promise; readManifestFile(sessionId: string): { path: string; manifest?: SessionManifest; }; resolveArtifactPath(sessionId: string, kind: "messagesPath", fallback: (id: string) => string): Promise; persistSessionMessages(sessionId: string, messages: LlmsProviders.Message[], systemPrompt?: string): Promise; private resolveCompactionPath; private updateCompactionPath; readSessionCompactionState(sessionId: string): Promise; persistSessionCompactionState(sessionId: string, state: SessionCompactionState): Promise; deleteSessionCompactionState(sessionId: string): Promise; appendStaleSessionHookLog(detectedAt: string, sessionId: string, pid: number, reason: string, source: string): void; }