Skip to content

feat(bot): add PR signature to Cloud Agent prompts in bot SDK#1922

Closed
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
fix/bot-pr-signature-conflicts
Closed

feat(bot): add PR signature to Cloud Agent prompts in bot SDK#1922
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
fix/bot-pr-signature-conflicts

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 2, 2026

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.ts into agent-runner.ts.

  • src/lib/bot/pr-signature.ts — New module with buildPrSignature() and getRequesterInfo() 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 full Message is available, derives chatPlatform from the thread ID, and passes both as options to spawnCloudAgentSession.
  • src/lib/bot/run.ts — Passes rawMessage to runBotAgent so the full Message (with raw for platform-specific fields) is available for PR signature building.
  • src/lib/bot/tools/spawn-cloud-agent-session.ts — Accepts an optional options parameter with prSignature and chatPlatform, appends signature to the prompt, uses dynamic chatPlatform instead of hardcoded 'slack' for createdOnPlatform. Retains botRequestId and callbackTarget from the main branch refactor.

Verification

  • pnpm typecheck — passes with no errors
  • oxfmt --list-different . — passes (formatting fixed in follow-up commit)
  • No merge conflict markers remain in any files
  • Manually reviewed all changes against both the original PR intent and current main architecture

Visual Changes

N/A

Reviewer Notes

  • The rawMessage field on RunBotAgentParams is optional so the callback route (which creates synthetic BotAgentMessageLike messages without raw) continues to work — PR signature is simply skipped when rawMessage is not provided.
  • This supersedes feat(bot): add PR signature to Cloud Agent prompts in bot SDK #1914 which has unresolvable merge conflicts.

kilo-code-bot bot added 3 commits April 2, 2026 12:10
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).
@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 2, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • src/lib/bot/agent-runner.ts
  • src/lib/bot/pr-signature.ts
  • src/lib/bot/run.ts
  • src/lib/bot/tools/spawn-cloud-agent-session.ts

Reviewed by gpt-5.4-20260305 · 1,251,516 tokens

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 2, 2026

Closing in favor of #1914, which now has merge conflicts resolved directly on its branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants