import { type ToolShortId } from '@opensip-cli/core'; import type { StoredSession } from '@opensip-cli/contracts'; import type { DrizzleDataStore } from '@opensip-cli/datastore/internal'; /** Filters for {@link SessionReadRepo.list}: tool short-id and/or max row count. */ export interface SessionListOptions { readonly tool?: ToolShortId; readonly limit?: number; readonly cwdWithin?: string; } /** Read side of the session store: list/get/latest/count with hydration. */ export declare class SessionReadRepo { private readonly datastore; constructor(datastore: DrizzleDataStore); list(opts?: SessionListOptions): readonly StoredSession[]; get(id: string): StoredSession | null; /** * The most recent session. With `cwdWithin`, returns the newest session * whose stored `cwd` is inside that root — `list` applies the containment * filter BEFORE the limit, so this is the newest in-scope row, not the * global newest filtered down to nothing. */ latest(opts?: { tool?: ToolShortId; cwdWithin?: string; }): StoredSession | null; count(): number; /** Hydrate one session via point queries — the single-row get() path. */ private hydrateSession; /** Batch-load tool payloads for a page of session ids (avoids list()'s N+1). */ private payloadsBySessionId; } //# sourceMappingURL=session-read-repo.d.ts.map