import type { AppContext } from '@voltro/runtime' import { database } from '../database/schema' // Runs ONLY when the `betaExport` gate passes (see app.config.ts gatedBy). // The body itself is flag-agnostic — just counts the tenant's notes. const execute = async (_input: Record, ctx: AppContext) => { const rows = await ctx.store.query(database.notes.descriptor) return { exported: rows.length } } export default execute