import { createDb } from "../packages/db/src/index.js"; async function run() { const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo"); for (const name of ["DevOps Engineer", "Security & QA Auditor"]) { const bot = await prisma.bot.findFirst({ where: { name } }); const events = await prisma.event.findMany({ where: { botId: bot?.id }, orderBy: { createdAt: "asc" }, }); console.log(`\nEvents for ${name} (total ${events.length}):`); for (const e of events) { console.log( `[${e.createdAt.toISOString()}] ${e.type} | payload: ${JSON.stringify(e.payload || e.data).slice(0, 100)}`, ); } } } run() .catch(console.error) .finally(() => process.exit(0));