KiteBot on CopilotKit Intelligence — Phase 1 (channels migration + Intelligence Gateway)#6
Open
jerelvelarde wants to merge 12 commits into
Open
KiteBot on CopilotKit Intelligence — Phase 1 (channels migration + Intelligence Gateway)#6jerelvelarde wants to merge 12 commits into
jerelvelarde wants to merge 12 commits into
Conversation
…esign Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…hannels-intelligence channels-discord/-telegram/-whatsapp are only published at 0.0.x; pinned to their latest published versions. jsxImportSource -> @copilotkit/channels-ui. Commit the pnpm lockfile now that standalone install resolves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dupe rxjs Global import-specifier rename across app/** (API identifiers unchanged: createBot, defineBotTool, slack, SanitizingHttpAgent, etc.). The rename made the slack agent import resolve correctly, exposing a latent duplicate-rxjs skew (channels@7.8.1 vs channels-slack->core@7.8.2) that broke the AbstractAgent structural type at app/index.ts. Fixed with a pnpm override pinning rxjs ^7.8.2 to a single copy. check-types clean; 62 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ltimeGateway)
app/managed.ts runs the same bot over the CopilotKit Intelligence Realtime
Gateway (published @copilotkit/channels-intelligence two-process pattern; the
unified CopilotRuntime({channels}) API is main-only/unpublished). Pure
createKiteBot() factory + unit test; 65 tests green, check-types clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eBot mentions .env.example gains the INTELLIGENCE_* block for pnpm channel (full gateway scope). README + setup.md rename bot->channels, add channels-intelligence, present the managed Intelligence deployment as the recommended default with self-hosted as the alternative, drop Redis, and note packages now publish to npm (standalone install works). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…st managed service Relabel the pnpm channel mode 'Intelligence Gateway' (was 'Intelligence (managed)') and reserve 'managed service' for the coming-soon hosted waitlist, resolving the terminology collision. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…mands, render-table, components) - managed.ts: drop bot.name! (local channelName const), guard onThreadStarted, extract+test pure helpers (promptFromMessage/buildAgentHeaders/parseProjectId) - index.ts: log the swallowed error-post, harden shutdown (runShutdown wrapper, guarded closeBrowser, exit codes) mirroring managed.ts - commands: wrap /agent /triage /file-issue-fallback runAgent (runAgentSafely helper, log + apology); test /triage-with-text and /preview no-user - render-table: surface clamp truncation notes to user + agent, align 'Max 99' desc, right-align monospace fallback, log the native-post failure - components: render priority in issue-list meta, cap page-list blocks - render-chart: add JSON.parse/upload-failure/bytes tests 84 tests pass; check-types clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ntime, config) - confirm-write-tool: distinguish no-response (timeout/dismissed) from explicit decline instead of silently reporting DECLINED - confirm-write / showcase onClick handlers: guard fire-and-forget update/post - file-issue: log swallowed apology-post; document the necessary ModalView cast; test success-path prompt + sender context - read-thread: cover the handle fallback branch - runtime.ts: narrowing instead of (reason as Error); drop the as never[] cast (types align); document the AGENT_MODEL cast caveat; platform-neutral framing (log prefix [runtime], doc header, SYSTEM_PROMPT) since the backend serves all platforms - .env.example: header includes WhatsApp; setup.md: correct the table-renderer row (native Table, not Playwright); tsconfig: type-check scripts/ (+ fix childEnv) 89 tests pass; check-types clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…hygiene, coverage - runtime.ts + index.ts: validate PORT (integer, 1-65535; reject 0 / out-of-range) - index.ts: guard onThreadStarted (match managed.ts) - managed.ts: type promptFromMessage (drop cast); instanceof narrowing; +parseProjectId edge tests - scripts/start-notion-mcp.ts: drop --auth-token CLI arg (secret leaked via ps under shell:true; AUTH_TOKEN env suffices) - docs: correct OpenAI-only reality (runtime is openaiText-only; Anthropic/Google not wired), AGENT_URL is required (not a code default), document NOTION_MCP_PORT/NOTION_VERSION - tsconfig: drop stale 'agent' exclude; type-check scripts/ - tests: runAgentSafely error path, confirm-write no-response branch, render-chart DIAGRAM_PNG bytes + comment fix 94 tests pass; check-types clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
KiteBot on CopilotKit Intelligence — Phase 1 (foundation)
Migrates OpenTag off the deprecated
@copilotkit/bot*packages onto the renamed@copilotkit/channels*, renames the bot to KiteBot, drops Redis, and adds anIntelligence Gateway run mode. Spec + plan under
docs/superpowers/.What changed
@copilotkit/bot*→@copilotkit/channels*(pure rename; APIidentifiers unchanged). All packages are now published on npm, so standalone
pnpm installfrom this repo works — the old "monorepo-only" caveat is gone.app/managed.ts— a new Intelligence Gateway channel host (pnpm channel) using thepublished two-process pattern:
createBot+startChannelsOverRealtimeGateway(
@copilotkit/channels-intelligence). Same bot, no Slack tokens — Intelligence owns theSlack edge. The agent brain is reached over AG-UI at
AGENT_URL(the existingruntime.tstriage backend for now; a LangGraph deep agent in Phase 2).kitebot. TheOpenTag project name is unchanged.
demo-restart.tsx,docker-compose.yml,demo:restart, and theredis-store dep removed (matches upstream
examples/slack).setup.mdlead with the Intelligence Gateway deploy as recommended,self-hosted as the alternative;
.env.examplegains theINTELLIGENCE_*block.Deviations from the original plan (surfaced during execution)
CopilotRuntime({ channels })/createChannelAPI (from the initialsnippet) is
main-only and unpublished on npm — so this uses the publishedtwo-process
createBot+startChannelsOverRealtimeGatewaypattern instead.AbstractAgenttype; fixedwith a
pnpm.overrides.rxjs ^7.8.2.@copilotkit/channels-discord/-telegram/-whatsappare only published at0.0.x; pinnedto their latest published versions.
Code review
Ran a multi-agent CR (Opus). The
pr-review-toolkitplugin wasn't available in-session, soa fallback 7-slot general-purpose review was used. Two fix cycles landed genuine fixes:
PORT validation,
onThreadStartedguard, error-wrapping for slash-commandrunAgent,render-table truncation-notes surfacing, page-list block cap, priority rendering, HITL
no-response vs decline, a notion-mcp secret-in-argv hygiene fix, the OpenAI-only docs
correction, and ~29 new tests (65 → 94).
Accepted as by-design / not changed (documented rather than "fixed"):
AGENT_MODELcast to the OpenAI model union — no runtime union to validate against;the caveat is documented in-code.
as ModalViewinfile-issue.tsx— necessary because channels-ui JSX types asBotNode(verified); commented.
thread.post" — a false positive:postthrows on failure and the run-loopwraps throws into
{ error }for the agent (verified against the installed.d.ts).runtime.ts.pre-existing app, not the diff). The canonical diff-scoped
pr-review-toolkitCR shouldbe run in a fresh session as the authoritative gate — a handful of low-value pre-existing
coverage nitpicks (e.g.
page-listeditedBy, render-tablecenteralignment) remaindeferred.
Verification
pnpm check-typesclean;pnpm test94/94.INTELLIGENCE_*values + confirm the channel slug (
kitebot) and devapiUrl/wsUrl, runpnpm runtimepnpm channel, and confirm the KiteBot dashboard flips Waiting for runtime → live.Out of scope (later phases)
AGENT_URL(co-marketing).🤖 Generated with Claude Code