Skip to content

Give plugin agent tools and attention sources a Runner owner - #1826

Closed
loganj wants to merge 1 commit into
agents-runner-runsfrom
agents-runner-plugins
Closed

loganj wants to merge 1 commit into
agents-runner-runsfrom
agents-runner-plugins

Conversation

@loganj

@loganj loganj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🤖 This is step 7 of the Manager/Runner split for agents. It is an inert refactor.

What changes

Plugins add two things that run with agents. Tools are functions an agent turn can call, such as link_pr and the Builderlab apps tools. Attention sources are plugin code that watches something and wakes an agent. Both lived in AgentsService, the Manager.

RunnerPlugins (runner-plugins.ts) now owns them:

  • the tool registry and tool names, addTool checks and tools();
  • the attention source registry, addAttentionSource (with its agent MCP connection and agent commands), attentionProviders(), and running each source against the Runner's running agents.

AgentsService keeps the public ctx.agents methods and forwards each call with the calling plugin's context. So a plugin's tools are still withdrawn when the plugin stops.

AgentsRunner now has subscribe. It tells subscribers when its running agents change or when an agent's holder changes. Attention sources and agent commands follow that instead of every Manager change, such as a team or classifier update. Those inputs are the only things they read.

The code moved without edits, except that it reads the Runner's running list and relay instead of the Manager's.

Why

In a hidden agents page, plugins' agent entries add their tools and sources there, next to the agents that use them. This puts that registry with the Runner, so the hidden page can build it without the Manager. It is also where the Builderlab credential will be served, as a link topic.

Tests

  • No new tests. Behavior is unchanged. The existing service, attention source, agent command and MCP tests cover tool registration, source wakes and agent commands.
  • The agents, bundled and buzz-mcp suites pass locally (4,431 tests). The only failures are the 3 emoji and avatar-picker tests that always fail in this worktree.

🤖 Generated with Claude Code

RunnerPlugins now keeps the tools plugins add for agent turns and the
attention sources that wake agents, and runs those sources against the
Runner's running agents. AgentsRunner tells its subscribers when what
runs or who holds it changes, so sources and agent commands follow the
Runner rather than every Manager change. AgentsService forwards the
plugin calls with the calling plugin's context. Behavior is unchanged.

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>
@loganj

loganj commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Closing: this change is now part of #1748, which collects one column of the Manager/Runner split in one PR.

@loganj loganj closed this Oct 29, 2026
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.

1 participant