import { type AgentEventRecord, type AgentEventSource, type AgentEventSourceOptions } from "@arnilo/prism"; import type { Pool } from "pg"; export interface PostgresAgentEventSourceOptions { readonly pool: Pool; readonly schema: string; readonly limits?: AgentEventSourceOptions; /** Reuse this secret on every replica to make source cursors resumable across them. */ readonly cursorSecret?: string | Uint8Array; } export interface ClosablePostgresAgentEventSource extends AgentEventSource { /** Compatibility path for legacy RunLedger records that were not redacted. */ appendLedger(record: AgentEventRecord): Promise; close(): Promise; } /** PostgreSQL durable source. Notifications only wake indexed durable reads. */ export declare function createPostgresAgentEventSource(options: PostgresAgentEventSourceOptions): ClosablePostgresAgentEventSource;