Skip to content

refactor(agents): type the app's screens against an AgentsClient - #1724

Closed
loganj wants to merge 1 commit into
agent-host-pi-splitfrom
agent-host-agents-client
Closed

loganj wants to merge 1 commit into
agent-host-pi-splitfrom
agent-host-agents-client

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

Details

  • New AgentsClient type in features/agents/service.ts. It is Agents without what only running agents and plugin entries use: register, present, addTool, tools, wake, handle, relay, core, storage, note, addAttentionSource and attentionProviders.
  • Screens, hooks (features/agents/react.ts), AgentsContext, the Settings and sidebar props, and the huddle composer bridge now take AgentsClient in place of Agents.
  • Plugin entries still get the full ctx.agents. They pass it to their screens, which accept the narrower type.
  • It typechecks with no other change, so no screen uses a runtime-only member today. From now on, a screen that reaches for one fails to compile.

What comes next

  • Later PRs move the screens' synchronous reads (memberships, joinable, interruptible, sessionState, previewRetype, and the type functions called in render) onto data a client can hold. Then a message-port client implements AgentsClient.

Testing

  • tsc --noEmit passes, and Biome passes on the changed files.

🤖 Generated with Claude Code

AgentsClient is Agents without what only running agents and plugin
entries use: registration, tools, wakes, relay access, core memory,
storage and Attention sources. Screens, hooks and the huddle bridge now
take it, so the compiler shows the surface a client in another page must
carry.

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