feat: configurable control ui base path

This commit is contained in:
Peter Steinberger
2026-01-03 17:54:52 +01:00
parent 822def84d2
commit 1d6de24ab3
18 changed files with 310 additions and 857 deletions

View File

@@ -402,8 +402,10 @@ export type TalkConfig = {
};
export type GatewayControlUiConfig = {
/** If false, the Gateway will not serve the Control UI (/). Default: true. */
/** If false, the Gateway will not serve the Control UI (default /). */
enabled?: boolean;
/** Optional base path prefix for the Control UI (e.g. "/clawdis"). */
basePath?: string;
};
export type GatewayAuthMode = "token" | "password";
@@ -1269,6 +1271,7 @@ export const ClawdisSchema = z.object({
controlUi: z
.object({
enabled: z.boolean().optional(),
basePath: z.string().optional(),
})
.optional(),
auth: z

View File

@@ -81,6 +81,7 @@ const FIELD_LABELS: Record<string, string> = {
"gateway.remote.password": "Remote Gateway Password",
"gateway.auth.token": "Gateway Token",
"gateway.auth.password": "Gateway Password",
"gateway.controlUi.basePath": "Control UI Base Path",
"agent.workspace": "Workspace",
"agent.model": "Default Model",
"ui.seamColor": "Accent Color",
@@ -97,10 +98,13 @@ const FIELD_HELP: Record<string, string> = {
"gateway.auth.token":
"Required for multi-machine access or non-loopback binds.",
"gateway.auth.password": "Required for Tailscale funnel.",
"gateway.controlUi.basePath":
"Optional URL prefix where the Control UI is served (e.g. /clawdis).",
};
const FIELD_PLACEHOLDERS: Record<string, string> = {
"gateway.remote.url": "ws://host:18789",
"gateway.controlUi.basePath": "/clawdis",
};
const SENSITIVE_PATTERNS = [/token/i, /password/i, /secret/i, /api.?key/i];