Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import { createDb } from "../packages/db/src/index.js";
|
|
|
|
async function run() {
|
|
const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo");
|
|
|
|
const runs = await prisma.run.findMany({
|
|
orderBy: { createdAt: "desc" },
|
|
take: 5,
|
|
include: {
|
|
thread: {
|
|
include: {
|
|
bot: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
console.log("RECENT RUNS:");
|
|
for (const r of runs) {
|
|
console.log(
|
|
`Run ID: ${r.id} | Bot: ${r.thread?.bot?.name} | Status: ${r.status} | Created: ${r.createdAt.toISOString()} | Completed: ${r.completedAt?.toISOString()} | Error: ${r.error}`,
|
|
);
|
|
}
|
|
|
|
const latestEvents = await prisma.event.findMany({
|
|
orderBy: { createdAt: "desc" },
|
|
take: 10,
|
|
});
|
|
|
|
console.log("\nRECENT EVENTS:");
|
|
for (const e of latestEvents) {
|
|
console.log(
|
|
`[${e.createdAt.toISOString()}] Type: ${e.type} | Run: ${e.runId} | Data: ${JSON.stringify(e.data).slice(0, 150)}`,
|
|
);
|
|
}
|
|
|
|
const recentMessages = await prisma.message.findMany({
|
|
orderBy: { createdAt: "desc" },
|
|
take: 5,
|
|
include: {
|
|
thread: {
|
|
include: {
|
|
bot: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
console.log("\nRECENT MESSAGES:");
|
|
for (const m of recentMessages) {
|
|
console.log(
|
|
`[${m.createdAt.toISOString()}] Bot: ${m.thread?.bot?.name} | Role: ${m.role} | Content: ${m.content.slice(0, 120)}...`,
|
|
);
|
|
}
|
|
}
|
|
|
|
run()
|
|
.catch(console.error)
|
|
.finally(() => process.exit(0));
|