import type { Database } from "./database.js"; export type ManagedHumanPersonalWorkspaceProvisioning = { organizationMembershipId: string; personalWorkspaceId: string; }; /** * Converge the deterministic human personal workspace, its inference * control row, and the organization-membership anchor through the exact 0219 * `ensure_managed_human_personal_workspace` lifecycle seam. * * This is the single implementation of that preparation. Better Auth managed * access, local single-user access, and the operator membership backfill call it, * so neither owns a second copy of the deterministic personal-workspace * identity. All authority - account binding, owner-membership proof, workspace * identity, control-row validation, membership status - stays inside the * SECURITY DEFINER seam, which fails closed; nothing here writes an * organization-tenancy table directly. * * Must be called inside a transaction whose RLS context is already the exact * account with no workspace. It restores that context before returning. */ export declare function ensureManagedHumanPersonalWorkspace(tx: Database, input: { accountId: string; subjectId: string; }): Promise;