Repository navigation
Add per-bot MCP servers, bot notes, start turns and durable routines - #15
Merged
Merged
Conversation
Add mcp.add and mcp.remove RPCs and the bot_mcp_add, bot_mcp_list and bot_mcp_remove bot tools. A bot-owned server is written to mcp/<botId>.json, headers and env take their values from stored secrets by name, and the server's host must be allowed for each secret. bot_mcp_add always asks the owner first. The MCP panel lists Cloudflare, Linear, Notion and Sentry presets that add in one tap.
When a bot is created with instructions, or first receives them on an update, it gets a start turn: it introduces itself, does work its instructions clearly ask for now, and creates enabled routines for recurring responsibilities. The chat shows a "Bot started" notice.
Embedded blob resources and audio in an MCP tool result were dropped before reaching the model. They are now written to agents/<botId>/downloads/ (allowed send types, up to 50 MB, sanitized unique names) and the result tells the model the saved path, so the bot can read or send the file.
Private chats with other bots and routine runs did not know what the owner told the bot in its main chat. bot_note saves, replaces or removes up to 30 short keyed notes in a session document, and a notes section shows them in every conversation of that bot. Notes act as a trust channel across chats, so bot_note always asks the owner first.
Private peer messages now tell the recipient that the owner cannot see that chat and that it should report results in its own area to the owner itself with bot_notify_owner. A reply tells the sender not to repeat those details. bot_message deliveries are created with the conversation they belong to, which Pi requires for conversation-owned tasks. Register the bot notes extension for every bot.
Add a runtime instruction for every provider: lead with the result or the one decision needed, use a few sentences or a short list, and leave out process, unchanged checks and caveats unless asked.
A routine's wait phase held a live invocation for the whole interval. Every daemon restart or watch reload during it counted as a Pi restart without progress, and after five the task was parked: routines silently stopped. The wait now ends the phase in a stored sleep. Pi cannot wake a sleeping task early, so run-now and edits replace the routine's task (left alone while it is delivering) and abort the old one, which also ends itself when it is no longer the routine's task. Disabled and finished one-off routines end their task. Opening a bot retries routine tasks Pi has already parked.
sousavf
force-pushed
the
feature/claude-code-engine
branch
from
November 6, 2026 08:50
7179fef to
aa5b83d
Compare
Review fixes: - bot_mcp_add can no longer pass env secrets to command servers; only the owner can. - Embedded image resources from MCP tools reach the model again instead of being saved as files. - Per-bot MCP servers live in data/bots/<botId>/mcp.json and are included in backups. - Bot notes are carried over a history clear; bot_note replays as unsafe and has one schema. - Owned servers are marked with an isOwned flag instead of a path check; add and remove run in the bot queue. - api.md describes the stored routine sleep and the per-bot MCP file. MCP settings on web and iOS: - One list: an Add MCP server picker, then every server with its status, a switch for shared servers that saves at once, and Log in, Log out and Remove actions. - Remove asks for confirmation on its own route. The separate shared-server picker and the iOS MCP picker screen are gone. - The web bot form no longer sends the MCP selection, so saving another section cannot undo a switch. - Log in and the actions menu, and a provider's sign-in buttons, sit in one button group.
…e-code-engine-1 # Conflicts: # .fallowrc.json # bun.lock # packages/runtime/src/services/collaboration/collaboration.utils.ts
3 of 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
Several Orbs features and fixes found while running a team of five bots: bots and the owner can add MCP servers per bot, files returned by MCP tools reach the bot, bots share short notes across their conversations, a new bot gets a first turn from its instructions, peer bots report to the owner themselves, messages to the owner are shorter, and routines keep running across daemon restarts.
Changes, by commit
MCP servers per bot
mcp.addandmcp.removeRPCs, plus the bot toolsbot_mcp_add,bot_mcp_listandbot_mcp_remove.mcp/<botId>.jsonand is seen only by that bot. Headers and env take their values from stored secrets by name, and each secret must be allowed for the server's host. Removing a bot clears its derived credentials and its file.bot_mcp_addalways asks the owner first, even when "always allow" is on.Bot start turn
MCP files reach the bot
agents/<botId>/downloads/, limited to allowed send types and 50 MB, with sanitized unique names.Shared bot notes
bot_notekeeps up to 30 short keyed notes in a session document, and a notes section shows them in every conversation of that bot.bot_notealways asks the owner first.Peer bots report to the owner themselves
bot_notify_owner. Replies tell the sender not to repeat those details.bot_messagefailed withTx.createTask() requires options.conversationId. Deliveries are now created with their conversation.Shorter messages to the owner
Routines keep running across restarts
restart_limit). Routines stopped silently: on the dev daemon, all 7 routines across 4 bots were parked.status: 'sleeping').retryTaskon routine tasks Pi has already parked.Chore
bun.locksynced with the mobile app version.Testing
bun run check(17/17) andbun run lintpass on the final tree.bot_messagedelivery after theconversationIdfix.Notes for review
apps/web/worker-configuration.d.tsis generated by Wrangler and is left out on purpose.