/**
 * Shared helpers for locating Gemini session files on disk.
 *
 * Gemini CLI writes per-project session files to:
 *   ~/.gemini/tmp/<projectHash>/chats/session-<ISO-ts>-<short8>.json[l]
 *
 * Verified against gemini CLI v0.25.2 (apprenticeship Step 2):
 *   - The directory is `~/.gemini/tmp/<projectHash>/chats/`.
 *   - Each session file's basename is `session-<ISO-timestamp>-<short>.{json,jsonl}`
 *     where `<short>` is the FIRST 8 hex chars of the session UUID.
 *   - Each file's JSON body carries a `"sessionId"` field = the full UUID.
 *
 * So a session UUID `9b06d03d-f990-49c0-...` lives in a file named
 * `session-2026-06-02T05-32-9b06d03d.json`. This module finds a session's
 * file by UUID: it matches the filename's `<short8>` suffix against the
 * UUID's first 8 chars (fast, no read) and confirms via the in-file
 * `sessionId` only when the cheap filename match is ambiguous.
 *
 * This is the layout the framework-blind resolvers (ThreadResumeMap.jsonlExists,
 * RateLimitSentinel/CompactionSentinel recovery-verification) route through for
 * gemini sessions — exactly as those resolvers route codex sessions through
 * openai-codex/observability/sessionPaths.ts. Without it, a gemini session has
 * no claude jsonl and no codex rollout, so every framework-blind path falls
 * through to a wrong/default file and silently breaks fleet-wide.
 *
 * RULE 3.1 RATIONALE
 *   Criticality: high (resume + recovery-verification correctness).
 *   Frequency:   per-resume / per-recovery-check.
 *   Stability:   semi-stable (Gemini may change the session layout).
 *   Fallback:    none — a layout change yields empty results (caught by a
 *                geminiSessionLayoutCanary when that conditional ships, §6).
 *   Verdict:     deterministic FS walk.
 */
/** Resolve the Gemini home directory (`~/.gemini` unless overridden). */
export declare function geminiHomeFromConfig(geminiHome?: string): string;
/**
 * Find a Gemini session file by session UUID. Returns the absolute path or
 * null on miss. Synchronous — the resume-map `jsonlExists` guard runs on a
 * sync code path and cannot await. A missing `~/.gemini/tmp` (e.g. a pure
 * Claude/Codex agent) returns null fast.
 *
 * Strategy:
 *   1. Walk `<geminiHome>/tmp/<projectHash>/chats/` for `session-*` files.
 *   2. Match the filename's `<short8>` against the UUID's first 8 chars.
 *   3. On a filename match, confirm via the in-file `sessionId` (cheap head
 *      read) so two sessions sharing an 8-char prefix can't collide.
 *   4. Also accept a file whose body contains the full UUID even if the
 *      filename short-id was absent (defensive against a layout tweak).
 */
export declare function findGeminiSessionFileSync(uuid: string, geminiHome?: string): string | null;
/**
 * Find the single newest Gemini session file (by mtime) SYNCHRONOUSLY →
 * `{ path, size, mtime }` (or null when none / not a gemini tree).
 *
 * Used by the gemini branch of the RateLimitSentinel + CompactionSentinel
 * recovery-verification: "did the throttle clear / did compaction recover?"
 * == "is gemini producing output again?" == "did the newest session file
 * grow?". The sentinels compare this against the captured baseline size.
 *
 * Mirrors the codex `findNewestRolloutSync` contract (the account-wide
 * growth signal), adapted to gemini's `tmp/<hash>/chats/` layout. Walks all
 * project-hash chat dirs and statSyncs `session-*` files, returning the
 * newest by mtime. (Gemini's per-project session counts are far smaller than
 * codex's tens-of-thousands of rollouts, so a full stat walk is acceptable
 * for the rarely-run recovery check.)
 */
export declare function findNewestGeminiSessionSync(geminiHome?: string): {
    path: string;
    size: number;
    mtime: number;
} | null;
//# sourceMappingURL=sessionPaths.d.ts.map