diff --git a/apps/web/app/settings/executors/new/[type]/executor-types.ts b/apps/web/app/settings/executors/new/[type]/executor-types.ts new file mode 100644 index 0000000000..7798092356 --- /dev/null +++ b/apps/web/app/settings/executors/new/[type]/executor-types.ts @@ -0,0 +1,42 @@ +// Registry of executor types presented in the "new executor profile" flow. +// Keep entries here (not inline in the page) so the page file stays under +// the 600-line lint cap and new types can be added without touching layout. + +export type ExecutorTypeInfo = { + executorId: string; + label: string; + description: string; +}; + +export const EXECUTOR_TYPE_MAP: Record = { + local: { + executorId: "exec-local", + label: "Local", + description: "Runs agents directly in the repository folder.", + }, + worktree: { + executorId: "exec-worktree", + label: "Worktree", + description: "Creates git worktrees for isolated agent sessions.", + }, + local_docker: { + executorId: "exec-local-docker", + label: "Docker", + description: "Runs Docker containers on this machine.", + }, + remote_docker: { + executorId: "exec-remote-docker", + label: "Remote Docker", + description: "Connects to a remote Docker host.", + }, + sprites: { + executorId: "exec-sprites", + label: "Sprites.dev", + description: "Runs agents in Sprites.dev cloud sandboxes.", + }, + ssh: { + executorId: "exec-ssh", + label: "SSH", + description: "Connects to a remote host over SSH and runs agentctl there.", + }, +}; diff --git a/apps/web/app/settings/executors/new/[type]/page.tsx b/apps/web/app/settings/executors/new/[type]/page.tsx index 6a36cb2d9c..0e048dba09 100644 --- a/apps/web/app/settings/executors/new/[type]/page.tsx +++ b/apps/web/app/settings/executors/new/[type]/page.tsx @@ -42,40 +42,11 @@ import { import type { NetworkPolicyRule } from "@/lib/api/domains/settings-api"; import type { Executor, ExecutorType, ProfileEnvVar } from "@/lib/types/http"; +import { EXECUTOR_TYPE_MAP } from "./executor-types"; + const EXECUTORS_ROUTE = "/settings/executors"; const SPRITES_TOKEN_KEY = "SPRITES_API_TOKEN"; -const EXECUTOR_TYPE_MAP: Record< - string, - { executorId: string; label: string; description: string } -> = { - local: { - executorId: "exec-local", - label: "Local", - description: "Runs agents directly in the repository folder.", - }, - worktree: { - executorId: "exec-worktree", - label: "Worktree", - description: "Creates git worktrees for isolated agent sessions.", - }, - local_docker: { - executorId: "exec-local-docker", - label: "Docker", - description: "Runs Docker containers on this machine.", - }, - remote_docker: { - executorId: "exec-remote-docker", - label: "Remote Docker", - description: "Connects to a remote Docker host.", - }, - sprites: { - executorId: "exec-sprites", - label: "Sprites.dev", - description: "Runs agents in Sprites.dev cloud sandboxes.", - }, -}; - const DefaultIcon = EXECUTOR_ICON_MAP.local; function ExecutorTypeIcon({ type }: { type: string }) {