feat(web): register ssh entry in the new-executor type map

Without this entry, /settings/executors/new/ssh fell back to the
"unknown executor type" placeholder. Extracts the type map into its
own module so the page file stays under the 600-line lint cap.

The SSH-specific form is still TODO and will replace the standard
profile-create form for this type in a follow-up.
This commit is contained in:
José Almeida
2026-05-17 17:07:39 +01:00
parent e7933645fa
commit ff09353177
2 changed files with 44 additions and 31 deletions
@@ -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<string, ExecutorTypeInfo> = {
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.",
},
};
@@ -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 }) {