import { type Message } from "../schema";
import type { PaginationQuery, Paginated } from "../../schemas/pagination";
export type MessageRole = "user" | "assistant";
export interface NewMessageInput {
    role: MessageRole;
    content: string;
}
/**
 * Persists a turn's messages in a single multi-row insert (one round trip). Called
 * fire-and-forget off the chat response path, so it never adds to reply latency.
 */
export declare function saveMessages(tenantId: string, threadId: string, items: NewMessageInput[]): Promise<void>;
/**
 * Tenant-scoped transcript for one conversation, oldest message first and
 * offset-paginated -- a long-running thread can accumulate far more messages
 * than a dashboard modal should load in one response. Page 1 is the start of
 * the conversation; later pages move forward in time.
 */
export declare function listMessages(tenantId: string, threadId: string, pagination: PaginationQuery): Promise<Paginated<Message>>;
/**
 * Tenant-scoped conversation context for the agent (src/agent/agent.ts), capped
 * to the most recent `limit` messages so a long-running thread doesn't grow the
 * prompt (and token cost) without bound. Fetched newest-first to apply the cap,
 * then re-sorted to chronological order for the agent's input message list.
 */
export declare function listRecentMessages(tenantId: string, threadId: string, limit: number): Promise<Message[]>;
