import type pg from "pg"; import type { Persona, SeededRow, TableInfo, TableOwnership } from "../types.js"; export interface CloneContext { persona: Persona; /** What the model says about this table; the source of the ownership anchor. */ ownership: TableOwnership | undefined; userTableId: string | null; orgTableId: string | null; /** This persona's own rows, by table id, for re-pointing foreign keys. */ planted: Map; /** Rows already planted in this table, which must never become templates. */ exclude: SeededRow[]; } export type CloneOutcome = { ok: true; row: SeededRow; } | { ok: false; reason: string; }; export declare function cloneRow(client: pg.PoolClient, table: TableInfo, ctx: CloneContext): Promise;