Chat-only mode¶
Problem¶
An agent whose only surface is the HTTP chat endpoint could not be deployed: index.js
unconditionally called client.login(process.env.DISCORD_BOT_TOKEN), and a missing token
is a non-4014 failure → fail-fast exit (rc#1772, correct for Discord agents). Config
validation likewise demanded a messaging block. The first tenant agent (Rig-E) is
Cockpit-only by design; its operator should not have to create a Discord application to
deploy a chat agent.
Signal¶
No DISCORD_BOT_TOKEN in the environment AND CHAT_API_TOKEN set (isChatOnlyMode
in degraded-mode.js). Deliberately conjunctive: a missing Discord token on an agent with
no chat surface stays a config error with the rc#1772 fail-fast — chat-only must never be
the accidental default for a misconfigured Discord agent.
Behaviour¶
- Discord is skipped entirely: no client login, no gateway intents.
- Validation accepts a character with neither
messagingnordiscord. - Dashboard, heartbeat and
POST /api/chatrun as normal. - Everything else is byte-for-byte unchanged for Discord agents.
Verified on the production entrypoint: boots without a Discord token, stays alive, and the chat endpoint answers 401 to a wrong token.