Skip to content

refactor(agents): give screens a type's config functions through present - #1727

Closed
loganj wants to merge 2 commits into
agent-host-agents-portfrom
agent-host-type-config
Closed

loganj wants to merge 2 commits into
agent-host-agents-portfrom
agent-host-type-config

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

  • Stacked on feat(agents): serve the agents service to screens over a MessagePort #1725. Screens call some of a type's functions while rendering: summary in the agent list, defaults, adopt and carry in the create dialog, importShared in import, and the retype preview in Settings. Once the agents service runs in another page, screens need those functions on their own side.
  • These functions depend only on config, so each harness now passes the same ones to both of its entries. No behavior changes.

Details

  • New AgentTypeConfig type in features/agents/service.ts: defaults, importShared, adopt, carry, describeMigration, migrationWarning and summary.
  • AgentPresentation accepts them, and the merge takes them from present like the other screen fields.
  • Claude, Codex, goose and Pi keep them in one module-level typeConfig object, which both register and present spread. The functions are moved, not changed.
  • retypePreview(config, source, kind) is the retype preview as a pure function of the agent's config and the two types. The service's previewRetype still uses it through retypePlan. The message-port client from feat(agents): serve the agents service to screens over a MessagePort #1725 will use it to answer previewRetype on the screens' side.
  • docs/plugin-architecture.md describes which functions go to both calls.

Testing

  • New service.test.ts case: a type that passes its config functions only through present shows them on the merged type, and retypePreview gives the expected preview. It fails when the merge does not take config fields from present: I checked by mutating it.
  • tsc --noEmit passes. The agents feature suites and the Claude, Codex, goose, Pi and Agents page suites pass, except the Agents page avatar-picker test, which also fails on the base branch in my local tree.

🤖 Generated with Claude Code

defaults, importShared, adopt, carry, describeMigration,
migrationWarning and summary depend only on config. Each harness now
keeps them in one typeConfig object that both its entries pass, so the
screens' side has them where the service does not run. The retype
preview becomes retypePreview, a pure function of an agent's config
and the two types, which the service still uses.

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