Repository navigation
Conversation
Builderlab, GitHub link_pr and installed plugins such as loganj.branches add agent tools from their UI entry. Once agents run in another page, the screens' page lists each tool with the service, and the service adds a stand-in that forwards each call back. The call carries the agent's client as a handle: its values, and its methods, which the screens' page calls back over the port, with bytes as base64 on the JSON path. A reloaded service is told the tools again; a call left unanswered by a screens' page that reloaded ends with an error. Nothing uses it yet. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Logan Johnson <loganj@squareup.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.
🤖
Summary
link_pr, and installed plugins such asloganj.branches. Once agents run in their own page, those tools would disappear. This lets the screens' page offer them to the agents service over the agents port.Details
tool-port.tshas two halves:toolsClient(screens' page):add(tool, owner)lists the tool's name, description, schema and owning plugin with the service, and returns a withdraw.answer(call)runs the tool when the service forwards a call.serveTools(agents page): each listed tool is added to the service with a stand-in whosecallforwards to the screens' page and waits for its reply.BuzzClientas a handle: its string values (pubkey,key,owner, …) and the names of its methods. On the screens' page each method calls back over the port, and the service runs it on the real client while the call is in progress. After the call ends, a callback fails with "That tool call has finished".upload,read) travel as{ $bytes: base64 }, because the event port is JSON.handoffreturns nothing, so its callback is fire-and-forget.instanceid per page load in its state. When the screens' page sees a new instance, it lists its tools again.Testing
port.test.ts, over a JSON event bus:service.test.ts: the real agents service, with a plugin that adds a tool from its UI entry. The service lists the tool, and the call reaches the agent's client through the handle.tsc --noEmit, Biome, andvitest run src/features/agents src/buzz-mcp(863 passed) pass.🤖 Generated with Claude Code