Skip to content

The agent that grows with you

One-call built-in tour for the setup chat (#129137)

Siddharth Balyanc600c70dd001
diff --git a/agent/initiate_setup_prompt.py b/agent/initiate_setup_prompt.py
index 1a9a29f17ca..b78bb1d6681 100644
--- a/agent/initiate_setup_prompt.py
+++ b/agent/initiate_setup_prompt.py
@@ -2,12 +2,17 @@ from __future__ import annotations
import importlib.util
import json
+import re
from pathlib import Path
from hermes_constants import get_optional_skills_dir
HEADER = "[/initiate-setup]"
+# The skill's inline-shell hook for host facts. The builder fills it in-process on every surface:
+# skills.inline_shell is on only in the setup profile, and on Windows it needs Git Bash.
+_HOST_FACTS_HOOK = re.compile(r"^!`[^`\n]*scripts/host_facts\.py`$", re.M)
+
def _skill_dir() -> Path:
return get_optional_skills_dir(Path(__file__).resolve().parent.parent / "optional-skills") / "productivity" / "initiate-setup"
@@ -29,8 +34,10 @@ def build_initiate_setup_prompt(surface: str, tools, primary_profile: str) -> st
"tools_present": sorted(set(tools)),
"primary_profile": primary_profile,
"guest_free_tier": free_tier_route(),
- **_host_facts(skill_dir),
}
+ # Same bytes the hook prints when the skill loads through inline shell.
+ host = json.dumps(_host_facts(skill_dir), ensure_ascii=False, separators=(",", ":"))
skill = (skill_dir / "SKILL.md").read_text(encoding="utf-8-sig").strip()
+ skill = _HOST_FACTS_HOOK.sub(lambda _: host, skill)
facts = json.dumps(block, indent=2, ensure_ascii=False)
return f"{HEADER}\n\n{skill}\n\n```json\n{facts}\n```"
diff --git a/agent/inline_tool_executors.py b/agent/inline_tool_executors.py
index 225f4b197de..d5e75e761f0 100644
--- a/agent/inline_tool_executors.py
+++ b/agent/inline_tool_executors.py
@@ -272,6 +272,7 @@ _RAW_INLINE_TOOL_EXECUTORS: Dict[str, InlineToolExecutor] = {
"tools.tour_tool", "tour_tool", "tour_callback",
("action", "action", ""), ("surface", "surface"), ("selector", "selector"), ("title", "title"),
("text", "text"), ("side", "side"), ("steps", "steps"), ("step_index", "step_index"),
+ ("preset", "preset"),
),
"setup_choose": _callback_tool(
"tools.setup_choose_tool", "setup_choose_tool", "setup_choose_callback",
diff --git a/apps/desktop/src/app/chat/built-in-tour.ts b/apps/desktop/src/app/chat/built-in-tour.ts
new file mode 100644
index 00000000000..c5d22cdc6ef
--- /dev/null
+++ b/apps/desktop/src/app/chat/built-in-tour.ts
@@ -0,0 +1,104 @@
+/**
+ * The app's own tour — what `gui_tour` runs when it starts with no steps.
+ *
+ * The app owns the stops (stable `data-tour` handles) and their copy, so a
+ * look around is one tool call. Before this, the model scanned `targets` and
+ * wrote its own step list: two round trips before anything moved on screen,
+ * built from raw DOM labels. A stop whose handle is not on screen right now (a
+ * mode without that nav row, a collapsed pane) is dropped, never guessed at.
+ */
+
+import { getLocalCatalog, getLocalModelsStatus } from '@/hermes'
+import { runtimeTranslations } from '@/i18n'
+import { localSetupEligible } from '@/lib/tips/local-cta'
+import { startTour, type TourResult } from '@/lib/tour'
+import { $interfaceMode } from '@/store/interface-mode'
+import { $localModelsEnabled } from '@/store/local-models-flag'
+import { $connection } from '@/store/session'
+
+export type BuiltInTourPreset = 'quick' | 'full'
+
+type StopId = 'capabilities' | 'composer' | 'messaging' | 'model' | 'newSession' | 'rightPane' | 'sessions'
+
+const SELECTORS: Record<StopId, string> = {
+ capabilities: '[data-tour="sidebar-nav-capabilities"]',
+ composer: '[data-tour="composer"]',
+ messaging: '[data-tour="sidebar-nav-messaging"]',
+ model: '[data-tour="model-pill"]',
+ newSession: '[data-tour="sidebar-nav-new-session"]',
+ rightPane: '[data-tour="right-pane-toggle"]',
+ sessions: '[data-tour="sessions-sidebar"]'
+}
+
+/** Where their conversations live, where they ask for a job, how to start a
+ * fresh one. */
+const ESSENTIALS: StopId[] = ['sessions', 'composer', 'newSession']
+
+/** Full adds the model picker and what the interface mode puts on screen:
+ * Simple is for talking to Hermes, Advanced has the working pane. */
+const SIMPLE_EXTRAS: StopId[] = ['capabilities', 'messaging']
+const ADVANCED_EXTRAS: StopId[] = ['rightPane', 'capabilities']
+
+const PRESET_STOPS: Record<BuiltInTourPreset, () => StopId[]> = {
+ full: () => [...ESSENTIALS, 'model', ...($interfaceMode.get() === 'simple' ? SIMPLE_EXTRAS : ADVANCED_EXTRAS)],
+ quick: () => ESSENTIALS
+}
+
+/** A slow fit answer drops the local line rather than holding the tour. */
+const LOCAL_FIT_WAIT_MS = 2_000
+
+/** Same rule as the tour collector: a keep-alive tab hidden with
+ * `data-pane-hidden` keeps its box, so the attribute decides, then size. */
+function onScreen(selector: string): boolean {
+ const node = document.querySelector(selector)
+
+ if (!node || node.closest('[data-pane-hidden]')) {
+ return false
+ }
+
+ const { height, width } = node.getBoundingClientRect()
+
+ return width >= 4 && height >= 4
+}
+
+/** Whether the model stop says this computer can run a local model. It is the
+ * local-setup tip's answer (the backend's catalog `fits` check, on a local
+ * connection, with nothing set up yet), and only where the Local Models pane
+ * exists to point at. */
+async function canRunLocalModel(): Promise<boolean> {
+ const mode = $connection.get()?.mode ?? null
+
+ if (!$localModelsEnabled.get() || mode !== 'local') {
+ return false
+ }
+
+ const read = Promise.all([getLocalModelsStatus(), getLocalCatalog()]).then(
+ ([status, catalog]) => localSetupEligible(mode, status, catalog.models),
+ () => false
+ )
+
+ const late = new Promise<boolean>(resolve => setTimeout(() => resolve(false), LOCAL_FIT_WAIT_MS))
+
+ return Promise.race([read, late])
+}
+
+/** Run the built-in tour. Never throws; failures come back like any tour
+ * action's, so the agent can say so in words. */
+export async function runBuiltInTour(preset: BuiltInTourPreset): Promise<TourResult> {
+ const stops = PRESET_STOPS[preset]().filter(id => onScreen(SELECTORS[id]))
+
+ if (stops.length === 0) {
+ return { error: 'None of the built-in tour targets are on screen.', success: false }
+ }
+
+ const localLine = stops.includes('model') && (await canRunLocalModel())
+ const copy = runtimeTranslations().appTour
+
+ return startTour(
+ stops.map(id => ({
+ selector: SELECTORS[id],
+ text: id === 'model' && localLine ? `${copy.model.text} ${copy.modelLocal}` : copy[id].text,
+ title: copy[id].title
+ }))
+ )
+}
diff --git a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
index 77ec3964a26..7456c76bdf7 100644
--- a/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
+++ b/apps/desktop/src/app/session/hooks/use-message-stream/gateway-event/server-requests.ts
@@ -594,22 +594,30 @@ const tour: Handler = ({ isActiveSession, request }) => {
return
}
- void import('@/lib/tour')
- .then(({ runTour }) =>
- runTour(
- {
- kind: (str(p.action) || 'stop') as TourAction['kind'],
- selector: p.selector as never,
- side: p.side as TourStep['side'],
- startAt: p.step_index as never,
- steps: p.steps as TourStep[] | undefined,
- text: p.text as never,
- title: p.title as never
- },
- p.surface === 'preview' ? 'preview' : 'app'
- )
- )
- .then(
+ const kind = (str(p.action) || 'stop') as TourAction['kind']
+
+ // start with no steps is the app's own tour: one call, the app owns the stops.
+ const run =
+ kind === 'start' && !Array.isArray(p.steps)
+ ? import('@/app/chat/built-in-tour').then(({ runBuiltInTour }) =>
+ runBuiltInTour(p.preset === 'quick' ? 'quick' : 'full')
+ )
+ : import('@/lib/tour').then(({ runTour }) =>
+ runTour(
+ {
+ kind,
+ selector: p.selector as never,
+ side: p.side as TourStep['side'],
+ startAt: p.step_index as never,
+ steps: p.steps as TourStep[] | undefined,
+ text: p.text as never,
+ title: p.title as never
+ },
+ p.surface === 'preview' ? 'preview' : 'app'
+ )
+ )
+
+ void run.then(
result => answerValue(request, result),
error => answerValue(request, { error: error instanceof Error ? error.message : String(error), success: false })
)
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index b3cd31d681b..76a182f3bcf 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -4358,6 +4358,16 @@ export const en: Translations = {
stayTitle: 'Hermes is one click away',
stayText: 'Switch to the setup profile and open Welcome to Hermes whenever you want a hand. It stays there.'
},
+ appTour: {
+ sessions: { title: 'Your chats', text: 'Every conversation lives here. Search, pin or reopen any of them.' },
+ composer: { title: 'Ask here', text: 'Say what you want done. Type @ to bring in a file.' },
+ newSession: { title: 'Start fresh', text: 'A new session gets its own context. Use one per job.' },
+ model: { title: 'Model picker', text: 'Chooses which model answers you.' },
+ modelLocal: 'This computer can run one locally: Settings > Providers > Local Models.',
+ capabilities: { title: 'Capabilities', text: 'Skills, tools and plugins Hermes can use. Add more here.' },
+ messaging: { title: 'Messaging', text: 'Reach Hermes from Telegram, Slack, Discord and more.' },
+ rightPane: { title: 'The working pane', text: 'Opens files, terminal, review and the in-app browser on the right.' }
+ },
guidedGreeting: {
line: "Hey, come on in. I'm Hermes. Give me two minutes to set the place up around you, then we'll put me to work on something you actually want done.\n\nFirst though, what should I call you?",
nameSuggestion: (name: string) => `(I can also just call you ${name}, if you prefer.)`
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index e667af48e21..f4906b4da37 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -3646,6 +3646,17 @@ export interface Translations {
stayTitle: string
stayText: string
}
+ /** The app's own tour, run when `gui_tour` starts with no steps. */
+ appTour: {
+ sessions: { title: string; text: string }
+ composer: { title: string; text: string }
+ newSession: { title: string; text: string }
+ model: { title: string; text: string }
+ modelLocal: string
+ capabilities: { title: string; text: string }
+ messaging: { title: string; text: string }
+ rightPane: { title: string; text: string }
+ }
guidedGreeting: {
line: string
nameSuggestion: (name: string) => string
diff --git a/apps/desktop/src/store/onboarding-script.ts b/apps/desktop/src/store/onboarding-script.ts
index 687437a548d..2216f4bff8c 100644
--- a/apps/desktop/src/store/onboarding-script.ts
+++ b/apps/desktop/src/store/onboarding-script.ts
@@ -144,9 +144,9 @@ export function buildChatOnboardingPrompt(suggestedName?: string | null, signedI
'If they request a custom colour, resolve it to a hex colour and emit ::onboarding{step="look" value="#rrggbb"} on its own line. The existing picker applies and saves it when the turn settles; its Continue button advances normally. Custom colours are supported. No explanation or extra question is needed.',
'3. Then their layout: one short sentence, then ::onboarding{step="layout"} on a line of its own.',
`4. The app has just arranged itself around this chat. In at most two short sentences, explain that the model picker chooses what answers them and they can ask to set up a local model on this computer after the initial free usage. Skip the filler acknowledgment; save download details for when they choose local setup. No download, model switch, extra question or mandatory setup now. Then offer a look around with the line ::ask{question="${TOUR_QUESTION}" options="${TOUR_OPTIONS.basics}|${TOUR_OPTIONS.tour}|${TOUR_OPTIONS.none}"} alone as its own paragraph. Branch on the answer, then go straight to step 5 IN THE SAME TURN whichever they picked — the tour overlay has its own Done button and ending your turn on it strands them with nothing to click next.`,
- ` - "${TOUR_OPTIONS.basics}": three steps, the essentials only — where their conversations live, where they ask for a job, and how to start a fresh one. Point at each and say one useful thing about it.`,
- ` - "${TOUR_OPTIONS.tour}": 4 to 6 steps, a proper look around — the essentials plus whatever else the layout they just picked actually gives them.`,
- ` Both of those run the tour tool the same way: call it with action="targets" FIRST and build only out of what it actually reports, preferring the targets marked stable — never invent a selector, and if a piece you wanted is not in the list, drop that step rather than guessing at it. Then ONE action="start" call, each step a few words of title and one plain sentence of body. Name the visible control and its purpose, not only "this" or "over here". If the highlight is hard to see, describe its location from the reported target; never guess a selector or claim you fixed contrast. The longer tour can include the model picker if actually reported; keep the quick tour at its existing three steps. One short line before the call; after it returns, the fork (step 5) follows in this same turn so the ask is waiting under the tour when they close it.`,
+ ` - "${TOUR_OPTIONS.basics}": call the tour tool with action="start" and preset="quick". The app runs its own three essentials: where their conversations live, where they ask for a job, and how to start a fresh one.`,
+ ` - "${TOUR_OPTIONS.tour}": call it with action="start" and preset="full": the essentials, the model picker, and what the layout they just picked adds.`,
+ ` Both are ONE call: no action="targets" first and no steps, because the app owns the stops and their copy. If the highlight is hard to see, describe where it is in words; never claim you fixed contrast. One short line before the call; after it returns, the fork (step 5) follows in this same turn so the ask is waiting under the tour when they close it. Only when they ask to see one specific thing, call action="targets" and build steps from what it reports, preferring the targets marked stable; never invent a selector.`,
` - "${TOUR_OPTIONS.none}": no line about the tour at all, straight to step 5.`,
' If they ask for local models, use the existing Settings → Providers → Local Models flow. Explain the download and hardware fit before seeking consent to install or switch; a model is not an app connection. Do not interrupt their selected task or pretend a runtime is installed just because its settings are available.',
' Once, in your own words, somewhere in that turn: the tour is always on offer, they can ask you to show them any part of this any time. Never bring it up again.',
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts
index 6f751bcf6e4..1cd66ec9f43 100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@ -4450,6 +4450,7 @@ export interface TourRequestParams {
side?: string | null
steps?: TourStep[] | null
step_index?: number | null
+ preset?: string | null
}
export interface TourStep {
selector?: string | null
diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.json
index fd5f7021359..fd3eacfc02c 100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@ -36652,6 +36652,18 @@
],
"default": null,
"title": "Step Index"
+ },
+ "preset": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Preset"
}
},
"required": [
diff --git a/optional-skills/productivity/initiate-setup/MAPPING.md b/optional-skills/productivity/initiate-setup/MAPPING.md
index 6a8704a165f..5310e0a1495 100644
--- a/optional-skills/productivity/initiate-setup/MAPPING.md
+++ b/optional-skills/productivity/initiate-setup/MAPPING.md
@@ -17,7 +17,7 @@ Sources mapped: `apps/desktop/src/store/onboarding-script.ts` (the runbook), `ap
| `manage_connections` status + connect in the setup chat when asked | runbook "CONNECTING, IF THEY ASK" | Removed from the setup chat. The app gets intent `now`; the task chat connects first | Beat 4, Beat 10 build plan |
| `::onboarding{step="layout"}` (LayoutCard: preset + interface mode + window grow) | `cards/setup.tsx::LayoutCard`, `assembly.ts::assembleChatOnboarding` | `setup_choose kind:"layout"`; `apply_layout` only for a layout asked for in words | Beat 6 |
| Step 4 model-picker explanation | runbook | Text | Beat 7 |
-| `::ask` "Want a look around first?" + `gui_tour` targets/start | runbook step 4 | `setup_choose kind:"question"` + `gui_tour` (`targets`, then one `start`), as today | Beat 7 |
+| `::ask` "Want a look around first?" + `gui_tour` targets/start | runbook step 4 | `setup_choose kind:"question"` + one `gui_tour` `start` with `preset` `quick` or `full` (the app's own tour) | Beat 7 |
| `::ask` fork, `input="true"` | runbook step 5, `forkOptions()` | `setup_choose kind:"question"` with `fork.options` computed by `scripts/host_facts.py` | Beat 8 |
| `::ask` "What sounds better?" (Something else) | runbook, `forkFallbackOptions()` | `setup_choose` with `fork.fallback_options` | Beat 8 |
| Machine branch: one question on main use | runbook step 6 | `setup_choose kind:"question"`, options Work / Gaming / School / Creative / A bit of everything | Beat 9 |
diff --git a/optional-skills/productivity/initiate-setup/SKILL.md b/optional-skills/productivity/initiate-setup/SKILL.md
index 8fb14b90f21..01f9f7ad6ae 100644
--- a/optional-skills/productivity/initiate-setup/SKILL.md
+++ b/optional-skills/productivity/initiate-setup/SKILL.md
@@ -29,7 +29,7 @@ The setup profile has exactly these tools on desktop sessions:
- `setup_choose` asks every question and shows every picker. `kind` is `question`, `accent`, `theme`, `layout`, `connectors` or `plugins`. `options` (at most 12, each `{id, label, detail}`) is optional; when you omit it for `accent`, `theme`, `layout`, `connectors` or `plugins`, the app fills its own fixed list. `multi_select` allows several picks. `intent: true` gives each `connectors`/`plugins` row a now / later / save choice. It blocks until the user answers and returns `{picked, intent}`, shaped like a `clarify` answer: `picked` is an option id (a list of ids with `multi_select`) or the text the user typed instead. The card shows your `question`; your text must not repeat it.
- `start_chat` starts a visible chat whose first user message is your `message`, in `profile` (an existing profile). Returns `{status: "started", session_id, profile, title}` or `{status: "rejected", reason}`. It is not idempotent: each call starts one more chat.
- `apply_layout` applies a layout preset by id.
-- `gui_tour` highlights parts of the app: `action:"targets"` lists what can be pointed at, `action:"start"` runs the steps.
+- `gui_tour` highlights parts of the app. `action:"start"` with `preset:"quick"` or `preset:"full"` and no `steps` runs the app's own tour in one call. For one specific thing, `action:"targets"` lists what can be pointed at and `action:"start"` with `steps` runs your own.
- `manage_catalog` with `action:"install"` and `items:[{kind:"plugin", id}]` shows one approval card with a row per catalog item and blocks until every row is installed, skipped, or the card is closed. The host installs each approved row into the user's default profile.
The setup profile has no `manage_connections`, terminal, file, web, browser, memory, delegation, code execution or `clarify` tools. Never promise an action that needs them; the task chat has them.
@@ -209,11 +209,13 @@ If they ask for local models, point them to Settings, Providers, Local Models. E
Then offer a look around with `setup_choose kind:"question"`, `question:"Want a look around first?"`, options `{id:"basics", label:"Quick tour"}`, `{id:"tour", label:"Show me everything"}`, `{id:"none", label:"Skip, let's build something"}`. Then:
-- `basics`: three steps, the essentials only: where their conversations live, where they ask for a job, and how to start a fresh one. One useful thing about each.
-- `tour`: four to six steps: the essentials plus what the layout they picked gives them, including the model picker if it is reported.
-- Both: call `gui_tour` with `action:"targets"` first and build only from what it reports, preferring targets marked stable. Never invent a selector; drop a step whose target is missing. Then one `action:"start"` call, each step a few words of title and one plain sentence of body. Name the visible control and its purpose, not "this" or "over here". One short line before the call.
+- `basics`: `gui_tour` with `action:"start", preset:"quick"`. The app shows three essentials: where their conversations live, where they ask for a job, and how to start a fresh one.
+- `tour`: `gui_tour` with `action:"start", preset:"full"`. The app shows the essentials, the model picker, and what their layout adds.
+- Both: ONE call, with no `targets` call first and no `steps`; the app owns the stops and their copy. One short line before the call.
- `none`: no line about the tour.
+When they later ask to see one specific part of the app, call `gui_tour` with `action:"targets"`, then `action:"start"` with `steps` built only from what it reports, preferring targets marked stable. Never invent a selector.
+
Whichever they pick, go straight to beat 8 in the same turn, so the fork waits under the tour when they close it. Once, in your own words, say they can ask you to show them any part of the app any time. Never bring the tour up again.
### Beat 8: the fork
diff --git a/tools/tour_tool.py b/tools/tour_tool.py
index a5ea91c8c89..1ae236766ec 100644
--- a/tools/tour_tool.py
+++ b/tools/tour_tool.py
@@ -1,6 +1,7 @@
-"""Guided tour (highlight + narrate UI elements) in the Hermes desktop GUI: the agent discovers
-targets (``action="targets"``), then highlights one step at a time (``show``) or hands over a
-step list the user pages (``start``). Round-trips through the gateway blocking-prompt bridge
+"""Guided tour (highlight + narrate UI elements) in the Hermes desktop GUI: ``start`` with no
+steps runs the app's own built-in tour (``preset`` quick or full); for a custom one the agent
+discovers targets (``action="targets"``), then highlights one step at a time (``show``) or hands
+over a step list the user pages (``start`` + ``steps``). Round-trips through the gateway blocking-prompt bridge
(``tour.request``/``tour.respond``) so the agent learns whether the selector matched. Registered in
``desktop_ui`` and hidden from the model when tours are off: a tour covers the whole screen, so "off"
must mean the model is never told the tool exists rather than offered a call that fails."""
@@ -14,12 +15,13 @@ from tools.registry import registry, tool_error
ACTIONS = ("targets", "show", "start", "next", "prev", "stop")
SURFACES = ("app", "preview")
SIDES = ("top", "right", "bottom", "left")
+PRESETS = ("quick", "full")
def tour_tool(action: str = "", surface: Optional[str] = None, selector: Optional[str] = None,
title: Optional[str] = None, text: Optional[str] = None, side: Optional[str] = None,
steps: Optional[list] = None, step_index: Optional[int] = None,
- callback: Optional[Callable] = None) -> str:
+ preset: Optional[str] = None, callback: Optional[Callable] = None) -> str:
"""Dispatch one tour action to the desktop renderer and return its outcome."""
if callback is None:
return tool_error("tour is only available in the Hermes desktop app.")
@@ -31,19 +33,24 @@ def tour_tool(action: str = "", surface: Optional[str] = None, selector: Optiona
return tool_error(f"surface must be one of: {', '.join(SURFACES)}.")
if side is not None and side not in SIDES:
return 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)}.")
# 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).")
- if verb == "start":
+ # start without steps is the app's built-in tour, which only exists on the app surface.
+ if verb == "start" and steps is None and where != "app":
+ return tool_error("The built-in tour runs on surface='app'; pass steps for a preview tour.")
+ if verb == "start" and steps is not None:
if not isinstance(steps, list) or not steps:
- return tool_error("start needs a non-empty steps array.")
+ return tool_error("start needs a non-empty steps array, or no steps for the built-in tour.")
for i, step in enumerate(steps):
if not isinstance(step, dict):
return tool_error(f"steps[{i}] must be an object.")
if not (step.get("selector") or step.get("title") or step.get("text")):
return tool_error(f"steps[{i}] needs a selector and/or title/text.")
fields = {"action": verb, "surface": where, "selector": selector, "title": title,
- "text": text, "side": side, "steps": steps, "step_index": step_index}
+ "text": text, "side": side, "steps": steps, "step_index": step_index, "preset": preset}
try:
raw = callback({key: val for key, val in fields.items() if val is not None})
except Exception as exc:
@@ -83,14 +90,16 @@ TOUR_SCHEMA = {
"description": (
"Guided tour in the desktop GUI: dim the screen, highlight an "
"element, attach a titled popover. Surfaces: 'app' (Hermes itself) "
- "or 'preview' (the page in the preview pane). ALWAYS call "
- "action='targets' first — prefer targets marked stable:true (their "
- "selectors survive re-renders); re-scan if one stops matching. Then "
- "narrate with action='show' (one highlight per call, replaces the "
- "last — pair each with a chat message) or hand over with "
- "action='start' + steps (user gets Next/Prev; 'next'/'prev' also "
- "page it). 'stop' clears. Use for how-does-X-work / where-is-Y "
- "walkthroughs."
+ "or 'preview' (the page in the preview pane). A general look around "
+ "the app is ONE call: action='start' with no steps runs the app's "
+ "built-in tour (preset 'quick' or 'full', default full). For a "
+ "custom tour, call action='targets' first — prefer targets marked "
+ "stable:true (their selectors survive re-renders); re-scan if one "
+ "stops matching. Then narrate with action='show' (one highlight per "
+ "call, replaces the last — pair each with a chat message) or hand "
+ "over with action='start' + steps (user gets Next/Prev; "
+ "'next'/'prev' also page it). 'stop' clears. Use for "
+ "how-does-X-work / where-is-Y walkthroughs."
),
"parameters": {
"type": "object",
@@ -98,7 +107,7 @@ TOUR_SCHEMA = {
"action": {
"type": "string",
"enum": list(ACTIONS),
- "description": "targets first; show narrates; start hands over.",
+ "description": "start alone runs the built-in tour; targets first for custom steps.",
},
"surface": {
"type": "string",
@@ -119,7 +128,12 @@ TOUR_SCHEMA = {
"steps": {
"type": "array",
"items": _STEP_SCHEMA,
- "description": "start: ordered steps.",
+ "description": "start: ordered steps; omit for the built-in tour.",
+ },
+ "preset": {
+ "type": "string",
+ "enum": list(PRESETS),
+ "description": "start without steps: 'quick' (three essentials) or 'full'.",
},
"step_index": {
"type": "integer",
@@ -141,5 +155,5 @@ registry.register(
handler=lambda args, **kw: tour_tool(
action=args.get("action", ""), callback=kw.get("callback"),
**{k: args.get(k) for k in ("surface", "selector", "title", "text", "side", "steps",
- "step_index")}),
+ "step_index", "preset")}),
emoji="🧭")
diff --git a/tui_gateway/contracts/server_requests.py b/tui_gateway/contracts/server_requests.py
index c7b10936f8f..351859f74b0 100644
--- a/tui_gateway/contracts/server_requests.py
+++ b/tui_gateway/contracts/server_requests.py
@@ -236,6 +236,7 @@ class TourRequestParams(ServerRequestParams):
side: str | None = None
steps: list[TourStep] | None = None
step_index: int | None = None
+ preset: str | None = None
server_request("tour", params=TourRequestParams, result=ValueResult,
diff --git a/website/docs/user-guide/skills/optional/productivity/productivity-initiate-setup.md b/website/docs/user-guide/skills/optional/productivity/productivity-initiate-setup.md
index f879e59c267..b84b3194592 100644
--- a/website/docs/user-guide/skills/optional/productivity/productivity-initiate-setup.md
+++ b/website/docs/user-guide/skills/optional/productivity/productivity-initiate-setup.md
@@ -46,7 +46,7 @@ The setup profile has exactly these tools on desktop sessions:
- `setup_choose` asks every question and shows every picker. `kind` is `question`, `accent`, `theme`, `layout`, `connectors` or `plugins`. `options` (at most 12, each `{id, label, detail}`) is optional; when you omit it for `accent`, `theme`, `layout`, `connectors` or `plugins`, the app fills its own fixed list. `multi_select` allows several picks. `intent: true` gives each `connectors`/`plugins` row a now / later / save choice. It blocks until the user answers and returns `{picked, intent}`, shaped like a `clarify` answer: `picked` is an option id (a list of ids with `multi_select`) or the text the user typed instead. The card shows your `question`; your text must not repeat it.
- `start_chat` starts a visible chat whose first user message is your `message`, in `profile` (an existing profile). Returns `{status: "started", session_id, profile, title}` or `{status: "rejected", reason}`. It is not idempotent: each call starts one more chat.
- `apply_layout` applies a layout preset by id.
-- `gui_tour` highlights parts of the app: `action:"targets"` lists what can be pointed at, `action:"start"` runs the steps.
+- `gui_tour` highlights parts of the app. `action:"start"` with `preset:"quick"` or `preset:"full"` and no `steps` runs the app's own tour in one call. For one specific thing, `action:"targets"` lists what can be pointed at and `action:"start"` with `steps` runs your own.
- `manage_catalog` with `action:"install"` and `items:[{kind:"plugin", id}]` shows one approval card with a row per catalog item and blocks until every row is installed, skipped, or the card is closed. The host installs each approved row into the user's default profile.
The setup profile has no `manage_connections`, terminal, file, web, browser, memory, delegation, code execution or `clarify` tools. Never promise an action that needs them; the task chat has them.
@@ -226,11 +226,13 @@ If they ask for local models, point them to Settings, Providers, Local Models. E
Then offer a look around with `setup_choose kind:"question"`, `question:"Want a look around first?"`, options `{id:"basics", label:"Quick tour"}`, `{id:"tour", label:"Show me everything"}`, `{id:"none", label:"Skip, let's build something"}`. Then:
-- `basics`: three steps, the essentials only: where their conversations live, where they ask for a job, and how to start a fresh one. One useful thing about each.
-- `tour`: four to six steps: the essentials plus what the layout they picked gives them, including the model picker if it is reported.
-- Both: call `gui_tour` with `action:"targets"` first and build only from what it reports, preferring targets marked stable. Never invent a selector; drop a step whose target is missing. Then one `action:"start"` call, each step a few words of title and one plain sentence of body. Name the visible control and its purpose, not "this" or "over here". One short line before the call.
+- `basics`: `gui_tour` with `action:"start", preset:"quick"`. The app shows three essentials: where their conversations live, where they ask for a job, and how to start a fresh one.
+- `tour`: `gui_tour` with `action:"start", preset:"full"`. The app shows the essentials, the model picker, and what their layout adds.
+- Both: ONE call, with no `targets` call first and no `steps`; the app owns the stops and their copy. One short line before the call.
- `none`: no line about the tour.
+When they later ask to see one specific part of the app, call `gui_tour` with `action:"targets"`, then `action:"start"` with `steps` built only from what it reports, preferring targets marked stable. Never invent a selector.
+
Whichever they pick, go straight to beat 8 in the same turn, so the fork waits under the tour when they close it. Once, in your own words, say they can ask you to show them any part of the app any time. Never bring the tour up again.
### Beat 8: the fork