import { purgeExpiredAiGenerations } from "@/server/services/lotse/retention"; /** * Daily retention job for the AI log (L10b, Spec §31). Scheduled by the craftvia worker * (`scheduleRecurringJobs`); the payload carries no tenant — the service iterates all tenants and * writes through dbForTenant. */ export async function process(): Promise { const res = await purgeExpiredAiGenerations(); console.info(`[ai-retention] ${res.pseudonymised} entries older than ${res.days} days pseudonymised (${res.tenants} tenants)`); }