/**
 * Pagination utilities for bounded, context-friendly query results.
 *
 * Offset/limit pagination — the DB is a read-only snapshot so data doesn't
 * change between pages; offset/limit is simpler and maps directly to SQL.
 */
export interface PaginationMeta {
    total: number;
    offset: number;
    limit: number;
    hasMore: boolean;
    returned: number;
}
export interface PaginatedResult<T> {
    items: T[];
    pagination?: PaginationMeta;
}
export interface PaginateOpts {
    limit?: number;
    offset?: number;
}
/** Default limits applied by MCP tool handlers (not by the programmatic API). */
export declare const MCP_DEFAULTS: Record<string, number>;
/**
 * Get MCP page-size defaults, optionally merged with config overrides.
 */
export declare function getMcpDefaults(configDefaults?: Record<string, number>): Record<string, number>;
/** Hard cap to prevent abuse via MCP. */
export declare const MCP_MAX_LIMIT = 1000;
/**
 * Paginate an array.
 *
 * When `limit` is undefined the input is returned unchanged (no-op).
 */
export declare function paginate<T>(items: T[], { limit, offset }?: PaginateOpts): PaginatedResult<T>;
/**
 * Apply pagination to a named array field on a result object.
 *
 * When `limit` is undefined the result is returned unchanged (backward compat).
 * When active, `_pagination` metadata is added to the result.
 */
export declare function paginateResult<T extends Record<string, unknown>>(result: T, field: string, { limit, offset }?: PaginateOpts): T & {
    _pagination?: PaginationMeta;
};
//# sourceMappingURL=paginate.d.ts.map