Skip to content

refactor(plugins): give plugins an agent entry, and split each harness into runtime and UI - #1716

Draft
loganj wants to merge 1 commit into
mainfrom
agent-host-plugin-agent-entry
Draft

loganj wants to merge 1 commit into
mainfrom
agent-host-plugin-agent-entry

Conversation

@loganj

@loganj loganj commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A plugin can export an agent entry beside apply. What code agents need while they run goes in the agent entry: an agent type's runtime, tools, wakes and Attention sources. apply stays the UI. Both entries start in the same page for now.

Claude, Codex, goose and Pi register their types from their agent entries. They present them from their UI entries, and reach the runtime only through the type's expose handles. GitHub's agent tools and its pull request Attention source move into its agent entry.

Inert: the app behaves the same.

This is column 1 of 4 in the Manager/Runner split. It squashes #1716, #1719, #1720, #1721 and #1723.

Rebased on main 662e918

  • GitHub's agent entry gets its own pull-state store, beside the UI entry's. One page still shares one store per host.
  • Main's presentSource and pull presentation stay in the UI entry.

Stack

  1. refactor(plugins): give plugins an agent entry, and split each harness into runtime and UI #1716 (this PR): plugin split. Base: main.
  2. Give the Runner its own owner of agent state, in the same page #1748: the Runner owns agent state, in the same page.
  3. Cross between the Manager and the Runner only over the JSON link #1833: the Manager and the Runner cross only over the JSON link.
  4. Run agents in a hidden page on macOS #1893: on macOS, agents run in a hidden page.

Validation at 62ccbbd76 (on main 662e918)

  • tsc is clean, and Biome reports no errors.
  • Full Vitest run: all pass, with no unhandled errors, except the emoji-mart suite and 3 tests that also fail on main on this machine (2 emoji-picker theme tests and one StatusEditor test). One App.profile test failed once while a Rust build ran beside it; it passes 3 of 3 runs on its own.

Deferred: a human test in the app.

🤖 Generated with Claude Code

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
loganj force-pushed the agent-host-plugin-agent-entry branch from 193154a to 7ba2704 Compare October 29, 2026 12:46
@loganj loganj changed the title refactor(plugins): give plugins an agent entry refactor(plugins): give plugins an agent entry, and split each harness into runtime and UI Oct 29, 2026
@loganj
loganj force-pushed the agent-host-plugin-agent-entry branch from 7ba2704 to 829587f Compare October 29, 2026 13:55
…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.

GitHub's agent entry adds the github_pr_state tool and the pull request
watches, with its own pull request store, since agents will run in a
page of their own. Its UI entry shows how a watch looks in Attention
through the new `ctx.agents.presentSource`, so the agent entry needs no
navigation. An Attention source no longer takes `present`.

Inert: the app behaves the same, except that a pull request both shown
and watched is read once for each store.

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
loganj force-pushed the agent-host-plugin-agent-entry branch from 829587f to 62ccbbd Compare October 31, 2026 13:31
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