import type { DraftGraphResponse, ErrorResponse, Diagnostics, LimitsResponse, SseEvent } from "./types.js"; /** * Type guard: check if a payload is a DraftGraphResponse */ export declare function isDraftGraphResponse(payload: unknown): payload is DraftGraphResponse; /** * Type guard: check if a payload is an ErrorResponse */ export declare function isErrorResponse(payload: unknown): payload is ErrorResponse; /** * Extract diagnostics from an SSE event if present. * * Returns null when the event does not contain a DraftGraphResponse payload. */ export declare function getDiagnosticsFromEvent(event: SseEvent): Diagnostics | null; /** * Normalized graph caps derived from LimitsResponse. */ export interface GraphCaps { maxNodes: number; maxEdges: number; } /** * Normalize graph limits from LimitsResponse, preferring graph_max_* fields * while falling back to legacy aliases when necessary. */ export declare function getGraphCaps(limits: LimitsResponse): GraphCaps; /** * Normalized quota view for convenience when working with LimitsResponse. */ export interface NormalizedQuota { capacityRpm?: number; tokens?: number; refillRatePerSec?: number; /** * Client-friendly retry-after in milliseconds (derived from retry_after_seconds). */ retryAfterMs?: number; } /** * Normalized view of the standard request quota, or null when not present. */ export declare function getStandardQuota(limits: LimitsResponse): NormalizedQuota | null; /** * Normalized view of the SSE request quota, or null when not present. */ export declare function getSseQuota(limits: LimitsResponse): NormalizedQuota | null;