/**
 * Server-side RPC handlers. Queries the server's own SQLite DB
 * and returns typed responses for TUI consumption.
 */
import type { MagicContextConfig } from "../config/schema/magic-context";
import { type ContextDatabase as Database } from "../features/magic-context/storage";
import type { LiveSessionState } from "../hooks/magic-context/live-session-state";
import type { RustModeModuleClient } from "../hooks/magic-context/rust-mode-transform";
import type { MagicContextRpcServer } from "../shared/rpc-server";
import type { SidebarSnapshot, StatusDetail } from "../shared/rpc-types";
export interface RustSessionStatus {
    usage?: {
        current_total_input_tokens?: number;
        context_limit_tokens?: number;
    };
    boundary_present?: boolean;
    coverage_ordinal?: number | null;
    compartment_count?: number;
    compartment_tokens?: number;
    pending_drop_count?: number;
    wrapup_active?: boolean;
    wrapup_rounds?: number | null;
}
export declare function buildSidebarSnapshot(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus): SidebarSnapshot;
/** Convert snapshot-build failures into a transport-failure envelope. A genuine
 * zero snapshot remains a successful value so deleted sessions stay deleted. */
export declare function buildSidebarSnapshotRpcResponse(db: Database, sessionId: string, directory: string, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, config?: Record<string, unknown>, moduleStatus?: RustSessionStatus): Record<string, unknown>;
export declare function buildStatusDetail(db: Database, sessionId: string, directory: string, modelKey?: string, config?: Record<string, unknown>, liveSessionState?: LiveSessionState, injectionBudgetTokens?: number, moduleStatus?: RustSessionStatus): StatusDetail;
/**
 * Register all RPC handlers on the server.
 */
export declare function registerRpcHandlers(rpcServer: MagicContextRpcServer, args: {
    directory: string;
    config: MagicContextConfig;
    client: unknown;
    liveSessionState: LiveSessionState;
    rustModeModuleClient?: RustModeModuleClient;
}): void;
//# sourceMappingURL=rpc-handlers.d.ts.map