Skip to content

feat(agents): session state and the retype preview over the agents port - #1734

Closed
loganj wants to merge 1 commit into
agent-host-types-portfrom
agent-host-port-session-retype
Closed

loganj wants to merge 1 commit into
agent-host-types-portfrom
agent-host-port-session-retype

Conversation

@loganj

@loganj loganj commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

🤖

Summary

Details

  • sessionState: the first read of an agent and place asks the service for it, and reads as unavailable until the service pushes it. unavailable is the service's own answer for a session it cannot act on, so screens already handle it. After that, each push carries the place's state. The type's session-controls change notice already makes the service push (feat(agents): carry agent types and their handles over the agents port #1733).
  • previewRetype: computed on the screens' side with retypePreview (refactor(agents): give screens a type's config functions through present #1727). It uses the shown agent's config and the two types' config functions, which each type's UI entry also presents in that page. It refuses an unknown agent, a missing type and a hosted type with the service's messages, and returns the config unchanged for the same type.
  • Difference: the service looks the agent up among all its identities, and the client looks it up among the shown community's agents. Both callers (settings and the update review) ask about an agent the screen shows.
  • AgentsPortClient is now AgentsClient & { present }.

Testing

  • service.test.ts, over the real service:
    • Changing an agent's type: with the config functions presented, the client's preview equals the service's for a type change that moves, resets and drops settings, and for the same type. A missing type is refused.
    • Session state: a place reads as unavailable, then idle once pushed, then compacting after the harness's change notice. The test fails if the client does not ask for the place (mutation-checked).
  • tsc --noEmit passes. The agents and Agents page suites pass, except the Agents page avatar-picker test, which also fails on the base branch in this worktree (its node_modules is a symlink).

🤖 Generated with Claude Code

The port client now covers all of AgentsClient. A session's state is
pushed once a screen asks for its place, and reads as unavailable until
then; the harness's own change notice pushes it again. The retype
preview is computed on the screens' side with retypePreview, from the
shown agent's config and the types' config functions, which each type's
UI entry presents there too. It refuses a missing or hosted type as the
service does.

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