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.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 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 session = await prisma.session.findFirst({ orderBy: { createdAt: "desc" } });
|
|
if (!session) throw new Error("No session");
|
|
|
|
const group = await prisma.chatGroup.findFirst({ where: { name: "Executive Board" } });
|
|
if (!group) throw new Error("No group");
|
|
|
|
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: {
|
|
groupId: group.id,
|
|
text: "Willkommen im Executive Board. Chief (CEO) und Steve Jobs (CTO): Ab sofort stimmen wir hier die übergeordnete Strategie ab. Kurzer Status-Check von beiden bitte: Wie ist die Aufstellung?",
|
|
},
|
|
}),
|
|
});
|
|
|
|
console.log("Send status:", res.status);
|
|
const data = await res.json();
|
|
console.log("Send response:", JSON.stringify(data, null, 2));
|
|
}
|
|
|
|
run()
|
|
.catch(console.error)
|
|
.finally(() => process.exit(0));
|