Skip to content

Build the Runner as its own service, apart from the Manager - #1892

Closed
loganj wants to merge 1 commit into
agents-link-callsfrom
agents-runner-service
Closed

loganj wants to merge 1 commit into
agents-link-callsfrom
agents-runner-service

Conversation

@loganj

@loganj loganj commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

🤖 Step 6b of the agents Manager/Runner split. Inert refactor. Stacks on #1865.

The Runner is now its own service, AgentsRunnerService (src/features/agents/runner-service.ts), apart from the Manager (AgentsService). Each page can build only its own side; this PR still builds both in one page, joined by a MessageChannel.

  • The Runner owns the local agent type registry, the agent-entry API (tools, wake, handle, relay, core memory), the tick and catch-up timers, and its side of the link.
  • The Manager keeps hosted types, presentations, shares, presence and reconnect.
  • register checks a type once (checkType), then sends local types to the Runner and hosted types to the Manager.
  • The Runner's direct changed() call to the Manager is gone. The link already carries every change.

Validation

  • tsc and biome clean.
  • Full vitest: only known local failures (unrelated to this change).
  • Chromium agent specs (local activity, follow-up queue, creation and update review, apps panel): 34 passed.
  • New test: the Runner runs alone and serves its types over the link.

🤖 Generated with Claude Code

The Runner now has its own class: the agent types that run here, what
plugins' agent entries add, its timers and its side of the link. The
Manager builds it in this page for now and keeps hosted types,
presentations, presence and reconnects. The Runner no longer calls the
Manager directly when something changes; the link already carries it.

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
The Runner becomes its own service, apart from the Manager, and on macOS
it runs in a hidden "agents" webview that the system never throttles,
with its storage and the plugins' agent entries. The screens' page keeps
the Manager. Only JSON crosses, over the native agents port, on two
lanes: "agents" for the Manager and Runner link, and "page" for where
agent storage is, the followed communities, and local activity.

- The Runner owns presence, keep-awake, agent hooks and the reconnect
  of its own connections.
  A failed relay is retried at most every 30 s, whichever owner asks.
- The Manager waits at most 10 s for the Runner's first decision.
- The agents page starts the Runner once the screens' page says where
  agent storage is; the screens' page still loads and moves it first.
- Other platforms keep the Runner in the screens' page.

Includes #1735 (page-owned native work), #1743 and #1744's native page.
Squashes #1892 and #1893.

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

🤖 Closing: this change is now part of #1893, which collects one column of the Manager/Runner split in one PR.

@loganj loganj closed this Oct 29, 2026
loganj added a commit that referenced this pull request Oct 29, 2026
The Runner becomes its own service, apart from the Manager, and on macOS
it runs in a hidden "agents" webview that the system never throttles,
with its storage and the plugins' agent entries. The screens' page keeps
the Manager. Only JSON crosses, over the native agents port, on two
lanes: "agents" for the Manager and Runner link, and "page" for where
agent storage is, the followed communities, and local activity.

- The Runner owns presence, keep-awake, agent hooks and the reconnect
  of its own connections.
  A failed relay is retried at most every 30 s, whichever owner asks.
- The Manager waits at most 10 s for the Runner's first decision.
- The agents page starts the Runner once the screens' page says where
  agent storage is; the screens' page still loads and moves it first.
- Other platforms keep the Runner in the screens' page.

Includes #1735 (page-owned native work), #1743 and #1744's native page.
Squashes #1892 and #1893.

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 added a commit that referenced this pull request Oct 31, 2026
The Runner becomes its own service, apart from the Manager, and on macOS
it runs in a hidden "agents" webview that the system never throttles,
with its storage and the plugins' agent entries. The screens' page keeps
the Manager. Only JSON crosses, over the native agents port, on two
lanes: "agents" for the Manager and Runner link, and "page" for where
agent storage is, the followed communities, and local activity.

- The Runner owns presence, keep-awake, agent hooks and the reconnect
  of its own connections.
  A failed relay is retried at most every 30 s, whichever owner asks.
- The Manager waits at most 10 s for the Runner's first decision.
- The agents page starts the Runner once the screens' page says where
  agent storage is; the screens' page still loads and moves it first.
- Other platforms keep the Runner in the screens' page.
- Each page that runs agents has its own agent protection. The agents
  page binds protection itself; a protection change is a Runner command
  (agents.protect) that retires the protected runs, saves, and asks the
  Manager to refresh (manager.refresh). The custody claim moves into the
  Runner.
- Native relay sockets belong to the webview that opened them: a page
  load closes only that page's sockets, and the 16-socket limit is per
  page. The agents page gets the relay socket and protection commands.
- A held agent removal belongs to the current page of its holder.

Includes #1735 (page-owned native work), #1743 and #1744's native page.
Squashes #1892 and #1893.

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>
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