feat(bot): add PR signature to Cloud Agent prompts in bot SDK#1922
Closed
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
Closed
feat(bot): add PR signature to Cloud Agent prompts in bot SDK#1922kilo-code-bot[bot] wants to merge 3 commits intomainfrom
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
Conversation
Port the PR signature feature from the old slack-bot/discord-bot implementations into the new bot SDK. When the Cloud Agent creates a PR/MR, the description now includes a 'Built for [User](link) by [Kilo for Platform]' attribution line.
Resolve conflicts caused by the agent-runner refactor on main. The PR signature logic (getRequesterInfo, buildPrSignature) is now integrated into agent-runner.ts instead of run.ts, and spawnCloudAgentSession accepts both botRequestId/callbackTarget (from main) and prSignature/chatPlatform options (from the feature).
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (4 files)
Reviewed by gpt-5.4-20260305 · 1,251,516 tokens |
Contributor
Author
|
Closing in favor of #1914, which now has merge conflicts resolved directly on its branch. |
4 tasks
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.
Summary
Resolves merge conflicts from #1914 and ports the PR signature feature into the refactored bot architecture. The original PR added PR author attribution ("Built for [User] by [Kilo for Platform]") to Cloud Agent prompts, but conflicted with the agent-runner refactor that moved tool setup out of
run.tsintoagent-runner.ts.src/lib/bot/pr-signature.ts— New module withbuildPrSignature()andgetRequesterInfo()for platform-aware signature generation (Slack permalink via API, Discord link from IDs, graceful fallback).src/lib/bot/agent-runner.ts— Imports PR signature functions, gathers requester info when a fullMessageis available, deriveschatPlatformfrom the thread ID, and passes both as options tospawnCloudAgentSession.src/lib/bot/run.ts— PassesrawMessagetorunBotAgentso the fullMessage(withrawfor platform-specific fields) is available for PR signature building.src/lib/bot/tools/spawn-cloud-agent-session.ts— Accepts an optionaloptionsparameter withprSignatureandchatPlatform, appends signature to the prompt, uses dynamicchatPlatforminstead of hardcoded'slack'forcreatedOnPlatform. RetainsbotRequestIdandcallbackTargetfrom the main branch refactor.Verification
pnpm typecheck— passes with no errorsoxfmt --list-different .— passes (formatting fixed in follow-up commit)Visual Changes
N/A
Reviewer Notes
rawMessagefield onRunBotAgentParamsis optional so the callback route (which creates syntheticBotAgentMessageLikemessages withoutraw) continues to work — PR signature is simply skipped whenrawMessageis not provided.