The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
onboarding: the account's full name reaches the model only when the user picks it
alt-glitch1598b9007cce
diff --git a/agent/initiate_setup_facts.py b/agent/initiate_setup_facts.pyindex 72538047817..a401c918dad 100644--- a/agent/initiate_setup_facts.py+++ b/agent/initiate_setup_facts.py@@ -88,7 +88,7 @@ def _suggested_name(login: str, full: str) -> str | None:def suggested_name() -> str | None:- """The desktop's name card offers it before the first model call."""+ """The row ``setup_choose`` adds to the name card. It stays on this computer unless the user picks it."""return _suggested_name(*_account())@@ -170,7 +170,9 @@ def _machine_kind(os_family: str, spark: bool) -> str:def facts() -> dict:- """The facts the ``/initiate-setup`` turn sends, read as they are. A key that was not measured is left out."""+ """The facts the ``/initiate-setup`` turn sends, read as they are. A key that was not measured is left out.+ The account's full name is not one of them: ``setup_choose`` adds it to the name card itself, so it reaches the+ model only when the user picks it."""os_family, arch, gpu, cpu = host.os_family(), host.native_arch(), host.gpu_class(), host.cpu_model()ram = host.ram_total_bytes()spark = _is_spark(os_family, arch, gpu, cpu)@@ -190,7 +192,6 @@ def facts() -> dict:"machine_kind": _machine_kind(os_family, spark),"has_nvidia_gpu": gpu == "nvidia","is_spark": spark,- "suggested_name": _suggested_name(*_account()),"locale": _locale(),}return {key: value for key, value in block.items() if value not in (None, "")}diff --git a/agent/initiate_setup_prompt.py b/agent/initiate_setup_prompt.pyindex e4d7a54f0c7..24aaea96224 100644--- a/agent/initiate_setup_prompt.py+++ b/agent/initiate_setup_prompt.py@@ -101,7 +101,7 @@ def initiate_setup_prelude(message, surface: str, tools, history):so_far = _opening_so_far(history)if so_far is None or {"name", "accent"} <= so_far[1].keys():return None- return _opening(initiate_setup_facts.suggested_name(), *so_far)+ return _opening(*so_far)def intro_resends(prompt: str) -> bool:@@ -113,17 +113,18 @@ def intro_resends(prompt: str) -> bool:return prompt.startswith(HEADER) and onboarding_eligible() and read_state().get("intro") == "unseen"-def _opening(suggested: str | None, said: set, replies: dict):+def _opening(said: set, replies: dict):reply = replies.get("name")if reply is None:- # ``options`` is required by the tool schema; the history must carry it even when empty.- card = {"kind": "question", "question": NAME_QUESTION,- "options": [{"id": "suggested", "label": suggested}] if suggested else [], "multi_select": False}+ # ``options`` is required by the tool schema. setup_choose adds the account's name as a row itself, so the+ # saved call never carries it.+ card = {"kind": "question", "question": NAME_QUESTION, "options": [], "multi_select": False}reply = _json_object((yield "" if INTRO in said else INTRO, "setup_choose", card))if "accent" in replies:returnpicked = reply.get("picked")- name = (suggested or "") if picked == "suggested" else picked.strip() if isinstance(picked, str) else ""+ label = reply.get("label") if isinstance(reply.get("label"), str) else ""+ name = label if picked == "suggested" else picked.strip() if isinstance(picked, str) else ""line = f"Good to meet you, {name}." if name else "Good to meet you."accent = {"kind": "accent", "question": "Which colour?", "options": [], "multi_select": False}yield "" if line in said else line, "setup_choose", accentdiff --git a/optional-skills/productivity/initiate-setup/SKILL.md b/optional-skills/productivity/initiate-setup/SKILL.mdindex 0335b379856..62340a13b4f 100644--- a/optional-skills/productivity/initiate-setup/SKILL.md+++ b/optional-skills/productivity/initiate-setup/SKILL.md@@ -56,8 +56,7 @@ Work one beat at a time. When the history holds the name and accent answers, staCopy each line whole; fill only the `<slots>`:```-name {"kind":"question","question":"What should I call you?","options":[{"id":"suggested","label":"<suggested_name>"}],"multi_select":false}-name0 {"kind":"question","question":"What should I call you?","options":[],"multi_select":false}+name {"kind":"question","question":"What should I call you?","options":[],"multi_select":false}accent {"kind":"accent","question":"Which colour?","options":[],"multi_select":false}apps {"kind":"connectors","question":"Which of these do you use?","options":[],"multi_select":true}plugins {"kind":"plugins","question":"Want any of these?","options":[],"multi_select":true}@@ -84,7 +83,7 @@ start_chat {"profile":"<primary_profile>","title":"<task name, at most### Opening-Without the app's name and accent answers in the history: a short welcome, card `name` (or `name0` when there is no suggested name), one warm sentence with their name, then card `accent`. "Sure" means the suggested name.+Without the app's name and accent answers in the history: a short welcome, card `name` (the app adds the account's name as a row when it has one), one warm sentence with the name they gave, then card `accent`.### Beat 1: apps they usediff --git a/tests/tools/test_setup_choose_name_card.py b/tests/tools/test_setup_choose_name_card.pynew file mode 100644index 00000000000..a61f012188a--- /dev/null+++ b/tests/tools/test_setup_choose_name_card.py@@ -0,0 +1,41 @@+"""The account's full name reaches the model only when the user picks it on the setup name card."""++import json++from agent import initiate_setup_facts+from agent.initiate_setup_prompt import NAME_QUESTION, _opening+from tools.setup_choose_tool import setup_choose_tool++NAME = "Ada Lovelace"+++def _ask(monkeypatch, reply):+ monkeypatch.setattr(initiate_setup_facts, "suggested_name", lambda: NAME)+ shown = []++ def callback(payload):+ shown.append(payload)+ return reply++ result = setup_choose_tool(kind="question", question=NAME_QUESTION, options=[], callback=callback)+ return shown[0], json.loads(result)+++def test_name_card_shows_the_account_name_and_returns_it_only_when_picked(monkeypatch):+ shown, picked = _ask(monkeypatch, {"picked": "suggested"})+ assert shown["options"] == [{"id": "suggested", "label": NAME}]+ assert picked["label"] == NAME++ _, typed = _ask(monkeypatch, {"picked": "Ada"})+ assert NAME not in json.dumps(typed)+++def test_facts_and_the_scripted_card_leave_the_name_out(monkeypatch):+ monkeypatch.setattr(initiate_setup_facts, "_account", lambda: ("ada", NAME))+ assert NAME not in json.dumps(initiate_setup_facts.facts())++ opening = _opening(set(), {})+ _text, _tool, card = next(opening)+ assert NAME not in json.dumps(card)+ line, _tool, _card = opening.send(json.dumps({"outcome": "submitted", "picked": "suggested", "label": NAME}))+ assert line == f"Good to meet you, {NAME}."diff --git a/tools/setup_choose_tool.py b/tools/setup_choose_tool.pyindex 6b67728bed9..795c289e3c3 100644--- a/tools/setup_choose_tool.py+++ b/tools/setup_choose_tool.py@@ -198,6 +198,15 @@ _APP_FILLED: dict[str, Callable[[dict], dict]] = {_APP_ROWS = frozenset({"tour", "machine_use", "fork"})+def _name_rows() -> Optional[list]:+ # The account's full name stays on this computer: it is added here, after the model's call was saved, so the+ # model sees it only in the result when the user picks it.+ from agent.initiate_setup_facts import suggested_name++ name = suggested_name()+ return [{"id": "suggested", "label": name}] if name else None++def _connectors_closed() -> Optional[str]:from tools.connectors.gateway.config import connectors_available, load_config@@ -242,6 +251,7 @@ def setup_choose_tool(kind: str = "", question: str = "", options=None, multi_sepayload = {"kind": kind, "question": text, "options": normalized,"multi_select": bool(multi_select) and (normalized is not None or kind != "question")}card = _card(kind, text, payload["multi_select"], normalized)+ from agent.initiate_setup_prompt import NAME_QUESTIONfrom hermes_cli.setup_profile import read_cards, record_cardstry:cards = read_cards(session_id) if session_id else {}@@ -253,6 +263,8 @@ def setup_choose_tool(kind: str = "", question: str = "", options=None, multi_sereturn json.dumps({"outcome": "no_answer", "picked": None, "notice": closed,"next": _THEN[kind](cards, None)}, ensure_ascii=False)payload.update(_APP_FILLED[kind](cards) if kind in _APP_FILLED else {})+ if kind == "question" and text == NAME_QUESTION:+ payload.update(options=_name_rows(), multi_select=False)reply = callback(payload)result = _result(reply, payload["options"])extra, state = _follow_up(kind, card, result, payload["options"], cards)diff --git a/website/docs/reference/slash-commands.md b/website/docs/reference/slash-commands.mdindex 420898beb71..37fab3a9775 100644--- a/website/docs/reference/slash-commands.md+++ b/website/docs/reference/slash-commands.md@@ -110,7 +110,7 @@ Type `/` in the CLI to open the autocomplete menu. Built-in commands are case-in| `/bundles` | List configured skill bundles — `/<name>` slash aliases that preload several skills at once. Configure under `bundles:` in `~/.hermes/config.yaml`. See [Skill Bundles](../user-guide/features/skills.md#skill-bundles). || `/learn <what to learn from>` | Distill a reusable skill from anything you describe — a directory, a URL, the workflow you just walked the agent through, or pasted notes. Open-ended: the agent gathers the sources with its own tools and authors a `SKILL.md` following the house authoring standards. Works in the CLI, the messaging gateway, the TUI, and the dashboard Skills page. || `/plan [task]` | Write a markdown implementation plan to `.hermes/plans/` in the active workspace — planning only, no execution. Empty argument infers the task from the conversation. (Formerly the bundled `plan` skill; now built-in so it survives the Telegram/Discord command-menu caps.) |-| `/initiate-setup` (alias: `/initiate_setup`) | Run the first-run setup: the agent learns about you and sets Hermes up around you. Sends the `initiate-setup` skill plus a short block of facts about this session and machine (surface, tools present, OS, CPU, RAM, GPU, your name and language; see [What the setup chat knows about your computer](../user-guide/desktop.md#what-the-setup-chat-knows-about-your-computer)), as one normal turn. The first message ever ends with a one-line offer to run it (see [Onboarding](../user-guide/configuration.md#onboarding)). Works in the CLI, the messaging gateway, the TUI, and the desktop app. In the desktop app, Hermes itself asks the opening questions (your name, then an accent colour) before the model's first reply. |+| `/initiate-setup` (alias: `/initiate_setup`) | Run the first-run setup: the agent learns about you and sets Hermes up around you. Sends the `initiate-setup` skill plus a short block of facts about this session and machine (surface, tools present, OS, CPU, RAM, GPU and language; see [What the setup chat knows about your computer](../user-guide/desktop.md#what-the-setup-chat-knows-about-your-computer)), as one normal turn. The first message ever ends with a one-line offer to run it (see [Onboarding](../user-guide/configuration.md#onboarding)). Works in the CLI, the messaging gateway, the TUI, and the desktop app. In the desktop app, Hermes itself asks the opening questions (your name, then an accent colour) before the model's first reply. || `/init [notes]` | Generate or update `AGENTS.md` project instructions from a repo scan (port of Codex `/init`). The agent inspects manifests, layout, and toolchain configs with its read-only tools, then writes a concise `AGENTS.md` — or, if one exists, merge-updates it preserving your content. Optional notes steer the emphasis. Works in the CLI, the messaging gateway, and the TUI. || `/cron` | Manage scheduled tasks (list, add/create, edit, pause, resume, run, remove) || `/suggestions [accept\|dismiss N\|catalog\|clear]` (alias: `/suggest`) | Review suggested automations. Use `/suggestions` to list pending suggestions, `/suggestions accept <id>` to create the proposed automation, `/suggestions dismiss <id>` to reject one, `/suggestions catalog` to add curated starter automations, and `/suggestions clear` to clear resolved suggestion records. Accepted jobs preserve the current surface as the delivery origin. |diff --git a/website/docs/reference/tools-reference.md b/website/docs/reference/tools-reference.mdindex cf00502f803..6c157c75356 100644--- a/website/docs/reference/tools-reference.md+++ b/website/docs/reference/tools-reference.md@@ -187,7 +187,7 @@ Enabled by the desktop setup profile's own config (`platform_toolsets.cli`). Onl| Tool | Description | Requires environment ||------|-------------|----------------------|-| `setup_choose` | Only through the `setup` toolset, desktop sessions only; never deferred unless a `tools.tool_search.defer` list names it. Shows one card in the setup chat: `kind` is `question`, `accent`, `theme`, `layout`, `connectors`, `plugins`, `tour` or `fork`, and `question` is the card's heading. `options` is required: up to 12 `{id, label, detail?}` rows (unique ids) replace the app's own list, and `[]` shows the app's list for a picker or asks for free text for kind `question`. `tour` (Quick tour, Show me everything, Skip) and `fork` (two first tasks built, when the card shows, from the apps and plugins picked earlier and this computer, then "I have something in mind", "Help me set up this <machine>" and "Let's figure it out together") always show the backend's rows. The plugins card starts with Blender already picked when it is present. A card with options still takes a typed answer. `multi_select` lets the user pick several rows. An accent, theme or layout pick applies in the app as soon as the user picks it. The result has `outcome` (`submitted`, `typed`, `cancelled` or `no_answer` with a `notice`), `picked` (an option id, the free-text answer, or a list of ids with `multi_select`), `said` (with `typed`: words typed in the chat box that name none of the card's rows by id or label; nothing is picked or recorded), and `label` (the name the card showed for each pick, such as `Ultraviolet` for `#8a2be2`) when the pick is one of the card's rows. When the connectors list is unavailable (no Nous identity, after one guest sign-up attempt) or the plugins list is empty, the call returns `no_answer` with a `notice` at once and shows no card. It records the picks for the handoff: `start_chat` hands the picked apps and plugins to the task chat, which connects and installs them first. Anywhere else the call returns an error. | — |+| `setup_choose` | Only through the `setup` toolset, desktop sessions only; never deferred unless a `tools.tool_search.defer` list names it. Shows one card in the setup chat: `kind` is `question`, `accent`, `theme`, `layout`, `connectors`, `plugins`, `tour` or `fork`, and `question` is the card's heading. `options` is required: up to 12 `{id, label, detail?}` rows (unique ids) replace the app's own list, and `[]` shows the app's list for a picker or asks for free text for kind `question`. `tour` (Quick tour, Show me everything, Skip) and `fork` (two first tasks built, when the card shows, from the apps and plugins picked earlier and this computer, then "I have something in mind", "Help me set up this <machine>" and "Let's figure it out together") always show the backend's rows. The name card (`question` "What should I call you?") gets the account's full name as a row from the backend, so the name reaches the model only in the result when the user picks it. The plugins card starts with Blender already picked when it is present. A card with options still takes a typed answer. `multi_select` lets the user pick several rows. An accent, theme or layout pick applies in the app as soon as the user picks it. The result has `outcome` (`submitted`, `typed`, `cancelled` or `no_answer` with a `notice`), `picked` (an option id, the free-text answer, or a list of ids with `multi_select`), `said` (with `typed`: words typed in the chat box that name none of the card's rows by id or label; nothing is picked or recorded), and `label` (the name the card showed for each pick, such as `Ultraviolet` for `#8a2be2`) when the pick is one of the card's rows. When the connectors list is unavailable (no Nous identity, after one guest sign-up attempt) or the plugins list is empty, the call returns `no_answer` with a `notice` at once and shows no card. It records the picks for the handoff: `start_chat` hands the picked apps and plugins to the task chat, which connects and installs them first. Anywhere else the call returns an error. | — |## `start_chat` toolsetdiff --git a/website/docs/user-guide/desktop.md b/website/docs/user-guide/desktop.mdindex 8947cee8d08..211f00297d5 100644--- a/website/docs/user-guide/desktop.md+++ b/website/docs/user-guide/desktop.md@@ -259,7 +259,7 @@ First-run onboarding has been redesigned on a unified overlay design system, and#### What the setup chat knows about your computer-The setup chat's first message carries a short block of facts, so it can name your computer and offer first tasks that fit it: the OS and its version, CPU, RAM, GPU class, whether it is a Spark, your full name from the account record (offered as a suggestion on the name card) and your language. The block goes to the inference provider that the setup chat uses and stays in that chat's history. Nothing else on the computer is read for setup, and nothing is stored. With a remote backend, the facts describe the remote machine, not the computer in front of you.+The setup chat's first message carries a short block of facts, so it can name your computer and offer first tasks that fit it: the OS and its version, CPU, RAM, GPU class, whether it is a Spark, and your language. The block goes to the inference provider that the setup chat uses and stays in that chat's history. The name card offers your full name from the account record, but the name stays on this computer unless you pick it. Nothing else on the computer is read for setup, and nothing is stored. With a remote backend, the facts describe the remote machine, not the computer in front of you.#### Per-profile settings: the "Applies to" scope