Skip to content

refactor(pi): split the Pi harness into runtime and UI - #1723

Closed
loganj wants to merge 1 commit into
agent-host-goose-splitfrom
agent-host-pi-split
Closed

loganj wants to merge 1 commit into
agent-host-goose-splitfrom
agent-host-pi-split

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Stacked on refactor(goose): split the goose harness into runtime and UI #1721. It applies the same split to Pi: the runtime half runs where the agents run, and the UI half holds the screens. This is part of the work to run agents in a hidden webview that a hidden UI page cannot stall.
  • No behavior changes. Pi's Agents page entries, Settings tab and Activity tab work as before.

Details

  • Pi's agent entry now owns the runtime, its setup and the process sync. It registers the type and exposes setup and runtime handles for its UI.
  • The UI entry presents the icon, Create, CreateModel and tabs. It no longer injects host.
  • The tabs take a narrow setup handle (providers, models, login, test) in place of the PiSetup class, so they can only call what the bridge will carry.
  • Known gaps for the bridge PR: runtime.working is a synchronous read, and runtime.transcript takes an AbortSignal.

Testing

  • New index.test.ts applies both entries and checks that the presented type has Pi's screens and that only the agent entry needs host. It fails on the base branch, where Pi has no agent entry.
  • tsc --noEmit and the Pi suites pass.

🤖 Generated with Claude Code

The Pi agent entry registers the runtime half and exposes the setup and
runtime handles. The UI entry presents the icon, create form and tabs
from those handles only.

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 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 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Squashed into #1716 (one PR per column of the agents split), rebased onto main.

@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