import { PgClientLike } from "../contracts/orchestrator/snapshot-store.contract.mjs"; import { CheckpointStore } from "../contracts/orchestrator/checkpoint-store.contract.mjs"; //#region ../ai/src/checkpoint/pg.d.ts /** * Options for the Postgres {@link CheckpointStore} (orchestrator.md §8.3). * * The dev owns the connection — `@warlock.js/ai` takes no peer dep on * `pg` and never opens or closes the client. A single `pg.Pool` can * back both the cache and the orchestrator stores. */ type PgCheckpointOptions = { /** An already-built `pg.Pool` / `pg.Client` — anything matching {@link PgClientLike}. */client: PgClientLike; /** Backing table name. Defaults to `warlock_orchestrator_sessions` (§8.6). Must be a safe SQL identifier. */ table?: string; /** Idle-row TTL in seconds. When set, rows older than the TTL are eligible for cleanup on prune. */ ttl?: number; }; /** * Create a Postgres-backed {@link CheckpointStore} (orchestrator.md * §8.3). The dev installs `pg` and passes a `pg.Pool` / `pg.Client` — * `@warlock.js/ai` never imports `pg`. Run {@link CheckpointStore.schema} * through your migration tool once before use; the store never * auto-migrates. * * @example * import { Pool } from "pg"; * import { ai } from "@warlock.js/ai"; * * const pool = new Pool({ connectionString: process.env.DATABASE_URL }); * const store = ai.checkpoint.pg({ client: pool }); * * // Once, via your migration tooling: * // await pool.query(store.schema()); */ declare function pg(options: PgCheckpointOptions): CheckpointStore; //#endregion export { PgCheckpointOptions, pg }; //# sourceMappingURL=pg.d.mts.map