Skip to content

The agent that grows with you

feat: set_theme replaces apply_layout and reports what the desktop applied

alt-glitch72e7085e9e92
diff --git a/agent/agent_init.py b/agent/agent_init.py
index b3e982ca600..632232c100b 100644
--- a/agent/agent_init.py
+++ b/agent/agent_init.py
@@ -2351,7 +2351,7 @@ _CALLBACK_PARAMS = (
"tool_result_metadata_callback",
"thinking_callback", "reasoning_callback", "clarify_callback",
"read_terminal_callback", "read_preview_callback", "drive_preview_callback",
- "read_window_below_callback", "connection_callback", "tour_callback",
+ "read_window_below_callback", "connection_callback", "tour_callback", "theme_callback",
"setup_choose_callback", "setup_beat_callback", "step_callback", "stream_delta_callback", "interim_assistant_callback",
"status_callback", "notice_callback", "notice_clear_callback",
"event_callback", "reaction_callback", "tool_gen_callback",
@@ -2375,7 +2375,9 @@ def init_agent(
clarify_callback: Callable[..., Any] | None = None, read_terminal_callback: Callable[..., Any] | None = None,
read_preview_callback: Callable[..., Any] | None = None, drive_preview_callback: Callable[..., Any] | None = None,
read_window_below_callback: Callable[..., Any] | None = None, connection_callback: Callable[..., Any] | None = None,
- tour_callback: Callable[..., Any] | None = None, setup_choose_callback: Callable[..., Any] | None = None, setup_beat_callback: Callable[..., Any] | None = None, step_callback: Callable[..., Any] | None = None,
+ tour_callback: Callable[..., Any] | None = None, theme_callback: Callable[..., Any] | None = None,
+ setup_choose_callback: Callable[..., Any] | None = None, setup_beat_callback: Callable[..., Any] | None = None,
+ step_callback: Callable[..., Any] | None = None,
stream_delta_callback: Callable[..., Any] | None = None, interim_assistant_callback: Callable[..., Any] | None = None,
tool_gen_callback: Callable[..., Any] | None = None, status_callback: Callable[..., Any] | None = None,
notice_callback: Callable[..., Any] | None = None, notice_clear_callback: Callable[..., Any] | None = None,
diff --git a/agent/inline_tool_executors.py b/agent/inline_tool_executors.py
index 768f284acef..61be920327b 100644
--- a/agent/inline_tool_executors.py
+++ b/agent/inline_tool_executors.py
@@ -286,6 +286,10 @@ _RAW_INLINE_TOOL_EXECUTORS: dict[str, InlineToolExecutor] = {
("text", "text"), ("side", "side"), ("steps", "steps"), ("step_index", "step_index"),
("preset", "preset"),
),
+ "set_theme": _callback_tool(
+ "tools.set_theme_tool", "set_theme_tool", "theme_callback",
+ ("accent", "accent"), ("mode", "mode"), ("layout", "layout"), ("picker", "picker"),
+ ),
# The session id keys the card facts its /initiate-setup turn recorded.
"setup_choose": _tool(
"tools.setup_choose_tool", "setup_choose_tool",
diff --git a/agent/tool_dispatch_helpers.py b/agent/tool_dispatch_helpers.py
index 498034239c2..107635b237a 100644
--- a/agent/tool_dispatch_helpers.py
+++ b/agent/tool_dispatch_helpers.py
@@ -27,7 +27,8 @@ from tools.threat_patterns import scan_for_threats
logger = logging.getLogger(__name__)
# Interactive / user-facing tools never run concurrently: any of these in a batch is a barrier.
-_NEVER_PARALLEL_TOOLS = frozenset({"clarify", "manage_connections", "manage_catalog", "setup_choose", "setup_beat"})
+_NEVER_PARALLEL_TOOLS = frozenset({"clarify", "manage_connections", "manage_catalog", "setup_choose", "setup_beat",
+ "set_theme"})
# Read-only tools with no shared mutable session state.
_PARALLEL_SAFE_TOOLS = frozenset({
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/desktop-bridge.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/desktop-bridge.ts
index 076f38dfd82..227ebecc5e7 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/desktop-bridge.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/desktop-bridge.ts
@@ -1,6 +1,6 @@
import { writeAgentTerminalChunk } from '@/app/right-sidebar/terminal/agent-terminal-stream'
import { closeAgentTerminalByProc } from '@/app/right-sidebar/terminal/terminals'
-import { applyDesktopLayoutPreset, revealDesktopPane } from '@/store/pane-focus'
+import { revealDesktopPane } from '@/store/pane-focus'
import { reactionOverlayScope, recordAgentReaction } from '@/store/reactions-local'
import { setMessages } from '@/store/session'
import { $tipsEnabled, type ActiveTip, agentTipId, showTip } from '@/store/tips'
@@ -54,16 +54,6 @@ const DESKTOP_BRIDGE_HANDLERS: Record<string, (ctx: GatewayEventContext) => void
}
},
- 'layout.apply': ({ payload, isActiveEvent }) => {
- // Agent applied a layout preset via the desktop-gated apply_layout
- // tool. Same contract as pane.reveal: active session only, and the
- // preset resolves against the SAME layouts registry the picker reads,
- // so core, plugin, and user presets are all addressable.
- if (isActiveEvent) {
- applyDesktopLayoutPreset(typeof payload?.preset === 'string' ? payload.preset : '')
- }
- },
-
'message.reaction': ({ payload, isActiveEvent, fromActiveSource, event }) => {
// The agent reacted to a message via the desktop-gated
// react_to_message tool. Already persisted — this only paints it now
@@ -131,7 +121,7 @@ const DESKTOP_BRIDGE_HANDLERS: Record<string, (ctx: GatewayEventContext) => void
}
/** Desktop-surface bridge events: agent terminal streaming, tips, pane
- * reveal, layouts and message reactions. The read-back REQUESTS the agent
+ * reveal and message reactions. The read-back REQUESTS the agent
* blocks on (terminal/preview/window/tour) live in `server-requests.ts`. */
export function handleDesktopBridgeEvent(ctx: GatewayEventContext): boolean {
if (!Object.hasOwn(DESKTOP_BRIDGE_HANDLERS, ctx.event.type)) {
diff --git a/apps/desktop/src/components/onboarding-chat/intro.ts b/apps/desktop/src/components/onboarding-chat/intro.ts
index 37254efc7f4..a4ea30023fa 100644
--- a/apps/desktop/src/components/onboarding-chat/intro.ts
+++ b/apps/desktop/src/components/onboarding-chat/intro.ts
@@ -109,7 +109,7 @@ export function leaveIntro(): void {
}
}
-/** A layout pick (the setup card, `apply_layout`, the layout picker) ends the intro and keeps the pick. */
+/** A layout pick (the setup card, `set_theme`, the layout picker) ends the intro and keeps the pick. */
function leaveIntroOnLayout(): void {
if (endIntroView(true)) {
leaveGuide()
diff --git a/apps/desktop/src/components/pane-shell/tree/presets.ts b/apps/desktop/src/components/pane-shell/tree/presets.ts
index 5e6cd13b10e..cb27fdd757f 100644
--- a/apps/desktop/src/components/pane-shell/tree/presets.ts
+++ b/apps/desktop/src/components/pane-shell/tree/presets.ts
@@ -27,7 +27,7 @@ export const LAYOUTS_AREA = 'layouts'
*/
export interface LayoutPresetSpec extends Tiered {
id: string
- /** `false` keeps a preset off every picker and out of `apply_layout`; only its owner applies it. */
+ /** `false` keeps a preset off every picker and out of `set_theme`; only its owner applies it. */
listed?: false
order: number
resting?: readonly string[]
diff --git a/apps/desktop/src/lib/chat-messages/types.ts b/apps/desktop/src/lib/chat-messages/types.ts
index 9edbc440d4d..0a2844b3249 100644
--- a/apps/desktop/src/lib/chat-messages/types.ts
+++ b/apps/desktop/src/lib/chat-messages/types.ts
@@ -165,8 +165,6 @@ export type GatewayEventPayload = {
kind?: string
// pane.reveal (agent focusing a desktop pane via the focus_pane tool)
pane?: string
- // layout.apply (agent applying a layout preset via the apply_layout tool)
- preset?: string
// tour.request (tour tool — agent-guided driver.js walkthrough). `action`
// and `steps` name the tour verb and step list; `surface` picks the app's
// own DOM vs the preview pane's guest page. tip.show (tip tool — one accent
diff --git a/apps/desktop/src/store/pane-focus.ts b/apps/desktop/src/store/pane-focus.ts
index f6470dbc0ac..a1a10801bc7 100644
--- a/apps/desktop/src/store/pane-focus.ts
+++ b/apps/desktop/src/store/pane-focus.ts
@@ -52,7 +52,7 @@ export function revealDesktopPane(pane: string): boolean {
/** Apply a layout preset by id, resolved against the layouts contribution
* registry — the SAME list the layout picker renders, so core presets
* (default/focus/terminal-deck/quad), plugin presets, and user-saved presets
- * are all addressable by the backend `apply_layout` tool. Returns false for
+ * are all addressable by the backend `set_theme` tool. Returns false for
* an unknown id. */
export function applyDesktopLayoutPreset(preset: string): boolean {
if (!preset) {
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts
index d2292a3d438..609aa40509b 100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@ -4706,6 +4706,31 @@ export interface TourStep {
}
/** Which built-in tour ``start`` without steps runs. */
export type TourPreset = 'quick' | 'full'
+/** ``tools/set_theme_tool.py`` values; accent is a swatch id, ``theme`` or ``#rrggbb``. */
+export interface ThemeApplyRequestParams {
+ session_id: string
+ accent?: string | null
+ mode?: ThemeMode | null
+ layout?: string | null
+}
+export type ThemeMode = 'light' | 'dark' | 'system'
+export interface ThemePickRequestParams {
+ session_id: string
+ picker: ThemePicker
+}
+export type ThemePicker = 'accent' | 'layout'
+/** ``picked`` once the user chose (already applied); ``cancelled`` when the card was dismissed. A response with neither is a cancel. */
+export interface ThemePickResult {
+ picked?: ThemeValues | null
+ said?: string | null
+ cancelled?: boolean | null
+}
+/** What the renderer applied. ``accent`` is a swatch id, ``custom:#rrggbb``, or null for the theme's own. */
+export interface ThemeValues {
+ accent?: string | null
+ mode?: ThemeMode | null
+ layout?: string | null
+}
export interface DisplayInstallSudoParams {
session_id: string
profile_key: string
@@ -5056,11 +5081,6 @@ export interface PreviewOpenPayload {
export interface PreviewClosePayload {
url?: string
}
-/** ``tools/apply_layout_tool.py``. */
-export interface LayoutApplyPayload {
- preset: string
- [key: string]: unknown
-}
/** ``tools/focus_pane_tool.py``. */
export interface PaneRevealPayload {
pane: string
@@ -5964,6 +5984,10 @@ export interface ServerRequestMap {
sudo: { params: SudoRequestParams; result: ValueResult }
/** Read the visible in-app terminal buffer (JSON text answer). */
'terminal.read': { params: ReadRangeRequestParams; result: ValueResult }
+ /** Apply set_theme values in the window showing the session (JSON text answer). */
+ 'theme.apply': { params: ThemeApplyRequestParams; result: ValueResult }
+ /** Show an accent or layout picker card in the chat and wait for the pick. */
+ 'theme.pick': { params: ThemePickRequestParams; result: ThemePickResult }
/** Drive a guided tour highlight in the desktop renderer. */
tour: { params: TourRequestParams; result: ValueResult }
/** A one-time / 2FA code the user reads from their device. */
@@ -5987,6 +6011,8 @@ export const SERVER_REQUEST_METHODS = [
'setup_choose',
'sudo',
'terminal.read',
+ 'theme.apply',
+ 'theme.pick',
'tour',
'vault.code',
'vault.save_login',
@@ -6034,8 +6060,6 @@ export interface BackendGatewayEventMap {
'free_tier.challenge': FreeTierChallengePayload
/** First frame of a connection: the resolved skin, the change-event capability and the replay epoch. */
'gateway.ready': GatewayReadyPayload
- /** Apply a named desktop layout preset. */
- 'layout.apply': LayoutApplyPayload
/** The turn ended: final text, usage and outcome. */
'message.complete': MessageCompletePayload
/** One streamed chunk of the assistant reply. */
@@ -6172,7 +6196,6 @@ export const GATEWAY_EVENT_TYPES = [
'error',
'free_tier.challenge',
'gateway.ready',
- 'layout.apply',
'message.complete',
'message.delta',
'message.interim',
diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.json
index 8174177075d..a5eaccf781e 100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@ -17226,21 +17226,6 @@
"title": "LanguageOption",
"type": "object"
},
- "LayoutApplyPayload": {
- "additionalProperties": true,
- "description": "``tools/apply_layout_tool.py``.",
- "properties": {
- "preset": {
- "title": "Preset",
- "type": "string"
- }
- },
- "required": [
- "preset"
- ],
- "title": "LayoutApplyPayload",
- "type": "object"
- },
"LearningAxis": {
"additionalProperties": false,
"properties": {
@@ -37690,6 +37675,177 @@
"title": "TerminalResizeResult",
"type": "object"
},
+ "ThemeApplyRequestParams": {
+ "additionalProperties": false,
+ "description": "``tools/set_theme_tool.py`` values; accent is a swatch id, ``theme`` or ``#rrggbb``.",
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "accent": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Accent"
+ },
+ "mode": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ThemeMode"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "layout": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Layout"
+ }
+ },
+ "required": [
+ "session_id"
+ ],
+ "title": "ThemeApplyRequestParams",
+ "type": "object"
+ },
+ "ThemeMode": {
+ "enum": [
+ "light",
+ "dark",
+ "system"
+ ],
+ "title": "ThemeMode",
+ "type": "string"
+ },
+ "ThemePickRequestParams": {
+ "additionalProperties": false,
+ "properties": {
+ "session_id": {
+ "title": "Session Id",
+ "type": "string"
+ },
+ "picker": {
+ "$ref": "#/components/schemas/ThemePicker"
+ }
+ },
+ "required": [
+ "session_id",
+ "picker"
+ ],
+ "title": "ThemePickRequestParams",
+ "type": "object"
+ },
+ "ThemePickResult": {
+ "additionalProperties": false,
+ "description": "``picked`` once the user chose (already applied); ``cancelled`` when the card was dismissed. A response\nwith neither is a cancel.",
+ "properties": {
+ "picked": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ThemeValues"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "said": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Said"
+ },
+ "cancelled": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Cancelled"
+ }
+ },
+ "title": "ThemePickResult",
+ "type": "object"
+ },
+ "ThemePicker": {
+ "enum": [
+ "accent",
+ "layout"
+ ],
+ "title": "ThemePicker",
+ "type": "string"
+ },
+ "ThemeValues": {
+ "additionalProperties": false,
+ "description": "What the renderer applied. ``accent`` is a swatch id, ``custom:#rrggbb``, or null for the theme's own.",
+ "properties": {
+ "accent": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Accent"
+ },
+ "mode": {
+ "anyOf": [
+ {
+ "$ref": "#/components/schemas/ThemeMode"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null
+ },
+ "layout": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Layout"
+ }
+ },
+ "title": "ThemeValues",
+ "type": "object"
+ },
"TipShowPayload": {
"additionalProperties": false,
"description": "``tools/tip_tool.py``.",
@@ -41316,6 +41472,42 @@
}
}
},
+ {
+ "name": "theme.apply",
+ "summary": "Apply set_theme values in the window showing the session (JSON text answer).",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ThemeApplyRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ValueResult"
+ }
+ }
+ },
+ {
+ "name": "theme.pick",
+ "summary": "Show an accent or layout picker card in the chat and wait for the pick.",
+ "params": [
+ {
+ "name": "params",
+ "schema": {
+ "$ref": "#/components/schemas/ThemePickRequestParams"
+ }
+ }
+ ],
+ "result": {
+ "name": "result",
+ "schema": {
+ "$ref": "#/components/schemas/ThemePickResult"
+ }
+ }
+ },
{
"name": "tour",
"summary": "Drive a guided tour highlight in the desktop renderer.",
@@ -41636,18 +41828,6 @@
}
]
},
- {
- "name": "layout.apply",
- "summary": "Apply a named desktop layout preset.",
- "params": [
- {
- "name": "payload",
- "schema": {
- "$ref": "#/components/schemas/LayoutApplyPayload"
- }
- }
- ]
- },
{
"name": "message.complete",
"summary": "The turn ended: final text, usage and outcome.",
diff --git a/evals/core_tool_deferral/tasks.py b/evals/core_tool_deferral/tasks.py
index 24b63e57c55..9e0244b7082 100644
--- a/evals/core_tool_deferral/tasks.py
+++ b/evals/core_tool_deferral/tasks.py
@@ -4,7 +4,7 @@ Covers all 18 deferred tools:
computer_use, session_search, clarify, image_generate, todo_list,
process_manage, cronjob_manage, drive_preview, gui_tour, desktop_preview,
annotate_preview, show_tip, desktop_project, close_terminal,
- apply_layout, read_terminal, read_window_below, focus_pane
+ set_theme, read_terminal, read_window_below, focus_pane
plus an eager-surface control and a false-discovery distractor.
Each task: id, prompt, fixtures(workspace), grade(ctx) -> (score 0..1, notes).
@@ -235,10 +235,10 @@ def g_tour(ctx):
def g_layout(ctx):
score, notes = 0.0, []
- if _called(ctx, "apply_layout") or _events(ctx, "layout"):
+ if _called(ctx, "set_theme") or _cb(ctx, "theme"):
score += 0.25
else:
- notes.append("apply_layout never used")
+ notes.append("set_theme never used")
if _called(ctx, "focus_pane") or _events(ctx, "focus"):
score += 0.2
else:
diff --git a/evals/core_tool_deferral/worker.py b/evals/core_tool_deferral/worker.py
index 9c8bbe9f38e..6e5a261fbf5 100644
--- a/evals/core_tool_deferral/worker.py
+++ b/evals/core_tool_deferral/worker.py
@@ -116,6 +116,11 @@ def clarify_cb(questions):
answers[entry["qid"]] = match or ans
return {"answers": answers, "outcome": "submitted"}
+def theme_cb(payload):
+ CALLBACK_LOG.append({"name": "theme", "payload": payload})
+ return {"success": True, "applied": {k: v for k, v in payload.items() if k != "picker"}}
+
+
def tour_cb(payload):
CALLBACK_LOG.append({"name": "tour", "payload": payload})
action = payload.get("action", "")
@@ -224,6 +229,7 @@ agent = AIAgent(
max_iterations=40,
clarify_callback=clarify_cb,
tour_callback=tour_cb,
+ theme_callback=theme_cb,
read_terminal_callback=read_terminal_cb,
read_preview_callback=read_preview_cb,
drive_preview_callback=drive_preview_cb,
diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.py
index 313f67146e9..76b6fbd23a2 100644
--- a/hermes_cli/config_defaults.py
+++ b/hermes_cli/config_defaults.py
@@ -2021,7 +2021,7 @@ DEFAULT_CONFIG = {
# Desktop GUI surface (desktop_ui, project and catalog toolsets)
"drive_preview", "gui_tour", "desktop_preview", "annotate_preview", "manage_catalog",
"show_tip", "desktop_project", "close_terminal",
- "apply_layout", "read_terminal", "read_window_below", "focus_pane",
+ "set_theme", "read_terminal", "read_window_below", "focus_pane",
],
},
# Remote connector discovery/lifecycle through the Nous tool gateway.
diff --git a/run_agent.py b/run_agent.py
index 97c7d7184b2..f3352c10ab7 100644
--- a/run_agent.py
+++ b/run_agent.py
@@ -254,7 +254,9 @@ class AIAgent(
read_terminal_callback: Callable[..., Any] | None = None, read_preview_callback: Callable[..., Any] | None = None,
drive_preview_callback: Callable[..., Any] | None = None, read_window_below_callback: Callable[..., Any] | None = None,
connection_callback: Callable[..., Any] | None = None, tour_callback: Callable[..., Any] | None = None,
- setup_choose_callback: Callable[..., Any] | None = None, setup_beat_callback: Callable[..., Any] | None = None, step_callback: Callable[..., Any] | None = None,
+ theme_callback: Callable[..., Any] | None = None,
+ setup_choose_callback: Callable[..., Any] | None = None, setup_beat_callback: Callable[..., Any] | None = None,
+ step_callback: Callable[..., Any] | None = None,
stream_delta_callback: Callable[..., Any] | None = None, interim_assistant_callback: Callable[..., Any] | None = None,
tool_gen_callback: Callable[..., Any] | None = None, status_callback: Callable[..., Any] | None = None,
notice_callback: Callable[..., Any] | None = None, notice_clear_callback: Callable[..., Any] | None = None,
diff --git a/tests/fixtures/prompt_surface/tools/tool_search.desktop.claude.json b/tests/fixtures/prompt_surface/tools/tool_search.desktop.claude.json
index fe8573d0ba6..f5c269e95e6 100644
--- a/tests/fixtures/prompt_surface/tools/tool_search.desktop.claude.json
+++ b/tests/fixtures/prompt_surface/tools/tool_search.desktop.claude.json
@@ -1,5 +1,5 @@
{
- "description": "Search 19 additional tools that are loaded on demand. Send one keyword query per capability you need; returns matching tool names and descriptions. Then `tool_describe` loads schemas and `tool_call` invokes. Tools already in your tool list need no search. `connectors__` names are tools of the user's app accounts (Gmail, Linear, ...); `manage_connections` checks or authorizes an account.\n\nEvery tool listed below exists: never call it unavailable, and go straight to `tool_describe` when you see the exact name.\n\nDeferred tool catalog (call schemas via `tool_describe`, invoke via `tool_call`):\nbrowser tools (1):\n- browser_vault: Use saved logins, passwords, credentials, cards and…\ncatalog tools (1):\n- manage_catalog: Find and install Hermes catalog plugins and hub skills for…\ncomputer_use tools (1):\n- computer_use: Drive the desktop via cua-driver — screenshots, mouse…\ncronjob tools (1):\n- cronjob_manage: Manage scheduled cron jobs: action='create' schedules a job…\ndesktop_ui tools (10):\n- annotate_preview: Highlight elements on the preview-pane page, lastingly…\n- apply_layout: Apply a saved layout preset to the Hermes desktop app when…\n- close_terminal: Hide a background process's terminal tab (process keeps…\n- desktop_preview: Open, close, or read the preview pane beside the chat.\n- drive_preview: Use the web page open in the desktop preview pane (the one…\n- focus_pane: Reveal and focus a Hermes desktop pane when the user asks…\n- gui_tour: Guided tour in the desktop GUI: dim the screen, highlight…\n- read_terminal: Read the in-app terminal pane beside this chat.\n- read_window_below: Identify the app window directly behind the Hermes desktop…\n- show_tip: Point at one thing in the desktop UI with a small arrow…\nimage_gen tools (1):\n- image_generate: Generate high-quality images from text prompts, or edit /…\nproject tools (1):\n- desktop_project: Create or switch desktop Projects (named workspaces).\nsession_search tools (1):\n- session_search: Recall past conversations: search or read old Hermes…\nterminal tools (1):\n- process_manage: Poll, wait on, or kill background terminal processes (from…\ntodo tools (1):\n- todo_list: Track a task list for multi-step work (3+ steps).",
+ "description": "Search 19 additional tools that are loaded on demand. Send one keyword query per capability you need; returns matching tool names and descriptions. Then `tool_describe` loads schemas and `tool_call` invokes. Tools already in your tool list need no search. `connectors__` names are tools of the user's app accounts (Gmail, Linear, ...); `manage_connections` checks or authorizes an account.\n\nEvery tool listed below exists: never call it unavailable, and go straight to `tool_describe` when you see the exact name.\n\nDeferred tool catalog (call schemas via `tool_describe`, invoke via `tool_call`):\nbrowser tools (1):\n- browser_vault: Use saved logins, passwords, credentials, cards and…\ncatalog tools (1):\n- manage_catalog: Find and install Hermes catalog plugins and hub skills for…\ncomputer_use tools (1):\n- computer_use: Drive the desktop via cua-driver — screenshots, mouse…\ncronjob tools (1):\n- cronjob_manage: Manage scheduled cron jobs: action='create' schedules a job…\ndesktop_ui tools (10):\n- annotate_preview: Highlight elements on the preview-pane page, lastingly…\n- close_terminal: Hide a background process's terminal tab (process keeps…\n- desktop_preview: Open, close, or read the preview pane beside the chat.\n- drive_preview: Use the web page open in the desktop preview pane (the one…\n- focus_pane: Reveal and focus a Hermes desktop pane when the user asks…\n- gui_tour: Guided tour in the desktop GUI: dim the screen, highlight…\n- read_terminal: Read the in-app terminal pane beside this chat.\n- read_window_below: Identify the app window directly behind the Hermes desktop…\n- set_theme: Change how the Hermes desktop app looks: accent colour…\n- show_tip: Point at one thing in the desktop UI with a small arrow…\nimage_gen tools (1):\n- image_generate: Generate high-quality images from text prompts, or edit /…\nproject tools (1):\n- desktop_project: Create or switch desktop Projects (named workspaces).\nsession_search tools (1):\n- session_search: Recall past conversations: search or read old Hermes…\nterminal tools (1):\n- process_manage: Poll, wait on, or kill background terminal processes (from…\ntodo tools (1):\n- todo_list: Track a task list for multi-step work (3+ steps).",
"name": "tool_search",
"parameters": {
"properties": {
diff --git a/tests/tools/test_apply_layout_tool.py b/tests/tools/test_apply_layout_tool.py
deleted file mode 100644
index f6c321399bc..00000000000
--- a/tests/tools/test_apply_layout_tool.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Tests for the GUI-surface ``apply_layout`` tool."""
-
-import json
-
-import pytest
-
-from tools import apply_layout_tool as al, desktop_ui
-from tools.registry import registry
-
[email protected](autouse=True)
-def _reset_emitter():
- desktop_ui.set_emitter(None)
- yield
- desktop_ui.set_emitter(None)
-
-def test_lives_in_the_gui_surface_toolset(monkeypatch):
- """Surface eligibility is the toolset's job, not a process env var — the
- desktop client can be driving a remote/cloud backend that never sees
- HERMES_DESKTOP."""
- monkeypatch.delenv("HERMES_DESKTOP", raising=False)
- entry = registry.get_entry("apply_layout")
-
- assert entry is not None
- assert entry.toolset == "desktop_ui"
- assert entry.check_fn is None
-
-def test_emits_layout_apply():
- calls = []
- desktop_ui.set_emitter(lambda sid, event, payload: calls.append((event, payload)))
-
- out = json.loads(al.apply_layout_tool(" focus "))
-
- assert out == {"success": True, "preset": "focus"}
- assert calls == [("layout.apply", {"preset": "focus"})]
-
-def test_preset_ids_pass_through_unmapped():
- """Ids are free-form: plugin/user presets must not be filtered by an enum
- the backend can't know about."""
- calls = []
- desktop_ui.set_emitter(lambda sid, event, payload: calls.append((event, payload)))
-
- out = json.loads(al.apply_layout_tool("user-research-cockpit"))
-
- assert out["success"] is True
- assert calls[0][1] == {"preset": "user-research-cockpit"}
-
-def test_empty_preset_is_an_error():
- desktop_ui.set_emitter(lambda sid, event, payload: None)
-
- out = al.apply_layout_tool(" ")
-
- assert "preset is required" in out
diff --git a/tests/tools/test_set_theme_tool.py b/tests/tools/test_set_theme_tool.py
new file mode 100644
index 00000000000..9aa0e310062
--- /dev/null
+++ b/tests/tools/test_set_theme_tool.py
@@ -0,0 +1,39 @@
+"""``set_theme``: the model hears what the desktop applied, never a success it assumed."""
+
+import json
+
+from tools.registry import discover_builtin_tools, registry
+
+
+def _dispatch(args: dict, callback) -> dict:
+ discover_builtin_tools()
+ result = registry.dispatch("set_theme", args, callback=callback)
+ assert isinstance(result, str)
+ return json.loads(result)
+
+
+def test_unknown_values_return_the_available_ids_without_reaching_the_renderer():
+ calls = []
+
+ accent = _dispatch({"accent": "chartreuse"}, calls.append)
+ mode = _dispatch({"mode": "dim"}, calls.append)
+
+ assert accent["success"] is False and "violet" in accent["available"] and "theme" in accent["available"]
+ assert mode["success"] is False and mode["available"] == ["light", "dark", "system"]
+ assert calls == []
+
+
+def test_the_renderer_answer_is_the_result_for_values_and_pickers():
+ sent = []
+
+ def renderer(payload):
+ sent.append(payload)
+ return ({"success": True, "picked": {"layout": "terminal-deck"}} if "picker" in payload
+ else {"success": False, "error": "Unknown layout", "available": ["sidebar-left"]})
+
+ applied = _dispatch({"layout": " cockpit ", "accent": "#8A2BE2"}, renderer)
+ picked = _dispatch({"picker": "layout"}, renderer)
+
+ assert sent == [{"layout": "cockpit", "accent": "#8A2BE2"}, {"picker": "layout"}]
+ assert applied == {"success": False, "error": "Unknown layout", "available": ["sidebar-left"]}
+ assert picked == {"success": True, "picked": {"layout": "terminal-deck"}}
diff --git a/tests/tools/test_tool_search.py b/tests/tools/test_tool_search.py
index 2a029e5a6d3..779d9bf8b6b 100644
--- a/tests/tools/test_tool_search.py
+++ b/tests/tools/test_tool_search.py
@@ -118,7 +118,7 @@ class TestClassification:
from tools.tool_search import ToolSearchConfig, assemble_tool_defs
discover_builtin_tools()
- names = {"read_window_below", "apply_layout", "project_list"}
+ names = {"read_window_below", "set_theme", "project_list"}
assembled = assemble_tool_defs(
[_td(name, f"GUI {name}") for name in names],
context_length=200_000,
diff --git a/tests/tui_gateway/test_theme_bridge.py b/tests/tui_gateway/test_theme_bridge.py
new file mode 100644
index 00000000000..d1db26699fd
--- /dev/null
+++ b/tests/tui_gateway/test_theme_bridge.py
@@ -0,0 +1,31 @@
+"""``set_theme`` picker bridge: the model can tell a pick, a dismissed card and an expired one apart.
+See tui_gateway.server._theme_request."""
+
+from types import SimpleNamespace
+
+import pytest
+
+from tui_gateway import server, server_requests
+
+
[email protected](("answer", "elapsed", "result"), [
+ ({"picked": {"accent": "violet"}}, 4.0, {"success": True, "picked": {"accent": "violet"}}),
+ ({"said": " make it pink "}, 4.0, {"said": "make it pink"}),
+ ({"cancelled": True}, 4.0, {"cancelled": True}),
+ (None, 4.0, {"cancelled": True}),
+ (None, server._THEME_PICK_TIMEOUT_S, {"timed_out": True}),
+])
+def test_pick_outcomes(monkeypatch, answer, elapsed, result):
+ clock = iter((0.0, elapsed))
+ sent = []
+
+ def fake_send(method, sid, params, *, timeout, **_kw):
+ sent.append((method, sid, params, timeout))
+ return answer
+
+ monkeypatch.setattr(server_requests, "send", fake_send)
+ monkeypatch.setattr(server, "time", SimpleNamespace(monotonic=lambda: next(clock)))
+ monkeypatch.setitem(server._sessions, "s1", {})
+
+ assert server._theme_request("s1", {"picker": "accent"}) == result
+ assert sent == [("theme.pick", "s1", {"picker": "accent"}, server._THEME_PICK_TIMEOUT_S)]
diff --git a/tools/apply_layout_tool.py b/tools/apply_layout_tool.py
deleted file mode 100644
index 167bca418c4..00000000000
--- a/tools/apply_layout_tool.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""Apply a layout preset in the Hermes desktop GUI (``layout.apply`` via ``desktop_ui``).
-
-The renderer resolves the id against its layouts registry (core, plugin and user
-presets are one list); only the active window's session acts, so a background turn
-never rearranges the desktop. Preset ids are free-form on purpose. The renderer
-answers with the applied id/title, or the available ids when unknown, so the model
-can self-correct without a registry-listing tool.
-"""
-
-from tools import desktop_ui
-from tools.registry import registry, tool_error
-
-
-def apply_layout_tool(preset: str) -> str:
- """Ask the desktop GUI to apply layout preset ``preset``."""
- name = (preset or "").strip()
- if not name:
- return tool_error("preset is required — a layout preset id, e.g. 'default' or 'focus'.")
- return desktop_ui.emit_or_error(
- "layout.apply", {"preset": name}, f"Failed to apply layout '{name}': ",
- "Layout apply is only available in the Hermes desktop app.", {"success": True, "preset": name},
- )
-
-
-APPLY_LAYOUT_SCHEMA = {
- "name": "apply_layout",
- "description": (
- "Apply a saved layout preset to the Hermes desktop app when the user "
- "asks to rearrange the workspace. Built-ins: default (chat + "
- "sidebars), focus (chat only), terminal-deck, quad; plugin/user "
- "presets by id. To reveal ONE pane, use focus_pane instead."
- ),
- "parameters": {
- "type": "object",
- "properties": {
- "preset": {
- "type": "string",
- "description": "Layout preset id to apply (e.g. 'default', 'focus', 'terminal-deck', 'quad', or a user/plugin preset id).",
- },
- },
- "required": ["preset"],
- },
-}
-
-
-registry.register(
- name="apply_layout",
- toolset="desktop_ui",
- schema=APPLY_LAYOUT_SCHEMA,
- handler=lambda args, **kw: apply_layout_tool(preset=args.get("preset", "")),
- emoji="🧱",
-)
diff --git a/tools/set_theme_tool.py b/tools/set_theme_tool.py
new file mode 100644
index 00000000000..045f7a5fe85
--- /dev/null
+++ b/tools/set_theme_tool.py
@@ -0,0 +1,97 @@
+"""Set the Hermes desktop app's accent colour, light/dark mode and layout, or show a picker card.
+
+The renderer applies the values and answers with what it applied, so the model reports what the user
+sees: an unknown layout preset, a session that is not on screen and an absent desktop window all come
+back as errors. Swatch ids and preset ids are validated again in the renderer, which also knows the
+user's own saved layouts.
+"""
+
+import json
+import re
+from typing import Callable, Optional
+
+from tools.registry import registry, tool_error
+
+ACCENT_SWATCHES = ("mono", "green", "cyan", "nous", "violet", "pink", "red", "orange")
+# The theme's own accent; the renderer stores it as "no accent pick".
+THEME_ACCENT = "theme"
+MODES = ("light", "dark", "system")
+PICKERS = ("accent", "layout")
+# The bundled presets (apps/desktop/src/app/contrib/layout-presets.ts). Simple mode shows only the
+# first two; applying an Advanced preset switches the app to Advanced mode.
+SIMPLE_LAYOUTS = ("sidebar-left", "sidebar-right")
+ADVANCED_LAYOUTS = ("default", "basic", "focus", "terminal-deck", "quad")
+
+_HEX = re.compile(r"^#[0-9a-fA-F]{6}$")
+
+
+def _accent_error(accent: str) -> Optional[str]:
+ if accent in ACCENT_SWATCHES or accent == THEME_ACCENT or _HEX.match(accent):
+ return None
+ return json.dumps({"success": False, "error": f"Unknown accent {accent!r}: use a swatch id, 'theme' or #rrggbb.",
+ "available": [*ACCENT_SWATCHES, THEME_ACCENT]}, ensure_ascii=False)
+
+
+def set_theme_tool(accent: Optional[str] = None, mode: Optional[str] = None, layout: Optional[str] = None,
+ picker: Optional[str] = None, callback: Optional[Callable[[dict], dict]] = None) -> str:
+ """Apply the given appearance values, or show one picker card and wait for the pick."""
+ if callback is None:
+ return tool_error("set_theme is only available in the Hermes desktop app.")
+ values = {key: value.strip() for key, value in (("accent", accent), ("mode", mode), ("layout", layout))
+ if isinstance(value, str) and value.strip()}
+ if picker is not None:
+ if picker not in PICKERS:
+ return tool_error(f"picker must be one of: {', '.join(PICKERS)}.")
+ if values:
+ return tool_error("picker shows a card for the user to choose; pass picker alone, without values.")
+ return json.dumps(callback({"picker": picker}), ensure_ascii=False)
+ if not values:
+ return tool_error("Pass at least one of accent, mode or layout, or picker to let the user choose.")
+ if "mode" in values and values["mode"] not in MODES:
+ return json.dumps({"success": False, "error": f"Unknown mode {values['mode']!r}.", "available": list(MODES)},
+ ensure_ascii=False)
+ if "accent" in values and (error := _accent_error(values["accent"])):
+ return error
+ return json.dumps(callback(values), ensure_ascii=False)
+
+
+SET_THEME_SCHEMA = {
+ "name": "set_theme",
+ "description": (
+ "Change how the Hermes desktop app looks: accent colour, light/dark mode, layout. Pass the values "
+ "to apply them now; the result says what was applied. Pass picker instead to show the user an "
+ "accent or layout picker card in the chat and wait for their pick. To reveal ONE pane, use "
+ "focus_pane instead."
+ ),
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "accent": {
+ "type": "string",
+ "description": (f"A swatch id ({', '.join(ACCENT_SWATCHES)}), 'theme' for the theme's own "
+ "accent, or a hex colour '#rrggbb'."),
+ },
+ "mode": {"type": "string", "enum": list(MODES)},
+ "layout": {
+ "type": "string",
+ "description": (f"Layout preset id. Simple mode: {', '.join(SIMPLE_LAYOUTS)}. Advanced mode: "
+ f"{', '.join(ADVANCED_LAYOUTS)}. The user's saved layouts by id."),
+ },
+ "picker": {
+ "type": "string",
+ "enum": list(PICKERS),
+ "description": "Show that picker card and wait for the user (up to 5 minutes). Pass it alone.",
+ },
+ },
+ },
+}
+
+
+registry.register(
+ name="set_theme",
+ toolset="desktop_ui",
+ schema=SET_THEME_SCHEMA,
+ handler=lambda args, **kw: set_theme_tool(
+ callback=kw.get("callback"), **{k: args.get(k) for k in ("accent", "mode", "layout", "picker")}),
+ emoji="🎨",
+)
diff --git a/toolsets.py b/toolsets.py
index 3b7f3a18b48..364f492aefc 100644
--- a/toolsets.py
+++ b/toolsets.py
@@ -138,10 +138,10 @@ TOOLSETS = {
# process env var, which is blind to a desktop client on a remote backend.
"desktop_ui": _ts(
"Desktop GUI affordances — in-app terminal/browser panes, pane focus, "
- "reactions (GUI sessions only)",
+ "reactions, appearance (GUI sessions only)",
["read_terminal", "close_terminal", "desktop_preview", "drive_preview",
"annotate_preview", "read_window_below", "focus_pane", "react_to_message",
- "gui_tour", "show_tip"],
+ "gui_tour", "show_tip", "set_theme"],
),
"setup": _ts("Onboarding-only surface for the setup profile: question and picker cards", ["setup_choose"],
platforms=frozenset({"desktop"})),
diff --git a/tui_gateway/agent_callbacks.py b/tui_gateway/agent_callbacks.py
index 5bf5d475196..d0d6acff4c1 100644
--- a/tui_gateway/agent_callbacks.py
+++ b/tui_gateway/agent_callbacks.py
@@ -181,6 +181,8 @@ def _agent_cbs(sid: str) -> dict:
"connection_callback": lambda payload: _emit("connection.request", sid, dict(payload)) and None,
# tour (desktop GUI): renderer drives driver.js and answers the ``tour`` request.
"tour_callback": lambda payload: _tour_request(sid, payload),
+ # set_theme (desktop GUI): theme.apply with the tour probe ladder, or a theme.pick card.
+ "theme_callback": lambda payload: _theme_request(sid, payload),
"setup_choose_callback": lambda payload: _setup_choose_request(sid, payload),
"setup_beat_callback": lambda payload: _setup_beat_request(sid, payload)}
diff --git a/tui_gateway/contracts/events.py b/tui_gateway/contracts/events.py
index b9b012e67b1..2711afbecbf 100644
--- a/tui_gateway/contracts/events.py
+++ b/tui_gateway/contracts/events.py
@@ -576,19 +576,12 @@ event("preview.open", PreviewOpenPayload, doc="Open a URL / file in the desktop
event("preview.close", PreviewClosePayload, doc="Close the preview pane or one tab.")
-class LayoutApplyPayload(OpenPayload):
- """``tools/apply_layout_tool.py``."""
-
- preset: str
-
-
class PaneRevealPayload(OpenPayload):
"""``tools/focus_pane_tool.py``."""
pane: str
-event("layout.apply", LayoutApplyPayload, doc="Apply a named desktop layout preset.")
event("pane.reveal", PaneRevealPayload, doc="Focus / reveal a named desktop pane.")
@@ -749,7 +742,7 @@ event("bot_relay.outbox.pending", ChangeSignalPayload, doc="A bot-relay outbox e
__all__ = [
"BillingBlock", "BillingStepUpVerificationPayload", "BrowserControllerCancelPayload",
"BrowserControllerCommandPayload", "BrowserProgressPayload", "ChangeSignalPayload", "ErrorPayload",
- "ErrorSurface", "FreeTierChallengePayload", "GatewayReadyPayload", "LayoutApplyPayload",
+ "ErrorSurface", "FreeTierChallengePayload", "GatewayReadyPayload",
"MessageCompletePayload", "MessageInterimPayload", "MessageReaction", "MessageReactionPayload", "MoaAggregatingPayload",
"MoaPhasePayload", "MoaProgressPayload", "MoaReferencePayload", "NoticePayload",
"NotificationClearPayload", "NotificationShowPayload", "OpenPayload", "PaneRevealPayload",
diff --git a/tui_gateway/contracts/server_requests.py b/tui_gateway/contracts/server_requests.py
index ee94796de9d..f450aed7788 100644
--- a/tui_gateway/contracts/server_requests.py
+++ b/tui_gateway/contracts/server_requests.py
@@ -340,6 +340,52 @@ server_request("tour", params=TourRequestParams, result=ValueResult,
doc="Drive a guided tour highlight in the desktop renderer.")
+class ThemeMode(WireEnum):
+ light = "light"
+ dark = "dark"
+ system = "system"
+
+
+class ThemePicker(WireEnum):
+ accent = "accent"
+ layout = "layout"
+
+
+class ThemeApplyRequestParams(ServerRequestParams):
+ """``tools/set_theme_tool.py`` values; accent is a swatch id, ``theme`` or ``#rrggbb``."""
+
+ accent: str | None = None
+ mode: ThemeMode | None = None
+ layout: str | None = None
+
+
+class ThemePickRequestParams(ServerRequestParams):
+ picker: ThemePicker
+
+
+class ThemeValues(Params):
+ """What the renderer applied. ``accent`` is a swatch id, ``custom:#rrggbb``, or null for the theme's own."""
+
+ accent: str | None = None
+ mode: ThemeMode | None = None
+ layout: str | None = None
+
+
+class ThemePickResult(Result):
+ """``picked`` once the user chose (already applied); ``cancelled`` when the card was dismissed. A response
+ with neither is a cancel."""
+
+ picked: ThemeValues | None = None
+ said: str | None = None
+ cancelled: bool | None = None
+
+
+server_request("theme.apply", params=ThemeApplyRequestParams, result=ValueResult,
+ doc="Apply set_theme values in the window showing the session (JSON text answer).")
+server_request("theme.pick", params=ThemePickRequestParams, result=ThemePickResult,
+ doc="Show an accent or layout picker card in the chat and wait for the pick.")
+
+
# ── withdrawal ────────────────────────────────────────────────────────────────────────────────
diff --git a/tui_gateway/server.py b/tui_gateway/server.py
index 3e3ed6142cd..4d7967caf45 100644
--- a/tui_gateway/server.py
+++ b/tui_gateway/server.py
@@ -1468,6 +1468,32 @@ def _tour_request(sid: str, payload: dict) -> str:
return answer or _TOUR_BRIDGE_UNAVAILABLE
+# Applying a theme is a store write the renderer answers in ms; a picker waits for a person.
+_THEME_TIMEOUT_S = 15
+_THEME_PICK_TIMEOUT_S = 300
+
+_THEME_UNANSWERED = {"success": False, "error": "No Hermes Desktop window answered the theme request."}
+
+
+def _theme_request(sid: str, payload: dict) -> dict:
+ """Bridge set_theme onto ``theme.apply`` (values; the renderer answers with what it applied) or
+ ``theme.pick`` (a card that waits for the user; a dismissed card and an expired one are told apart)."""
+ if "picker" not in payload:
+ answer = _ask("theme.apply", sid, dict(payload), timeout=_THEME_TIMEOUT_S)
+ return json.loads(answer) if answer else dict(_THEME_UNANSWERED)
+ from tui_gateway import server_requests
+
+ started = time.monotonic()
+ result = server_requests.send("theme.pick", sid, dict(payload), timeout=_THEME_PICK_TIMEOUT_S)
+ if result is None:
+ return {"timed_out": True} if time.monotonic() - started >= _THEME_PICK_TIMEOUT_S else {"cancelled": True}
+ if isinstance(result.get("picked"), dict):
+ return {"success": True, "picked": result["picked"]}
+ if isinstance(result.get("said"), str) and result["said"].strip():
+ return {"said": result["said"].strip()}
+ return {"cancelled": True}
+
+
_PREVIEW_ACTION_TIMEOUT_S = 45
# Until a session's client has proven it answers preview.act at all, hold it to a
# deadline a working renderer cannot miss (same ladder as the tour probe).
@@ -2151,7 +2177,7 @@ def _tool_progress_enabled(sid: str) -> bool:
# set (test_gateway_lifecycle_set_covers_desktop_card_tools pins the direction that matters).
_TOOL_LIFECYCLE_UI_TOOLS = frozenset({
"clarify", "manage_connections", "setup_mcp",
- "image_generate", "manage_catalog", "delegate_task", "setup_choose", "setup_beat", "start_chat",
+ "image_generate", "manage_catalog", "delegate_task", "setup_choose", "setup_beat", "start_chat", "set_theme",
# File edits are the turn's deliverable — the diff card the user reviews.
"edit_file", "patch", "write_file",
})
diff --git a/website/docs/reference/tools-reference.md b/website/docs/reference/tools-reference.md
index 8db7d9e7d38..d4ebee52c7b 100644
--- a/website/docs/reference/tools-reference.md
+++ b/website/docs/reference/tools-reference.md
@@ -8,7 +8,7 @@ description: "Authoritative reference for Hermes built-in tools, grouped by tool
This page documents Hermes' built-in tools, grouped by toolset. Availability varies by platform, credentials, and enabled toolsets.
-**Quick counts (current registry):** ~100 tools — 10 browser tools (core) + 2 CDP-gated browser tools + 5 browser-vault tools + `browser_exec`, 4 file tools, 2 terminal tools (`terminal`, `process_manage`), 11 desktop-GUI tools (`read_terminal`, `close_terminal`, `desktop_preview`, `drive_preview`, `annotate_preview`, `read_window_below`, `focus_pane`, `react_to_message`, `gui_tour`, `show_tip`, `apply_layout` — desktop-app sessions only), 2 web tools, 5 Feishu tools, 5 Yuanbao tools, 14 kanban tools (registered when the kanban dispatcher spawns the agent), 1 project tool (`desktop_project`; desktop/GUI sessions), 2 Discord tools, 3 video tools (`video_generate`, `xai_video_edit`, `xai_video_extend`), and a handful of standalone tools (`memory`, `clarify`, `delegate_task`, `execute_code`, `cronjob_manage`, `session_search`, `skill_view`/`skill_manage`/`skills_list`, `text_to_speech`, `image_generate`, `vision_analyze`, `video_analyze`, `todo_list`, `computer_use`, `x_search`).
+**Quick counts (current registry):** ~100 tools — 10 browser tools (core) + 2 CDP-gated browser tools + 5 browser-vault tools + `browser_exec`, 4 file tools, 2 terminal tools (`terminal`, `process_manage`), 11 desktop-GUI tools (`read_terminal`, `close_terminal`, `desktop_preview`, `drive_preview`, `annotate_preview`, `read_window_below`, `focus_pane`, `react_to_message`, `gui_tour`, `show_tip`, `set_theme` — desktop-app sessions only), 2 web tools, 5 Feishu tools, 5 Yuanbao tools, 14 kanban tools (registered when the kanban dispatcher spawns the agent), 1 project tool (`desktop_project`; desktop/GUI sessions), 2 Discord tools, 3 video tools (`video_generate`, `xai_video_edit`, `xai_video_extend`), and a handful of standalone tools (`memory`, `clarify`, `delegate_task`, `execute_code`, `cronjob_manage`, `session_search`, `skill_view`/`skill_manage`/`skills_list`, `text_to_speech`, `image_generate`, `vision_analyze`, `video_analyze`, `todo_list`, `computer_use`, `x_search`).
:::tip MCP Tools
In addition to built-in tools, Hermes can load tools dynamically from MCP servers. MCP tools appear with the prefix `mcp__<server>__` (e.g., `mcp__github__create_issue` for the `github` MCP server). See [MCP Integration](../user-guide/features/mcp.md) for configuration.
@@ -238,7 +238,7 @@ messaging, and cron sessions.
| `react_to_message` | React to a message with a single emoji, iMessage-tapback style. Opt-in via Settings → Appearance (`display.message_reactions`). | — |
| `gui_tour` | Give a live guided tour: dim the screen, highlight an element, and attach a narrated popover (driver.js). Works on the Hermes app's own UI and on any page open in the preview pane. `start` with no steps runs the app's built-in tour (`preset` `quick` or `full`, default `full`). For a custom tour, `targets` discovers what's on screen, `show` narrates step-by-step, and `start` with `steps` hands the user Next/Prev controls. | — |
| `show_tip` | Point at one element with a small accent bubble and an arrow — the quiet sibling of `gui_tour`, with no dimming, no spotlight, and no Next/Prev. Same `data-tour` handles and the same `tour(action='targets')` discovery call. | — |
-| `apply_layout` | Apply a saved layout preset to the Hermes desktop app when the user asks to rearrange the workspace. Built-ins: default (chat + sidebars), focus (chat only), terminal-deck, quad; plugin/user presets by id. To reveal ONE pane, use `focus_pane` instead. | — |
+| `set_theme` | Set the Hermes desktop app's accent colour (a swatch id, `theme`, or `#rrggbb`), light/dark/system mode, and layout preset (Simple: `sidebar-left`, `sidebar-right`; Advanced: `default`, `basic`, `focus`, `terminal-deck`, `quad`; or a saved layout's id). The result reports what was applied; an unknown value comes back with the available ids. `picker` (`accent` or `layout`) shows a picker card in the chat and waits up to 5 minutes for the pick. | — |
### Tours
diff --git a/website/docs/reference/toolsets-reference.md b/website/docs/reference/toolsets-reference.md
index 57cb2791b1f..130e1065634 100644
--- a/website/docs/reference/toolsets-reference.md
+++ b/website/docs/reference/toolsets-reference.md
@@ -71,7 +71,7 @@ Or in-session:
| `video_gen` | `video_generate`, `xai_video_edit`, `xai_video_extend` | Text-to-video and image-to-video via plugin-registered backends (xAI Grok-Imagine, FAL.ai Veo 3.1 / Pixverse v6 / Kling 3.0 / Kling O3). Pass `image_url` to animate an image; omit it for text-to-video. `xai_video_edit` / `xai_video_extend` are provider-specific edit/extend tools, gated on xAI Imagine credentials. |
| `kanban` | `kanban_attach`, `kanban_attach_url`, `kanban_attachments`, `kanban_block`, `kanban_comment`, `kanban_complete`, `kanban_create`, `kanban_heartbeat`, `kanban_link`, `kanban_list`, `kanban_request_changes`, `kanban_request_review`, `kanban_show`, `kanban_unblock` | Multi-agent coordination tools. Registered for dispatcher-spawned task workers (`HERMES_KANBAN_TASK`) and for platforms whose saved selection lists `kanban` (`hermes tools enable kanban --platform <p>`; the `all`/`*` wildcard does **not** enable it). Workers mark tasks done, request first-class review, block, heartbeat, comment, and create/link follow-up tasks; orchestrator profiles additionally get board-routing tools like list/unblock. `delegate_task` children are not Kanban run owners: their schema strips/disables this toolset and runtime guards reject direct board mutations, even if parent `HERMES_KANBAN_*` env vars are present. |
| `memory` | `memory` | Persistent cross-session memory management. |
-| `desktop_ui` | `annotate_preview`, `apply_layout`, `close_terminal`, `desktop_preview`, `drive_preview`, `focus_pane`, `gui_tour`, `react_to_message`, `read_terminal`, `read_window_below`, `show_tip` | Affordances that act on the Hermes desktop app itself — read/close the embedded terminal pane, open, read, close, interact with, and annotate the in-app browser, identify the OS window behind the app, reveal a pane, react to a message, run a guided tour (highlight + narrate UI elements in the app or the preview pane), and apply a layout preset. Enabled for sessions whose source is the desktop app, whichever backend it's connected to (local, SSH, URL, or Hermes Cloud). Never present on CLI, TUI, messaging, or cron sessions. |
+| `desktop_ui` | `annotate_preview`, `close_terminal`, `desktop_preview`, `drive_preview`, `focus_pane`, `gui_tour`, `react_to_message`, `read_terminal`, `read_window_below`, `set_theme`, `show_tip` | Affordances that act on the Hermes desktop app itself — read/close the embedded terminal pane, open, read, close, interact with, and annotate the in-app browser, identify the OS window behind the app, reveal a pane, react to a message, run a guided tour (highlight + narrate UI elements in the app or the preview pane), and set the accent colour, light/dark mode and layout (or show a picker card for the user to choose). Enabled for sessions whose source is the desktop app, whichever backend it's connected to (local, SSH, URL, or Hermes Cloud). Never present on CLI, TUI, messaging, or cron sessions. |
| `project` | `desktop_project` | Create and switch desktop [Projects](../user-guide/cli.md) (named, multi-folder workspaces) via one `create`/`switch`/`list` action enum. GUI / desktop sessions only. |
| `catalog` | `manage_catalog` | Search the plugin catalog and skills hub, and install items through the approval card into this chat's profile. Enabled for sessions whose source is the desktop app, whichever backend it's connected to (local, SSH, URL, or Hermes Cloud). Never present on CLI, TUI, messaging, or cron sessions, even when a config list names it. `all` does not include it. Deferred behind `tool_search` by default. Remove it with `agent.disabled_toolsets: [catalog]`. |
| `safe` | `image_generate`, `vision_analyze`, `web_extract`, `web_search` (via `includes`) | Read-only research + media generation. No file writes, no terminal, no code execution. |