Repository navigation
Conversation
A plugin can now export `agent = { inject, apply }` for what agents need
while they run (agent type runtimes, tools, wakes, Attention sources),
separate from its UI `apply`. Both parts start in the same page, under
the same plugin identity, each with its own dependencies; the plugin is
active once both are and fails if either does.
GitHub's watch_pr moves into its agent entry. No behavior changes.
This is the first step toward running agents in their own webview, so a
hidden or suspended UI page cannot stall them.
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>
An agent type can now come in two halves. The plugin's agent entry registers the runtime half with `agents.register`, and may pass `expose`: the handles its own UI reaches of the runtime (stores and async calls). The UI entry supplies icon, Create, tabs and provider dialogs with `agents.present(typeId, (exposed) => ...)`. The service merges both by type key, so readers of `types()` see one type, as before. Provider getters stay live, and a throwing `present` leaves the type's agents running. Claude moves its setup, runtime, process sync and update timer into its agent entry. Its tabs take narrow handles in place of the runtime classes. No behavior changes. 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 was referenced Oct 27, 2026
loganj
added a commit
that referenced
this pull request
Oct 29, 2026
…s into runtime and UI A plugin may export an `agent` entry beside `apply`. Code agents need while they run (an agent type's runtime, tools, wakes and Attention sources) goes there; `apply` stays the UI. Both start in the same page for now. Claude, Codex, goose and Pi now register their types from their agent entries and present them from their UI entries, reaching the runtime only through the type's `expose` handles. Inert: the app behaves the same. Squashes #1716, #1719, #1720, #1721 and #1723. Signed-off-by: Logan Johnson <loganj@squareup.com> Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
loganj
force-pushed
the
agent-host-plugin-agent-entry
branch
from
October 29, 2026 12:46
193154a to
7ba2704
Compare
Contributor
Author
|
🤖 Squashed into #1716 (one PR per column of the agents split), rebased onto main. |
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
Details
agents.register, called from the plugin'sagententry, registers the runtime half: title, defaults, run, sessions, models, usage and provider state. A new optionalexposefield holds the handles that the type's own UI needs from the runtime. These handles are stores (snapshot+subscribe) and calls that return promises, so a later PR can carry them between pages.agents.present(typeId, (exposed) => …)is new and is called from the plugin's UIapply. It supplies the icon, Peek, Create, CreateModel, tabs, and the provider'sDialogBodyandDefaultControl. Only the plugin that registered a type can present it, because both use the same plugin-scoped key.types()see one type, as before. The merged object stays the same object while neither half changes. Provider getters such asattentionActionstay live. Ifpresentthrows, the type's agents still run, and the error is logged.AgentProvider.DialogBodyis now optional, because it comes from the UI half. The provider dialog renders it only when it is present.agententry. The tabs now take narrow handle types in place of theClaudeSetup,ClaudeDefaultsandClaudeRuntimeclasses.conversations(agent)).AbortSignal.plugin-testing.tsaddsappliedType, which runs both entries of a harness plugin and merges them with the service's own merge function. The Claude tests use it.Testing
presentmerges with the registered type and takes only presentation fields;presentgets the exposed handles once; the merged type is stable; provider getters stay live; a throwingpresentleaves the type in place.🤖 Generated with Claude Code