From 5c9f6a5a61440a6dbe2c5f3814db53e28d9ca135 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Tue, 27 Oct 2026 11:53:26 -0400 Subject: [PATCH] refactor(agents): type screens against an agent type view AgentsClient.types() returns AgentTypeView: what a type shows, its config functions, its provider, models and usage calls, whether it is hosted, and its session scope and change notice. Its runtime (run, runOnce, hosted provisioning, session listing, expose) is no longer in the type screens see. The Agents page, its dialogs and the settings tabs take the view. Type-only: the service still hands screens its registered types. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 Signed-off-by: Logan Johnson --- src/bundled/agents/AgentBrowse.tsx | 4 +-- src/bundled/agents/AgentCreateDialog.tsx | 14 +++++------ src/bundled/agents/AgentDefaults.tsx | 6 ++--- src/bundled/agents/AgentDetails.tsx | 6 ++--- src/bundled/agents/AgentSettingsHost.tsx | 30 +++++++++++----------- src/bundled/agents/AgentTabs.tsx | 4 +-- src/bundled/agents/AgentsPage.tsx | 12 ++++----- src/bundled/agents/ProviderDialog.tsx | 8 +++--- src/features/agents/service.ts | 32 +++++++++++++++++++++++- src/features/agents/tabs.tsx | 4 +-- 10 files changed, 75 insertions(+), 45 deletions(-) diff --git a/src/bundled/agents/AgentBrowse.tsx b/src/bundled/agents/AgentBrowse.tsx index d1805031ff..401acc0311 100644 --- a/src/bundled/agents/AgentBrowse.tsx +++ b/src/bundled/agents/AgentBrowse.tsx @@ -13,7 +13,7 @@ import { AGENT_CATALOG_KIND } from "../../features/agents/catalog-envelope"; import { ModelIcon } from "../../features/agents/ModelPicker"; import type { AgentsClient, - RegisteredAgentType, + AgentTypeView, } from "../../features/agents/service"; import { type SharedAgent, @@ -51,7 +51,7 @@ const pageSize = 200; type Importing = Readonly<{ agents: AgentsClient; /** The types an import can be, which run on this computer. */ - types: readonly RegisteredAgentType[]; + types: readonly AgentTypeView[]; onImported(): void; }>; diff --git a/src/bundled/agents/AgentCreateDialog.tsx b/src/bundled/agents/AgentCreateDialog.tsx index 4d18e60747..4a39b41f19 100644 --- a/src/bundled/agents/AgentCreateDialog.tsx +++ b/src/bundled/agents/AgentCreateDialog.tsx @@ -4,7 +4,7 @@ import { randomAgentAvatar } from "../../features/agents/avatar-packs"; import type { Agent, AgentsClient, - RegisteredAgentType, + AgentTypeView, NewAgent, AgentCreationRequest, AgentUpdateRequest, @@ -37,12 +37,12 @@ const reveal = (element: HTMLElement | null) => { }; /** Use each registered provider's icon in creation and library cards. */ -export function TypeIcon({ type }: { type: RegisteredAgentType | undefined }) { +export function TypeIcon({ type }: { type: AgentTypeView | undefined }) { const Icon = type?.icon ?? RobotIcon; return