Skip to content

Move agent presence into its own Runner-side owner - #1750

Closed
loganj wants to merge 1 commit into
agents-records-ownerfrom
agents-presence-owner
Closed

loganj wants to merge 1 commit into
agents-records-ownerfrom
agents-presence-owner

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖 This is step 3 of the Manager/Runner split for agents. It is an inert refactor.

What changes

Each copy of the app tells every community which agents it runs there: online every minute, and offline when an agent stops, unless another copy took it over. That code lived inside AgentsService.

This PR moves it into AgentPresence (presence.ts). It reads three facts through a small host:

  • which agents run in each community,
  • each community's live connection,
  • whether another copy took over an agent there.

The presence logic, timing and batching are unchanged.

Why

Presence belongs to the Runner, the part that runs agents, because only the Runner knows what runs. Taking it out of AgentsService is one of the small moves that leave the Runner's parts separable, so they can go to their own page later.

Tests

The existing agents service presence tests pass unchanged (src/features/agents: 716 tests).

🤖 Generated with Claude Code

AgentPresence tells each community which agents this copy runs there,
as AgentsService did. It reads what runs, the community connections and
takeovers through a small host, so it can move with the Runner.

No behavior changes.

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

Copy link
Copy Markdown
Contributor Author

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

@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