import { createDb } from "../packages/db/src/index.js"; async function run() { const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo"); const events = await prisma.event.findMany({ where: { type: "thread.progress", createdAt: { gte: new Date(Date.now() - 30_000) }, }, orderBy: { createdAt: "desc" }, take: 6, }); for (const e of events) { console.log( `[${e.createdAt.toISOString()}] Bot: ${e.botId} | ${JSON.stringify(e.payload || e.data)}`, ); } } run() .catch(console.error) .finally(() => process.exit(0));