How it works

One clear path, from event to reply.

From a Discord event to the router, then the action gate or the model chain, then the output filter — on a single SQLite archive.

  1. The event arrives

    Discord events enter through bot.py, are taken up by angel/client.py, and are routed by angel/nl_router.py.

  2. Context is read

    The router reads the persona, the member memory and the member note, then decides: a direct reply, the model chain when generated text is needed, or an action that needs the gate.

  3. The action gate

    The gate checks the actor’s immutable Discord id, the required permission, and a word that signals intent, before anything reaches the Discord API.

  4. The output filter

    It strips @everyone, token-like strings and leftover tags, and corrects a reply that claims an action still sitting in the queue was executed.

  5. The archive

    One SQLite file: server_messages for raw messages, an FTS5 index for search, and a table for member notes. No external queue, cache or worker.

Angel's message pipeline Five stages right to left: a Discord event, the language router, memory and archive, a proposed decision, then the confirmation gate before execution. An unconfirmed decision executes nothing. بوابة التأكيد بلا تأكيد: لا تنفيذ 1 حدث من Discord on_message · interaction 2 الموجّه اللغوي angel/nl_router.py 3 الذاكرة والأرشيف angel/database.py 4 قرار مقترح angel/brain.py 5 تنفيذ بعد التأكيد cogs/* النموذج يقترح، والبوابة تُقرّر — ولا إجراء إشرافي يُنفَّذ بلا تأكيد.
مسار الرسالة: من الحدث إلى التنفيذ، وبوابة تأكيد في المنتصف.

Operations