Repository navigation
feat(channels): run Slack, Discord and Telegram on the AgentController (foreman-uz3j) - #57
Merged
Merged
Conversation
…r (foreman-uz3j) The three channel bots called agent.generate() directly, so tool approvals had no way to be shown or answered (every Zapier write stalled), runs were capped at 5 steps, there were no schedules or subagents, Chat SDK state was in memory, the Discord Gateway stopped after 24 hours, and /link broke the DM it was typed in. They now run on the Foreman AgentController's channels, the same engine as the web chat: - one Session per channel thread, owned by the sender's Foreman user (memory shared with web), in its own registry scope so it never touches the web session; only the thread's owner can use it or answer its approval cards - the sender's user id and workspace are stamped on every run and click - Approve/Deny buttons on every platform (core's "cards" display); the same auto-allowed tools as web, Zapier writes always ask - Postgres-backed Chat SDK state; the Discord Gateway reconnects on its own - /link moves the sender's earlier channel threads onto the linked account - the old /slack|/discord|/telegram/webhook paths forward to the generated routes; the :4112 webhook server and the inbox worker stop hosting these three, and dev:telegram goes (polling starts with the agent server) - new Slack OAuth installs load into the live adapter The old bot modules are now unused; the next change removes them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3R2sPwBzA2bpj3HT2BDv2
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 20, 2026
Merged
hamchowderr
force-pushed
the
claude/channels-link-codes
branch
from
October 20, 2026 14:07
e0b0537 to
0cc521e
Compare
hamchowderr
force-pushed
the
claude/channels-controller
branch
from
October 20, 2026 14:07
d440f0e to
c121273
Compare
hamchowderr
marked this pull request as ready for review
October 22, 2026 17:36
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Chowderr · project thread
This is part 2 of 3 of the channels split that replaces #54. It is stacked on #55 and moves to
mainonce #55 merges. CI only runs on PRs intomain, so it runs then.Before: Slack, Discord and Telegram called
agent.generate()directly, which caused four problems:/linkbroke the DM it was typed in.After: all three run on the Foreman AgentController, the same engine as the web chat:
/linkmoves earlier channel conversations onto the linked account.How
src/channels/controller-channels.tsbuilds the controller'schannelsconfig, adding only the platforms that have credentials:cardsdisplay is kept, which keeps the approval buttons; a test guards this.src/channels/relink.tsmoves threads after/link, andisChannelOnlyUseris added tolib/identity.ts./slack|/discord|/telegram/webhookpaths forward to the Mastra-generated routes.webhook-server.tsand the inbox worker stop hosting these three, so no message is answered twice.dev:telegramis removed because polling now starts with the agent server.The old bot modules stay in place but unused; #58 removes them and updates the docs. This PR adds about 940 lines, roughly half of them tests. The controller config, the
/linkhandling and the hosting switch only work together, so they stay in one PR.Checks run locally:
tscis clean, lint is clean with no new warnings, andnpm testshows 578 passed and 10 skipped.Beads: foreman-uz3j
🤖 Generated with Claude Code
https://claude.ai/code/session_01T3R2sPwBzA2bpj3HT2BDv2