The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tour): gui_tour rejects preset with steps, and the docs describe the built-in tour (review)
alt-glitch6fec745d45d5
diff --git a/tests/tools/test_tour_tool.py b/tests/tools/test_tour_tool.pyindex 7435299b507..196ed6cbd29 100644--- a/tests/tools/test_tour_tool.py+++ b/tests/tools/test_tour_tool.py@@ -3,6 +3,7 @@import jsonfrom tools import tour_tool as tt+from tools.registry import registrydef _run(**kwargs):@@ -39,6 +40,25 @@ def test_start_validates_its_steps():assert "steps[1] needs" in _run(action="start", steps=[{"selector": "#a"}, {}])["error"]+def test_preset_is_validated_and_reaches_the_request_through_the_handler():+ seen = {}++ def cb(payload):+ seen.update(payload)+ return json.dumps({"success": True})++ entry = registry.get_entry("gui_tour")+ assert entry is not None+ handler = entry.handler+ assert "preset must be one of" in json.loads(handler({"action": "start", "preset": "medium"}, callback=cb))["error"]+ assert not seen+ assert "not both" in json.loads(+ handler({"action": "start", "preset": "quick", "steps": [{"text": "hi"}]}, callback=cb))["error"]+ assert not seen+ assert "error" not in json.loads(handler({"action": "start", "preset": "quick"}, callback=cb))+ assert seen == {"action": "start", "surface": "app", "preset": "quick"}++def test_payload_omits_unset_fields_and_defaults_the_surface():seen = {}diff --git a/tools/tour_tool.py b/tools/tour_tool.pyindex 64c05959647..76e1da15b47 100644--- a/tools/tour_tool.py+++ b/tools/tour_tool.py@@ -39,6 +39,8 @@ def tour_tool(action: str = "", surface: Optional[str] = None, selector: Optionareturn tool_error(f"side must be one of: {', '.join(SIDES)}.")if preset is not None and preset not in PRESETS:return tool_error(f"preset must be one of: {', '.join(PRESETS)}.")+ if preset is not None and steps is not None:+ return tool_error("preset picks a built-in tour; pass steps or preset, not both.")# Every highlighted moment needs something to point at or something to say.if verb == "show" and not (selector or title or text):return tool_error("show needs a selector (and/or title/text for the popover).")diff --git a/website/docs/reference/tools-reference.md b/website/docs/reference/tools-reference.mdindex 481d70a479d..f1f3f687fa8 100644--- a/website/docs/reference/tools-reference.md+++ b/website/docs/reference/tools-reference.md@@ -218,13 +218,15 @@ messaging, and cron sessions.| `read_window_below` | Identify the OS window directly underneath the Hermes desktop window — app name, title, bounds (metadata only, never pixels). On macOS, other apps' titles appear only when Screen Recording is already granted; the tool never prompts for it. | — || `focus_pane` | Reveal and focus a pane in the Hermes desktop app (chat, files, terminal, review, 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; `targets` discovers what's on screen, `show` narrates step-by-step, `start` hands the user Next/Prev controls. | — |+| `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. | — |### Tours-The `gui_tour` tool discovers its own targets — call `action='targets'` and it returns every addressable element on screen with a selector, a label, and a `stable` flag. Stable selectors key off identity (`data-tour`, `id`, `data-testid`, `aria-label`) and survive a re-render; positional `nth-child` paths don't, so stable ones sort first and should be preferred.+For a general look around the app, `gui_tour(action='start')` with no steps runs the desktop app's built-in tour. `preset='quick'` shows four essentials (sessions, composer, new session, model); `preset='full'` (the default) adds the stops for the current interface mode. Stops whose element is not on screen are skipped. The built-in tour runs only on `surface='app'`, and `preset` cannot be combined with `steps`.++For a custom tour, the `gui_tour` tool discovers its own targets — call `action='targets'` and it returns every addressable element on screen with a selector, a label, and a `stable` flag. Stable selectors key off identity (`data-tour`, `id`, `data-testid`, `aria-label`) and survive a re-render; positional `nth-child` paths don't, so stable ones sort first and should be preferred.To give an element a durable handle of your own, mark it up: