/**
 * Production wiring for the GeminiLoopDriver (need-gem-002, increment 2).
 *
 * Turns the injected-dependency engine (`GeminiLoopDriver`) into real
 * subscription-auth gemini spawns:
 *   - `createGeminiLoopSpawn`     — routes every turn through the gemini transport
 *                                   (`spawnGeminiAndWait` + `buildGeminiChildEnv`,
 *                                   which strips every billing env var → subscription
 *                                   OAuth is the only possible auth path).
 *   - `parseLatestGeminiSessionHandle` — pure parser of `gemini --list-sessions`
 *                                   output → the FRESHEST session's UUID (the one
 *                                   turn 1 just created). Min-age, not list order.
 *   - `createGeminiHandleCapture` — runs `--list-sessions` via the transport and
 *                                   parses it; returns null if no handle resolves
 *                                   (the engine then ABORTS rather than guessing).
 *   - `createQuotaBudgetGate`     — wraps the existing QuotaTracker so a loop refuses
 *                                   to start / continue under load or spend pressure.
 *
 * Spec: docs/specs/gemini-multi-turn-loop-driver.md
 */
import type { GeminiLoopSpawn, GeminiLoopHandleCapture, GeminiLoopBudgetGate } from './GeminiLoopDriver.js';
/** Default per-turn spawn timeout (a single gemini turn). */
export declare const DEFAULT_GEMINI_TURN_TIMEOUT_MS = 180000;
/**
 * Parse `gemini --list-sessions` stdout and return the FRESHEST session's UUID.
 *
 * Each session row looks like:
 *   `  3. Remember the codeword... (Just now) [ef951c6e-49b4-49df-a8f0-b8aa62b4403f]`
 * The age is the parenthesised group immediately before the `[uuid]` bracket
 * (anchored there so parentheses inside the title don't interfere). We pick the
 * MINIMUM age rather than trusting list order, so the handle is the session turn 1
 * just created. Returns null when no row parses.
 */
export declare function parseLatestGeminiSessionHandle(stdout: string): string | null;
/**
 * Production gemini spawn — every turn routes through the subscription-auth
 * transport. `buildGeminiChildEnv()` strips all billing env vars, so no argv this
 * receives can introduce an API key.
 */
export declare function createGeminiLoopSpawn(geminiPath: string, turnTimeoutMs?: number): GeminiLoopSpawn;
/**
 * Production handle capture — after turn 1, list sessions and pick the freshest.
 * Single-concurrency (`maxConcurrent: 1`) keeps this unambiguous: turn 1 just ran,
 * so its session is the "Just now" / min-age row even if other gemini one-shots
 * (e.g. cross-model review) created older sessions in the shared cwd.
 */
export declare function createGeminiHandleCapture(geminiPath: string, listTimeoutMs?: number): GeminiLoopHandleCapture;
/** Minimal slice of QuotaTracker the budget gate needs. */
export interface SpawnAdmissionSource {
    shouldSpawnSession(): {
        allowed: boolean;
        reason: string;
    };
}
/**
 * Production budget gate — reuses the existing QuotaTracker spawn-admission
 * decision (the same daily-spend / load-shedding signal every other instar spawn
 * respects). Fails OPEN if no tracker is wired (the engine's own maxTurns +
 * spawn-failure handling still bound the loop).
 */
export declare function createQuotaBudgetGate(quota: SpawnAdmissionSource | null | undefined): GeminiLoopBudgetGate;
//# sourceMappingURL=geminiLoopProduction.d.ts.map