Rewire Discord to @copilotkit/channels (P0) — spec + plan - #109
Draft
jerelvelarde wants to merge 3 commits into
Draft
Rewire Discord to @copilotkit/channels (P0) — spec + plan#109jerelvelarde wants to merge 3 commits into
jerelvelarde wants to merge 3 commits into
Conversation
Bridge apps/discord-bot onto @copilotkit/channels for transport + JSX rendering while keeping the ticket/queue/worker engine intact. GitHub deferred (SDK ships no GitHub adapter). Behind DISCORD_USE_CHANNELS_SDK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Task 1 is a gating ingress spike (SDK is mention-gated; Outpost is forum-monitored). Tasks 2-7: flag + dual-boot, inbound bridge to InboundHandler, slash commands, feedback buttons via onInteraction, outbound render swap, parity + docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Spike verdict: the SDK's stock discord() ingress cannot do forum / non-mention monitoring (hardcoded mention gate, no threadCreate subscription, private Client). Egress/renderDiscordMessage is usable. See docs/superpowers/plans/2026-07-16-discord-ingress-findings.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CPK-7937 PR #109 — Channels SDK rewire: decide whether the spec is still live
PR #109 — Spec and plan only, no implementation. Nothing else touches its files. The decisionIt is labelled P0 but has sat a month while the Discord bot shipped, went live, and accumulated its own roadmap items. Either it is still the intended direction for Discord — in which case it should merge as a spec and get an implementation issue — or it has been overtaken and should be closed so it stops reading as pending P0 work. Jerel is the author and the right person to call it. He also has CPK-7921 (review PR #192) queued, so this is worth raising in the same pass. |
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.
Spec and plan only — no implementation. +1164/−2 across 5 files: a design doc, an implementation plan, an ingress-findings doc, plus the
@copilotkit/channelsdependency added toapps/discord-bot/package.jsonand the resulting lockfile changes.What the spec proposes
Replace the Discord-facing I/O layer with
@copilotkit/channels+@copilotkit/channels-discord, so the SDK owns the gateway, JSX→Components V2 rendering, interactions and slash-command registration instead of the hand-rolleddiscord.jsclient inapps/discord-bot.Two seams change and nothing else does:
apps/discord-bot'sClient+events/*+interactions/*+commands/*becomecreateChannel({ adapters: [discord({...})] }), translating each turn into Outpost's existingInboundMessage.getAdapter(DISCORD).postResponse(...).The deliberate non-goals are the load-bearing part of the design:
thread.runAgent()is never called; Outpost's ticket/queue/worker/AI pipeline stays unchanged underneath. The SDK is Discord transport + rendering only.Current status — read this before treating it as pending work
Open since 2026-07-16, the oldest open PR in the repo. In the meantime the Discord bot shipped, went live, and accumulated its own roadmap items. On
maintodayapps/discord-botstill depends ondiscord.jsdirectly and nothing in the tree imports@copilotkit/channels, so none of this spec has been implemented.Worth knowing for whoever picks the decision up:
@copilotkit/channelshas itself moved on since this was written — the canonical CopilotKit surface is now@copilotkit/channelswith managed Intelligence Channels, so the SDK-side API in this spec should be re-verified against the current package before any implementation starts, not assumed still accurate.Two things are true at once, which is why this is a judgement call and not a cleanup:
Tracked as CPK-7937. Left open deliberately pending that call; staying draft in the meantime so it cannot be merged by accident.