mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 23:00:22 +00:00
fix(browser): honor profile attachOnly for loopback CDP (#31429)
* config(browser): allow profile attachOnly field * config(schema): accept profile attachOnly * browser(config): resolve per-profile attachOnly * browser(runtime): honor profile attachOnly checks * browser(routes): expose profile attachOnly in status * config(labels): add browser profile attachOnly label * config(help): document browser profile attachOnly * test(config): cover profile attachOnly resolution * test(browser): cover profile attachOnly runtime path * test(config): include profile attachOnly help target * changelog: note profile attachOnly override * browser(runtime): prioritize attachOnly over loopback ownership error * test(browser): cover attachOnly ws-failure ownership path
This commit is contained in:
@@ -265,6 +265,7 @@ const TARGET_KEYS = [
|
||||
"browser.noSandbox",
|
||||
"browser.profiles",
|
||||
"browser.profiles.*.driver",
|
||||
"browser.profiles.*.attachOnly",
|
||||
"tools",
|
||||
"tools.allow",
|
||||
"tools.deny",
|
||||
|
||||
@@ -232,6 +232,8 @@ export const FIELD_HELP: Record<string, string> = {
|
||||
"Per-profile CDP websocket URL used for explicit remote browser routing by profile name. Use this when profile connections terminate on remote hosts or tunnels.",
|
||||
"browser.profiles.*.driver":
|
||||
'Per-profile browser driver mode: "clawd" or "extension" depending on connection/runtime strategy. Use the driver that matches your browser control stack to avoid protocol mismatches.',
|
||||
"browser.profiles.*.attachOnly":
|
||||
"Per-profile attach-only override that skips local browser launch and only attaches to an existing CDP endpoint. Useful when one profile is externally managed but others are locally launched.",
|
||||
"browser.profiles.*.color":
|
||||
"Per-profile accent color for visual differentiation in dashboards and browser-related UI hints. Use distinct colors for high-signal operator recognition of active profiles.",
|
||||
"browser.evaluateEnabled":
|
||||
|
||||
@@ -111,6 +111,7 @@ export const FIELD_LABELS: Record<string, string> = {
|
||||
"browser.profiles.*.cdpPort": "Browser Profile CDP Port",
|
||||
"browser.profiles.*.cdpUrl": "Browser Profile CDP URL",
|
||||
"browser.profiles.*.driver": "Browser Profile Driver",
|
||||
"browser.profiles.*.attachOnly": "Browser Profile Attach-only Mode",
|
||||
"browser.profiles.*.color": "Browser Profile Accent Color",
|
||||
tools: "Tools",
|
||||
"tools.allow": "Tool Allowlist",
|
||||
|
||||
@@ -5,6 +5,8 @@ export type BrowserProfileConfig = {
|
||||
cdpUrl?: string;
|
||||
/** Profile driver (default: openclaw). */
|
||||
driver?: "openclaw" | "extension";
|
||||
/** If true, never launch a browser for this profile; only attach. Falls back to browser.attachOnly. */
|
||||
attachOnly?: boolean;
|
||||
/** Profile color (hex). Auto-assigned at creation. */
|
||||
color: string;
|
||||
};
|
||||
|
||||
@@ -272,6 +272,7 @@ export const OpenClawSchema = z
|
||||
cdpPort: z.number().int().min(1).max(65535).optional(),
|
||||
cdpUrl: z.string().optional(),
|
||||
driver: z.union([z.literal("clawd"), z.literal("extension")]).optional(),
|
||||
attachOnly: z.boolean().optional(),
|
||||
color: HexColorSchema,
|
||||
})
|
||||
.strict()
|
||||
|
||||
Reference in New Issue
Block a user