import { createDb } from "../packages/db/src/index.js"; async function main() { const dbUrl = process.env.DATABASE_URL || "postgres://ingowagner@127.0.0.1:5432/evoo"; const { prisma } = createDb(dbUrl); const session = await prisma.session.findFirst({ orderBy: { createdAt: "desc" } }); if (!session) throw new Error("No active session found"); const steve = await prisma.bot.findFirst({ where: { name: "Steve Jobs" } }); if (!steve) throw new Error("Steve Jobs bot not found"); const text = `Die vier Agenten (Apex Quant, Code Architect, DevOps Engineer, Security & QA Auditor) sind jetzt physisch im System angelegt und in der Seitenleiste aktiv. Die Truppe steht. Ab jetzt gilt: 1. Volle Autonomie: Übernimm die Koordination und verteile die Aufgaben per message_bot. 2. Führe für jeden Agenten eine persistente TODO.md und baue die zentrale KNOWLEDGE_BASE.md auf, damit kein Wissen verloren geht. 3. Melde dich proaktiv mit echten Ergebnissen. Go.`; const res = await fetch("http://127.0.0.1:3100/rpc/threads/send", { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${session.token}`, }, body: JSON.stringify({ json: { botId: steve.id, text, }, }), }); const body = await res.text(); console.log("Send status:", res.status); console.log("Send response:", body); } main() .catch(console.error) .finally(() => process.exit(0));