Repository navigation
feat(acp): hosts install a managed runtime over RPC, and mark agents whose program Orca provides - #29024
Conversation
b7bc651 to
cf54393
Compare
fa72326 to
934f85d
Compare
cf54393 to
0f0c56e
Compare
934f85d to
f6f5b50
Compare
0f0c56e to
c5eb8b2
Compare
f6f5b50 to
a56729b
Compare
c5eb8b2 to
244b415
Compare
7758a23 to
b5763f5
Compare
0e53d3b to
c40df19
Compare
004ff8c to
feb71c6
Compare
c40df19 to
d2292f6
Compare
eec9773 to
cd79c1c
Compare
0d08ee8 to
739531b
Compare
cd79c1c to
63769c5
Compare
ad5e7b4 to
9509cb5
Compare
83b6260 to
627be7b
Compare
627be7b to
726eea6
Compare
726eea6 to
db2cd29
Compare
…whose program Orca provides managedRuntime.status / managedRuntime.install / managedRuntime.cancel, negotiated by managed-runtime.install.v1, act on the host that receives them, the one that runs the agent's chats, with no workspace needed. A status read naming the revision it shows is a long-poll on its own call-queue lane, so every client sees another's start, progress and outcome. agentSession.agents marks an agent whose program Orca provides on that host.
…n a start would really run it
…-polled, and Cancel answers with the outcome
managedRuntime.subscribe {agent} sends a full snapshot on subscribe, then one
snapshot per install state change, and closes with the transport. It replaces
the managedRuntime.status long-poll and its slot registrations.
db2cd29 to
fa96870
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Antigravity's chat needs a separate program, its chat server, which Orca downloads for it. When chats fetched that program on their own, the first chat sat on "Working for Ns" for about 18 seconds with no progress and no way to cancel, and opening several chats started several downloads. This stack changes that: nothing downloads until the person clicks Install, with progress and Cancel in Settings and in the chat.
#29023 added the installer on the host. This PR lets clients reach it: the desktop app, a paired desktop, or the web client can follow a host's install status, start an install and cancel it, and every client watching sees the same progress. It also marks, in the host's agent list, which agents' programs Orca provides on that host. No agent declares such a program yet, so nothing changes for anyone when this merges alone.
What Changed
This revision (moving to the common pattern):
Status was pulled, not pushed. Each watching client re-asked the host for status in a loop that waited up to 25 seconds per request. That was a second, hand-built way of following host state beside Orca's existing push mechanism, the one chat status already streams over, and it needed its own long-poll and call-queue registrations plus a fix for waits left behind on hide and show. Status is now pushed:
managedRuntime.subscribe {agent}sends a full snapshot when a client subscribes, then one snapshot per change, and ends when the client unsubscribes or its connection closes. It replacesmanagedRuntime.status {agent, shown?}, and the long-poll and long-wait lane registrations are gone. Nothing here has shipped, so the same capability covers the new method.Cancel answered at once, before the work had stopped.
managedRuntime.cancelnow answers with the outcome once the install has unwound:cancelled, orsucceededif the release was already in place (feat(acp): a managed runtime installs only when asked, with progress and cancel #29023).Before: the installer had no way in, and clients could not tell which agents Orca provides a program for.
After:
managedRuntime.subscribe {agent}: a streaming method on Orca's existing runtime push mechanism. Its cleanup is tied both to the runtime's subscription registry and to the client's own unsubscribe, so hiding and showing a surface in a local window never leaves a listener behind on the host. Reads coalesce: one status read at a time, and several changes during it become one more read. Byte-progress frames reuse the installed facts read at the last phase change instead of re-reading disk and PATH.managedRuntime.install {agent}answers with the new status, andmanagedRuntime.cancel {agent, operationId}with the outcome. Both need permissionhost-admin, since they put executable code on the host; subscribing is read-only (workspace).source: 'external'), using the same lookup a start uses with the host's own launch environment and the agent's Command setting, so a copy counts only when a start would really run it. Install is not refused when such a copy exists; once installed, Orca's copy runs first (feat(acp): chat agents can declare a managed runtime that a start runs but never installs #28460), as in the common pattern.managed-runtime.install.v1: a client offers Install only to a host that advertises it, so older hosts keep working unchanged. Not added to the mobile allowlist (there is no phone install UI).agentSession.agentsrows gainmanagedRuntime: truefor an agent whose program Orca provides on that host (absent where no release is published, e.g. Windows). Older clients ignore it; older hosts never send it.Merged alone: no agent declares a managed program yet, so nothing changes for anyone.
Why
These are host administration calls, like
managedServer.*, so they live in their own namespace rather than the chat-session (agentSession.*) surface, which stays unchanged. Pushing status over the runtime's existing streaming methods is the common pattern and reuses the mechanism Orca already uses for chat status, instead of keeping a second, polled one. Answering every subscriber from one host-owned state is what makes "same button, same state" in Settings and in the chat hold across clients.Linked Issue
N/A (maintainer; part of the stack that adds Antigravity to chat).
Visual Proof
N/A: no agent declares a managed program yet; the button comes in #29049 and the chat placement in #29051.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
One test through the real RPC handlers with a fake agent: a subscriber gets a snapshot at once, then the install another client starts; Cancel answers
cancelledonce the run has unwound and the stream shows it; after the subscriber's connection closes, a later install sends it nothing.Lint and typecheck: PR CI.
Review
Agent skill upstream boundary
Notes
Differences from the common pattern
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)