Files
nanakura dc26878386
CI / Lint (push) Canceled after 0s
CI / Build Test (stage-web) (push) Canceled after 0s
CI / Build Test (ui-loading-screens) (push) Canceled after 0s
CI / Build Test (ui-transitions) (push) Canceled after 0s
CI / Unit Test (push) Canceled after 0s
CI / Type Check (push) Canceled after 0s
CI / Check Provenance (push) Canceled after 0s
Sync Labels / sync-labels (push) Successful in 1m43s
chore: prune unused apps and services for the moeka fork
- Remove stage-tamagotchi, stage-pocket, server, and engine workspaces with their workflows, addons, and docs
- Switch the toolchain from pnpm to bun, replace lockfiles with bun.lock
- Rewrite remaining product references to Moeka
2026-09-14 16:40:49 +07:00
..
2026-08-26 20:13:10 +08:00

Moeka Satori Bot

⚠️ Disclaimer: This is a submodule of Moeka. The core part of this satori bot is merely a temporary solution. We will eventually delete it and integrate with Moeka's Core once the main framework is stable.

A STANDALONE, event-driven AI agent built on the Satori Protocol. It connects to multiple chat platforms (QQ, Telegram, Discord, Lark) via a Koishi bridge, featuring an autonomous thought loop.

🏗 Architecture & Internals (Provisional)

Important: This module currently implements a self-contained "Mini-Core" (src/core/) to operate independently. This is NOT the final architecture of Moeka.

  • Temporary Logic: The Event Loop, Scheduler, and Planner logic located in src/core/ are placeholders. They simulate the behavior of the future Moeka Core.
  • Retained Components: The Dispatcher and Database will be retained. They will be exposed as tool-like modules to the Moeka Core for action execution and state persistence.
  • Future Migration: Once the main Moeka Core is ready, the src/core/ directory (specifically the loop/planning logic) will be removed. This module will then be refactored to strictly function as an Adapter (Satori Protocol handling) and Capability Provider (Actions), delegating the cognitive loop to the main Moeka process.

For the current standalone version, please refer to these documents:

  • HANDLER.md: Explains the current Event-to-Action Flow (Queue -> Scheduler -> LLM).
  • PERSISTENCE.md: Details the current Memory-First state management strategy specific to this temporary core.

Key Code Paths:

  • Loop & Logic (Temporary): src/core/
  • Adapter (Permanent): src/adapter/satori/
  • Capabilities (Permanent): src/capabilities/

Prerequisites

  • Node.js >= 18.0.0
  • bun >= 1.4.2
  • Koishi Instance: Running the server-satori plugin.
  • LLM Provider: OpenAI compatible API (Ollama, vLLM, DeepSeek, etc.).

Quick Start

  1. Install Dependencies
bun install
  1. Configure Environment Copy the example config and edit it:
cp .env .env.local

Key Variables:

# Satori Configuration
SATORI_WS_URL=ws://localhost:5140/satori/v1/events
SATORI_API_BASE_URL=http://localhost:5140/satori/v1
SATORI_TOKEN= # Optional: Leave empty if auth is disabled in Koishi

# LLM (OpenAI Compatible)
LLM_API_KEY=your_api_key_here
LLM_API_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4
LLM_RESPONSE_LANGUAGE=English
LLM_OLLAMA_DISABLE_THINK=false
  1. Run
# Development (Hot-reload)
bun run --filter @proj-airi/satori-bot dev

# Production
bun run --filter @proj-airi/satori-bot start

Key Locations

  • Persona & System Prompts: src/core/planner/prompts/*.velin.md
  • Database (PGlite): data/pglite-db (See PERSISTENCE.md for architecture)
  • Action Logic: src/capabilities/actions/