import type { ProxyState } from '../types'; export declare function readProxyState(): ProxyState | null; /** * Resolve the proxy port from the best available source. * Priority: running proxy state → provision cache → default. */ export declare function resolveProxyPort(cacheProxyPort?: number): number; export interface StartProxyResult { pid: number; port: number; alreadyRunning: boolean; } export interface StartProxyOptions { /** Override the GitHub token file path (defaults to ~/.brainbotbeta/github-token) */ githubTokenFile?: string; /** Override the starting port search range */ startPort?: number; } /** * Start the LLM proxy process (idempotent). * * If the proxy is already running and healthy, returns early. * Handles stale PID (state file exists but process dead) by cleaning up and restarting. */ export declare function startProxy(opts?: StartProxyOptions): Promise; export interface StopProxyResult { wasStopped: boolean; wasRunning: boolean; } /** * Stop the LLM proxy process. * * Reads state → kill PID → poll for exit → SIGKILL fallback → remove state. */ export declare function stopProxy(): Promise; export interface ProxyStatus { running: boolean; healthy: boolean; pid?: number; port?: number; startedAt?: string; stale: boolean; } /** * Get the current proxy status. * * Reads state → alive check → health check. Cleans up stale state. */ export declare function getProxyStatus(): Promise;