evOo-local/packages/core/src/messaging-commands.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

14 lines
507 B
TypeScript

/**
* Owner text commands, parsed only in the owner's verified 1:1 conversation.
* Everything that is not an exact command is a normal message to the bot.
*/
export type MessagingCommand = "approve" | "decline" | "leave";
export function parseMessagingCommand(text: string): MessagingCommand | null {
const normalized = text.trim().toUpperCase();
if (normalized === "YES") return "approve";
if (normalized === "NO") return "decline";
if (normalized === "LEAVE") return "leave";
return null;
}