/**
 * Built-in agent session storage. Backed by `system.hdb_agent_session` so
 * transcripts and pending approvals survive restarts. The exported helpers
 * are async to keep the surface uniform — once the underlying store gains
 * non-blocking paths the call sites won't have to change.
 *
 * Intentionally separate from #511's `ConversationResource`: that primitive
 * is app-facing (per-tenant, multi-user, user-defined schema) while this
 * table is server-local and operator-owned.
 */
import type { AgentMessage, AgentRunStatus, AgentSessionRow, ApprovalRequest } from './types.ts';
export declare function getAgentSessionTable(): any;
export interface CreateSessionOpts {
    sessionId?: string;
    user: string;
    model?: string;
    provider?: string;
    initialMessage?: AgentMessage;
}
export declare function createSession(opts: CreateSessionOpts): Promise<AgentSessionRow>;
export declare function getSession(sessionId: string): Promise<AgentSessionRow | undefined>;
export declare function listSessions(opts?: {
    limit?: number;
}): Promise<AgentSessionRow[]>;
export declare function appendMessage(sessionId: string, message: AgentMessage): Promise<AgentSessionRow>;
export declare function setStatus(sessionId: string, status: AgentRunStatus, lastError?: string): Promise<AgentSessionRow>;
export declare function addPendingApproval(sessionId: string, approval: Omit<ApprovalRequest, 'id' | 'createdAt'>): Promise<ApprovalRequest>;
export declare function markApprovalConsumed(sessionId: string, approvalId: string): Promise<void>;
export declare function resolveApproval(sessionId: string, approvalId: string, approved: boolean): Promise<ApprovalRequest>;
/**
 * Reset the cached table reference. Test-only seam; production code lets the
 * lazy-getter initialize once per process.
 */
export declare function _resetForTests(): void;
/** Inject a mock table accessor for unit tests. Pass `undefined` to restore the lazy default. */
export declare function _setTableForTests(mock: any): void;
