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.
15 lines
478 B
TypeScript
15 lines
478 B
TypeScript
import type { PrismaClient } from "@rakazo/db";
|
|
|
|
/**
|
|
* Executor dep answering "does this bot belong to a messaging identity?" —
|
|
* one indexed query per run, and none when the messaging surface is absent.
|
|
*/
|
|
export function createMessagingContextLoader(prisma: PrismaClient) {
|
|
return {
|
|
hasIdentity: async (botId: string): Promise<boolean> =>
|
|
Boolean(
|
|
await prisma.messagingIdentity.findUnique({ where: { botId }, select: { id: true } }),
|
|
),
|
|
};
|
|
}
|