Skip to content

feat(agents): forward hosted agent types the screens' page registers - #1741

Closed
loganj wants to merge 1 commit into
agent-host-tool-forwardingfrom
agent-host-hosted-forwarding
Closed

loganj wants to merge 1 commit into
agent-host-tool-forwardingfrom
agent-host-hosted-forwarding

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Stacked on feat(agents): forward tools the screens' page adds to the agents port #1738. Builderlab registers its hosted agent type whole from its UI entry, because its provider steps use the Builderlab sign-in that lives in the UI. Once agents run in their own page, the agents service must still see that type. This lets the screens' page register it with the service over the agents port.
  • Nothing uses it yet, so behavior does not change. The agents window PR will connect it.

Details

  • hosted-port.ts has two halves:
    • hostedClient (screens' page): register(type, owner) sends the type's id, title, description, defaults() value, provider steps and readiness to the service. What the type shows (Create fields, tabs, provider dialog, config functions) stays in this page, through present.
    • serveHosted (agents page): it registers a stand-in type. Its provision, activate, profile, interrupt and remove steps, and its provider check and attention action, are forwarded to the screens' page.
  • Each step's signal is carried across: when the service aborts it, the screens' page's step sees its own signal abort.
  • Readiness (the provider snapshot, such as "Log in to Builderlab") is pushed to the service each time it changes.
  • Reloads behave as for tools in feat(agents): forward tools the screens' page adds to the agents port #1738. A reloaded service gets the types listed again. When the screens' page reloads and lists a type again, the service ends that type's open steps with an error.
  • serveAgents now takes { addTool, register } instead of a bare addTool.
  • Refusals: the screens' page refuses a type that runs its agents itself (no remote), or one with parts that only an agent entry can give (run, models, usage, sessions, sessionControls, syncedSettings, expose, …). The error says that its plugin needs an agent entry. No bundled or installed plugin registers such a type from its UI entry.

Testing

  • service.test.ts: the real agents service, with a hosted type that the screens' page registers. The type's Create field and provider dialog are shown from the screens' page; its readiness reaches the service and changes there; creating an agent runs provision and activate in the screens' page; removing it runs remove.
  • port.test.ts, over a JSON event bus:
    • A step's result crosses, and an abort reaches the step in the screens' page.
    • A local type, and a hosted type with usage, are refused.
    • A step that a reloaded screens' page never answers ends with an error, and a reloaded service gets the type listed again.
  • Mutation checks: each of these makes a test fail: not carrying the abort, not listing again after a reload, not ending abandoned steps, not updating readiness, and not presenting what the type shows.
  • tsc --noEmit, Biome, and vitest run src/features/agents src/buzz-mcp (866 passed) pass.

🤖 Generated with Claude Code

Builderlab registers its hosted type whole from its UI entry: its
provider steps use the sign-in that lives there. Once agents run in
another page, the screens' page lists such a type with the service and
keeps what it shows. The service adds a stand-in whose provider steps
and readiness checks are answered back in the screens' page, with each
step's abort carried across, and the type's readiness pushed as data
when it changes. A reloaded service is told the types again; a step left
unanswered by a screens' page that reloaded ends with an error.

A type that runs its agents in the screens' page, or has parts only an
agent entry can give, is refused there with an error that names the
need for an agent entry. Nothing uses this 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>
@loganj

loganj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Closing: the Manager/Runner split replaces this design (#1748 → #1839, with more to come). The branch stays in place because #1737, #1743 and #1744 are still stacked on it. They will move onto the new stack in the hidden-page step.

@loganj loganj closed this Oct 28, 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