evOo-local/scripts/stop-thread.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
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.
2026-09-20 17:15:16 +02:00

21 lines
761 B
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" } });
const steve = await prisma.bot.findFirst({ where: { name: "Steve Jobs" } });
if (!session || !steve) throw new Error("Missing session or steve");
const res = await fetch("http://127.0.0.1:3100/rpc/threads/stop", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${session.token}`,
},
body: JSON.stringify({ json: { botId: steve.id } }),
});
console.log("Stop status:", res.status);
console.log("Stop response:", await res.text());
}
run();