Gateway bot: proxy commands to active project instead of reading local state

In gateway mode the bot has no local CRDT or project filesystem, so all
bot commands (status, backlog, start, assign, etc.) returned empty or
broken results. Now the gateway bot proxies non-local commands via HTTP
to the active project's /api/bot/command endpoint, which already exists
on every project server.

Only a small set of gateway-local commands (help, ambient, reset, switch)
are still handled directly by the gateway. Everything else is forwarded
automatically, so new commands added in the future will work through the
proxy without additional gateway changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Timmy
2026-04-21 11:47:06 +01:00
parent b77e139347
commit 45f1096b96
6 changed files with 130 additions and 1 deletions
+1
View File
@@ -868,6 +868,7 @@ async fn main() -> Result<(), std::io::Error> {
matrix_shutdown_rx,
None,
vec![],
std::collections::BTreeMap::new(),
);
} else {
// Keep the receiver alive (drop it) so the sender never errors.