ARTEX/chatbridge
shiv e84648f99d feat(chatbridge): task commands, main-agent chat and per-user access
Part 2 of #5, on top of the bridge core.

Access: chat_bridges.allowed_users (migration 0016). A private chat is
served when its chat ID is allowed, as before. In a group the sender must
also be an allowed user, and a group with no allowed users serves nobody,
so joining an allowed group grants nothing by itself. A refused member
gets one refusal naming their user ID.

Commands: /tasks, /task [id], /pause [id], /resume [id], /findings [id].
Each chat selects its task with /task; the selection is stored in
chat_bridge_chats and cleared when the task is deleted. /pause and /resume
go through applyTaskControl, the same path as the web UI.

Plain text goes to the selected task's main agent through startTaskChat,
which the web chat handler now also uses, so the bot and the web chat
share one conversation. The answer is relayed when the turn ends, through
chatbridge.SafeText: code blocks dropped, the task's stored credentials
and common secret shapes masked, cut to 1500 characters, with a link
back. An answer is dropped if its chat is no longer allowed.

Co-authored-by: krad <222954346+dar1k0@users.noreply.github.com>
2026-11-27 11:30:06 +05:30
..
bridge.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
config.go feat(chatbridge): inbound chat bridge core with a Telegram long-poll transport 2026-11-24 15:11:50 +05:30
outbound.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
outbound_test.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
router.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
router_test.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
telegram.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30
telegram_test.go feat(chatbridge): task commands, main-agent chat and per-user access 2026-11-27 11:30:06 +05:30