Engineering
xrk-bot avatar

xrk-bot

Expert for XRK-AGT runtime core, bot main class, event bus, server startup (HTTP/WS), and global object management.

Introduction

This skill acts as an expert for the XRK-AGT project, specifically focusing on the internal runtime mechanics and the core architecture. It provides guidance on how the bot initializes, how different loaders (TaskerLoader, ApiLoader, etc.) are orchestrated, and how the global Bot object maintains state across the application lifecycle. Developers interacting with this skill can gain insights into the system's entry points, the lifecycle of HTTP/WebSocket servers, and how middleware integrates with the underlying event bus.

  • Manages the lifecycle and initialization of the primary Bot main class, including HTTP/HTTPS/WebSocket server mounting.

  • Oversees the integration and loading sequence of core components like TaskerLoader, ApiLoader, StreamLoader, and PluginsLoader.

  • Provides authoritative guidance on using the global Bot object, including Bot.em() for event emission, Bot.tasker for protocol handling, and Bot.makeLog() for internal logging.

  • Facilitates the understanding of the event system, from protocol-level message ingestion via Taskers to standardized event distribution into plugins.

  • Assists in debugging and extending HTTP API routes by explaining how the ApiLoader scans and registers modules from the core directory.

  • Designed for developers debugging system boot, middleware issues (CORS, logging, auth), or custom Tasker integrations.

  • Requires reliance on source files such as src/bot.js, docs/bot.md, and docs/server.md for accurate technical references.

  • Important note: The skill mandates that developers should never import or instantiate the Bot class manually; always rely on the singleton instance managed by the app.js/start.js startup flow.

  • Ideal for mapping out code paths, configuring API routes, and ensuring compatibility when modifying the core framework layer.

Repository Stats

Stars
134
Forks
13
Open Issues
0
Language
JavaScript
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 06:18 PM
View on GitHub