๐Ÿง  Ompcord

TL;DR ๐Ÿš€ Ompcord keeps your Pi coding agent online in Discord. Amy is the bot persona. Each session runs in its own thread off a home channel; a single embed dashboard updates in place with live progress (todo checklists, status, steps) and relocates to stay โ€œstickyโ€ at the bottom of the thread. Administrative config settings are modified live via dropdown select menus.


โšก 60-Second Quick Start

  1. ๐Ÿค– Create Application & Bot (Discord Developer Portal) โ†’ Enable Message Content intent โ†’ Reset Token (copy).
  2. ๐Ÿ”— Invite Link (Bot + applications.commands scopes, perms 326417632336): https://discord.com/api/oauth2/authorize?client_id=APP_ID&scope=bot%20applications.commands&permissions=326417632336
  3. ๐Ÿ  Home Channel: Set a text channel (e.g. #amy). Sessions run as threads inside it.
  4. โš™๏ธ Config Env: Supply variables to ompcordd.service: DISCORD_TOKEN=... DISCORD_GUILD_ID=... DISCORD_HOME_CHANNEL_ID=...
  5. ๐Ÿ’ฌ Talk: Use /amy new to start a thread, /amy say to prompt, or chat directly in session threads.

๐Ÿงฌ Core Architecture & UX Upgrades

๐Ÿ“Œ 1. Interactive Pinning

  • Prompt Pinning: Choice prompts (askViaDashboard) are automatically pinned to the thread header.
  • Auto Release: Unpinned immediately upon user response, skip, or timeout.
  • Clean Logs: Auto-deletes Discordโ€™s system pinning notice to prevent clutter.

๐Ÿ“‹ 2. Embed-Based Todo Checklists

  • State Machine: Embed changes color based on agent mode (idle: Green, processing: Blurple, asking/confirming: Yellow, failed: Red).
  • Inline Grid Routing: Completed/future phases are rendered as compact inline fields (inline: true). The active phase is expanded as a checklist block (inline: false) for mobile readability.
  • Limit Defense: Auto-compresses and truncates long checklists to respect Discordโ€™s 6000-character embed limit.

โค“ 3. Sticky Dashboard (Leapfrog Relocation)

  • Log Offset Check: When text/code logs push the dashboard up, the bot archives the old message (turns it neutral gray, removes buttons, updates footer) and spawns a fresh live dashboard at the bottom.
  • Rate Limit Shield: Debounces relocation. Only repositions if at least 2 messages have been posted since the last dashboard update.

๐ŸŽ›๏ธ 4. Unified Status & Config Control Panel

  • Slash Diagnostics: /amy status / /amy health display gateway stats, active run metrics, and feature flags.
  • Interactive Toggles: Dropdown string select menus (amystatus:toggle_config) allow administrators to toggle reactions, toolResponses, autoStart, useThreads, and logDetail dynamically. Saved back to config.json instantly.

๐ŸŽš๏ธ Slash Commands (Guild-Scoped)

Use either /amy or /ompcord; both command names expose the same subcommands.

SubcommandAction
statusShows the SSOT status dashboard with interactive config toggles
healthShows the same health/status dashboard surface for diagnostics
new [topic]Opens a fresh session thread off the home channel
say <prompt>Sends a one-shot prompt to the active session thread
cancelCancels the active headless omp child process
stopArchives the current session thread
handoffCreates a session handoff and opens a child thread from a session thread

๐Ÿง  Brainstorm: The Pagination Screen Pattern

To print massive code blocks/logs without message spam, we can convert messages into interactive screens using buttons:

๐ŸŽ›๏ธ Component Design

  • Nav Row: [โ—€ Prev] [ Page 1/N ] [ Next โ–ถ]
  • SSOT Buffer: Instead of chunking into multiple new messages, Ompcord splits the output into pages ( chars each) and stores them in memory/session.
  • In-Place Edit: Clicking Next โ–ถ edits the same message with the next chunk.
  • Timeout/Freeze: After the turn ends or after a 5-minute idle timeout, buttons are stripped to freeze the finalized page.

๐Ÿ“‹ Constants & Limits Reference

  • ๐Ÿ” Permissions Int: 326417632336 (View, Send, Embed Links, Attach Files, Add Reactions, Read History, Manage Channels, Create Public Threads, Send in Threads).

  • ๐Ÿ“ Limits: Message chars ยท Select menu options ยท Component grid rows ยท Modal text fields ยท Embed description chars ยท Field value chars ยท Interaction ACK (then 15m to edit).

  • ๐Ÿ“‚ CLI Continuity: Resume Discord threads locally using: omp --allow-home --cwd /home/usr --session-dir ~/.omp/amy-sessions/<thread-id> -c

  • Flow Canvas