Skip to content

The agent that grows with you

refactor(onboarding): drop app discovery and the guide_* funnel steps

alt-glitch7f8fa7843e6a
diff --git a/hermes_cli/mcp_app_detection.py b/hermes_cli/mcp_app_detection.py
deleted file mode 100644
index 4fbfed1c9f5..00000000000
--- a/hermes_cli/mcp_app_detection.py
+++ /dev/null
@@ -1,162 +0,0 @@
-"""Read-only, backend-local application signals for reviewed MCP catalog labels.
-
-This module never runs apps, loads a terminal backend or contacts an MCP server.
-Only curated matches may leave it; inventory names and paths remain private.
-"""
-
-from __future__ import annotations
-
-import os
-from pathlib import Path
-import re
-import shutil
-import sys
-import time
-
-_MAX_APPLICATIONS = 16
-_APP_LABEL = re.compile(r"[A-Za-z0-9][A-Za-z0-9 ._+-]{0,79}")
-
-
-def validate_applications(labels: object) -> list[str]:
- """Accept bounded display labels/aliases, never paths, commands or regexes."""
- if not isinstance(labels, list) or len(labels) > _MAX_APPLICATIONS:
- raise ValueError("suggest.applications must be a list of at most 16 app labels")
- for label in labels:
- if (not isinstance(label, str) or not _APP_LABEL.fullmatch(label)
- or label != label.strip() or ".." in label or " --" in label):
- raise ValueError("suggest.applications must contain safe app labels (1–80 characters)")
- return list(labels)
-
-
-def _application_roots() -> list[Path]:
- # OS home, NOT HERMES_HOME: profiles do not change the backend machine's apps.
- home = Path.home()
- if sys.platform == "darwin":
- return [Path("/Applications"), Path("/System/Applications"), home / "Applications"]
- if sys.platform == "linux":
- return [Path("/usr/share/applications"), Path("/usr/local/share/applications"),
- home / ".local/share/applications"]
- if sys.platform == "win32":
- return [Path(os.environ.get("ProgramFiles", "C:/Program Files")),
- Path(os.environ.get("ProgramFiles(x86)", "C:/Program Files (x86)")),
- Path(os.environ.get("LOCALAPPDATA", str(home / "AppData/Local"))) / "Programs"]
- return []
-
-
-class _DiscoveryLimit(Exception):
- """A partial scan cannot claim absence."""
-
-
-class _Scan:
- def __init__(self, labels: set[str]):
- self.patterns = {label: re.compile(r"(?<!\w)" + re.escape(label) + r"(?!\w)", re.I)
- for label in labels}
- self.matched: set[str] = set()
- self.readable = False
- self.unavailable = False
- self.remaining = 4096
- self.directories = 128
- self.deadline = time.monotonic() + 2.0
-
- def tick(self):
- self.remaining -= 1
- if self.remaining < 0 or time.monotonic() > self.deadline:
- raise _DiscoveryLimit
-
- def record(self, name: str):
- # Never retain the inventory, only which reviewed labels matched it.
- self.matched.update(label for label, pattern in self.patterns.items() if pattern.search(name))
-
- def directory(self, root: Path, depth: int = 0):
- self.directories -= 1
- if self.directories < 0:
- raise _DiscoveryLimit
- try:
- with os.scandir(root) as children:
- self.readable = True
- for child in children:
- self.tick()
- if child.is_symlink():
- continue
- is_dir = child.is_dir(follow_symlinks=False)
- if sys.platform == "darwin" and is_dir and child.name.lower().endswith(".app"):
- self.record(child.name[:-4])
- continue # Never descend into bundles or run their executables.
- if sys.platform == "win32" and is_dir:
- self.record(child.name)
- if sys.platform == "linux" and child.name.endswith(".desktop") and child.is_file(follow_symlinks=False):
- self.desktop(Path(child.path))
- if is_dir and depth < 2:
- self.directory(Path(child.path), depth + 1)
- except FileNotFoundError:
- pass # An optional standard root need not exist.
- except OSError:
- self.unavailable = True
-
- def desktop(self, path: Path):
- self.record(path.stem)
- # Name is data; deliberately ignore Exec, TryExec, URLs and localized commands.
- with path.open(encoding="utf-8", errors="replace") as stream:
- text = stream.read(32769)
- if len(text) > 32768:
- self.unavailable = True
- return
- in_entry = False
- for line in text.splitlines():
- if line.startswith("["):
- in_entry = line.strip() == "[Desktop Entry]"
- elif in_entry and line.startswith("Name="):
- self.record(line[5:])
-
- def path_candidates(self):
- # Exact single-token candidates only. No multiword-to-command heuristics.
- candidates = {label: tuple(dict.fromkeys((label, label.lower()))) for label in self.patterns
- if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9_-]{0,79}", label)}
- parts = os.environ.get("PATH", "").split(os.pathsep)
- if len(parts) > 64:
- self.unavailable = True
- for part in dict.fromkeys(parts[:64]):
- if not part or len(part) > 4096 or not Path(part).is_absolute():
- continue # Never search the working directory.
- try:
- self.tick()
- with os.scandir(part):
- self.readable = True
- for label, spellings in candidates.items():
- self.tick()
- # Passing an absolute candidate also prevents Windows which() from
- # silently prepending the current directory to an explicit PATH.
- if any(shutil.which(str(Path(part) / candidate)) for candidate in spellings):
- self.matched.add(label)
- except FileNotFoundError:
- continue
- except OSError:
- self.unavailable = True
-
-
-def discover_catalog_apps(applications: dict[str, list[str]]) -> dict:
- """Bounded backend-native signals, not proof an integration is configured.
-
- ``ok`` means the supported scan completed, not an exhaustive OS inventory.
- A missing permission, exhausted budget or unsupported OS is ``unavailable``;
- positive matches still stand, but empty arrays then mean unknown.
- """
- criteria = {name: validate_applications(labels) for name, labels in applications.items()}
- labels = {label for values in criteria.values() for label in values}
- supported = sys.platform in {"darwin", "linux", "win32"} and len(labels) <= 256
- scan = _Scan(labels if supported else set())
- if supported:
- try:
- for root in _application_roots():
- scan.directory(root)
- scan.path_candidates()
- except (OSError, RuntimeError, _DiscoveryLimit):
- scan.unavailable = True
- else:
- scan.unavailable = True
- return {
- "matches": {name: list(dict.fromkeys(label for label in labels if label in scan.matched))
- for name, labels in criteria.items()},
- "discovery": {"scope": "backend", "status": "unavailable" if scan.unavailable or not scan.readable else "ok",
- "platform": sys.platform},
- }
diff --git a/hermes_cli/mcp_catalog.py b/hermes_cli/mcp_catalog.py
index 40de40d259b..c17693bf4bc 100644
--- a/hermes_cli/mcp_catalog.py
+++ b/hermes_cli/mcp_catalog.py
@@ -243,6 +243,21 @@ def _parse_tools(path: Path, raw: Any) -> ToolsSpec:
return ToolsSpec(default_enabled=default_enabled, default_excluded=default_excluded)
+_MAX_APPLICATIONS = 16
+_APP_LABEL = re.compile(r"[A-Za-z0-9][A-Za-z0-9 ._+-]{0,79}")
+
+
+def _validate_applications(labels: object) -> list[str]:
+ """Accept bounded display labels/aliases, never paths, commands or regexes."""
+ if not isinstance(labels, list) or len(labels) > _MAX_APPLICATIONS:
+ raise ValueError("suggest.applications must be a list of at most 16 app labels")
+ for label in labels:
+ if (not isinstance(label, str) or not _APP_LABEL.fullmatch(label)
+ or label != label.strip() or ".." in label or " --" in label):
+ raise ValueError("suggest.applications must contain safe app labels (1–80 characters)")
+ return list(labels)
+
+
def _parse_suggest(path: Path, suggest_raw: Any) -> Optional[SuggestSpec]:
if suggest_raw is None:
return None
@@ -251,10 +266,8 @@ def _parse_suggest(path: Path, suggest_raw: Any) -> Optional[SuggestSpec]:
hosts_raw = suggest_raw.get("hosts") or []
_require_str_list(path, "suggest.keywords", kw_raw, non_empty=True)
_require_str_list(path, "suggest.hosts", hosts_raw, non_empty=True)
- from hermes_cli.mcp_app_detection import validate_applications
-
try:
- applications = validate_applications(suggest_raw.get("applications", []))
+ applications = _validate_applications(suggest_raw.get("applications", []))
except ValueError as exc:
raise CatalogError(f"{path}: {exc}") from exc
examples = suggest_raw.get("examples", [])
diff --git a/hermes_cli/observability/schemas/hermes.shared_metrics.v4.schema.json b/hermes_cli/observability/schemas/hermes.shared_metrics.v4.schema.json
index c7565a6bcc9..6133cb922ab 100644
--- a/hermes_cli/observability/schemas/hermes.shared_metrics.v4.schema.json
+++ b/hermes_cli/observability/schemas/hermes.shared_metrics.v4.schema.json
@@ -4089,10 +4089,6 @@
"first_message",
"free_tier_ready",
"guide",
- "guide_connectors",
- "guide_first_build",
- "guide_layout",
- "guide_look",
"guide_skip",
"model_pick",
"provider_api_key",
diff --git a/hermes_cli/observability/shared_metrics_contract.py b/hermes_cli/observability/shared_metrics_contract.py
index 95553695ca8..a06293f9bdc 100644
--- a/hermes_cli/observability/shared_metrics_contract.py
+++ b/hermes_cli/observability/shared_metrics_contract.py
@@ -639,12 +639,10 @@ DESKTOP_FRICTION_DETAILS: dict[str, frozenset[str]] = {
DESKTOP_FRICTION_KINDS = frozenset(DESKTOP_FRICTION_DETAILS)
DESKTOP_FRICTION_DETAIL_VALUES = frozenset().union(*DESKTOP_FRICTION_DETAILS.values())
# The Desktop first-run flows: the classic provider overlay (store/onboarding.ts), the guided flow
-# (store/onboarding-gate.ts phases + committed guide cards), free-tier sign-in, then the consent
-# answer and the first message.
+# (store/onboarding-gate.ts phases), free-tier sign-in, then the consent answer and the first message.
DESKTOP_ONBOARDING_STEPS = frozenset({
- "choose_later", "consent", "first_message", "free_tier_ready", "guide", "guide_connectors",
- "guide_first_build", "guide_layout", "guide_look", "guide_skip", "model_pick", "provider_api_key",
- "provider_local", "provider_oauth", "provider_setup", "sign_in",
+ "choose_later", "consent", "first_message", "free_tier_ready", "guide", "guide_skip", "model_pick",
+ "provider_api_key", "provider_local", "provider_oauth", "provider_setup", "sign_in",
})
DESKTOP_ONBOARDING_EVENTS = frozenset({"abandoned", "completed", "reached"})
# Bot Mode (a bot's canonical chat or a bot side-chat in front) vs regular Sessions mode, per day.
diff --git a/hermes_cli/web_routers/mcp.py b/hermes_cli/web_routers/mcp.py
index aa8b5923666..b5cf932a261 100644
--- a/hermes_cli/web_routers/mcp.py
+++ b/hermes_cli/web_routers/mcp.py
@@ -437,10 +437,9 @@ def _catalog_entry_json(entry: Any, installed: bool, enabled: bool) -> Dict[str,
@router.get("/api/mcp/catalog")
-async def list_mcp_catalog(profile: Optional[str] = None, detect_apps: bool = False):
+async def list_mcp_catalog(profile: Optional[str] = None):
"""Browse the Nous-approved MCP catalog (optional-mcps/ manifests), each
- entry annotated with installed/enabled state for ``profile``. Opt-in app
- signals describe this backend machine, never the client or terminal sandbox."""
+ entry annotated with installed/enabled state for ``profile``."""
with http_failure("mcp_catalog import failed", 500, "Catalog unavailable"):
from hermes_cli import mcp_catalog
@@ -466,36 +465,7 @@ async def list_mcp_catalog(profile: Optional[str] = None, detect_apps: bool = Fa
diagnostics = [{"name": n, "kind": k, "message": m} for (n, k, m) in mcp_catalog.catalog_diagnostics()]
except Exception:
pass
- result = {"entries": entries, "diagnostics": diagnostics}
- if detect_apps:
- import sys
-
- try:
- from hermes_cli.mcp_app_detection import discover_catalog_apps, validate_applications
-
- applications = {}
- for entry in entries:
- labels = (entry["suggest"] or {}).get("applications") or [
- entry["name"].replace("-", " ").replace("_", " ")
- ]
- try:
- applications[entry["name"]] = validate_applications(labels)
- except ValueError:
- # Catalog identifiers allow more than app labels; one unusable
- # inference must not suppress valid observations for other entries.
- applications[entry["name"]] = []
-
- # Keep backend-local filesystem work off the event loop and profile lock.
- detected = await asyncio.to_thread(discover_catalog_apps, applications)
- except Exception:
- _log.warning("Backend application discovery unavailable")
- detected = {"matches": {}, "discovery": {
- "scope": "backend", "status": "unavailable", "platform": sys.platform,
- }}
- for entry in entries:
- entry["detected_apps"] = detected["matches"].get(entry["name"], [])
- result["discovery"] = detected["discovery"]
- return result
+ return {"entries": entries, "diagnostics": diagnostics}
@router.post("/api/mcp/catalog/install")
diff --git a/tests/hermes_cli/test_mcp_app_detection.py b/tests/hermes_cli/test_mcp_app_detection.py
deleted file mode 100644
index 41781108b68..00000000000
--- a/tests/hermes_cli/test_mcp_app_detection.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""Backend-native, read-only catalog app discovery; no app or MCP is launched."""
-
-import os
-from pathlib import Path
-import sys
-
-import pytest
-
-
-def test_native_discovery_returns_only_curated_boundary_matches(tmp_path, monkeypatch):
- from hermes_cli import mcp_app_detection as detection
-
- root = tmp_path / "applications"
- root.mkdir()
- if sys.platform == "darwin":
- (root / "Vendor" / "FIXTURE Paint 5.1.app").mkdir(parents=True)
- (root / "SuperFixtureCode.app").mkdir()
- (root / "Personal Secret.app").mkdir()
- elif sys.platform == "win32":
- (root / "Vendor" / "FIXTURE Paint 5.1").mkdir(parents=True)
- (root / "SuperFixtureCode").mkdir()
- (root / "Personal Secret").mkdir()
- else:
- (root / "org.example.editor.desktop").write_text(
- "[Desktop Entry]\nName=FIXTURE Paint 5.1\nExec=do-not-run\n", encoding="utf-8")
- (root / "SuperFixtureCode.desktop").write_text("[Desktop Entry]\nName=Personal Secret\n")
- monkeypatch.setattr(detection, "_application_roots", lambda: [root])
- monkeypatch.setenv("PATH", str(tmp_path / "bin"))
- (tmp_path / "bin").mkdir()
- criteria = {"paint": ["Fixture Paint", "Missing App"], "code": ["FixtureCode"], "legacy": []}
- result = detection.discover_catalog_apps(criteria)
- assert result == {"matches": {"paint": ["Fixture Paint"], "code": [], "legacy": []},
- "discovery": {"scope": "backend", "status": "ok", "platform": sys.platform}}
- # A PATH signal is exact, not a substring or shell invocation. Executable content is never run.
- candidate = tmp_path / "bin" / ("fixturecode.exe" if os.name == "nt" else "fixturecode")
- candidate.write_text("this is not an executable program", encoding="utf-8")
- candidate.chmod(0o755)
- assert detection.discover_catalog_apps(criteria)["matches"]["code"] == ["FixtureCode"]
-
-
-def test_discovery_failure_or_budget_is_unknown_not_absence(tmp_path, monkeypatch):
- from hermes_cli import mcp_app_detection as detection
-
- monkeypatch.setattr(detection, "_application_roots", lambda: [tmp_path])
- monkeypatch.setenv("PATH", "")
- criteria = {f"entry{i}": [f"App{i}"] for i in range(300)}
- limited = detection.discover_catalog_apps(criteria)
- assert limited["discovery"]["status"] == "unavailable"
- assert all(matches == [] for matches in limited["matches"].values())
-
- criteria = {"demo": ["Fixture Paint"]}
- assert detection.discover_catalog_apps(criteria)["discovery"]["status"] == "ok"
- (tmp_path / "ordinary-file").touch()
- monkeypatch.setattr(detection, "_application_roots", lambda: [tmp_path / "ordinary-file"])
- assert detection.discover_catalog_apps(criteria)["discovery"]["status"] == "unavailable"
- monkeypatch.setattr(detection, "_application_roots", lambda: [tmp_path / "missing"])
- assert detection.discover_catalog_apps(criteria)["discovery"]["status"] == "unavailable"
-
- def denied(_path):
- raise PermissionError("private filesystem path must not escape")
-
- monkeypatch.setattr(detection.os, "scandir", denied)
- assert detection.discover_catalog_apps(criteria) == {
- "matches": {"demo": []},
- "discovery": {"scope": "backend", "status": "unavailable", "platform": sys.platform},
- }
- with pytest.raises(ValueError, match="suggest.applications"):
- detection.discover_catalog_apps({"demo": ["/bin/echo"]})
diff --git a/tests/hermes_cli/test_mcp_catalog_discovery.py b/tests/hermes_cli/test_mcp_catalog_discovery.py
deleted file mode 100644
index 625a92e4079..00000000000
--- a/tests/hermes_cli/test_mcp_catalog_discovery.py
+++ /dev/null
@@ -1,154 +0,0 @@
-"""Catalog HTTP contract: opt-in backend signals with real A/B/A profile config I/O."""
-
-import asyncio
-from pathlib import Path
-import sys
-
-import pytest
-import hermes_yaml as yaml
-from fastapi.testclient import TestClient
-
-
-def catalog_client(tmp_path, monkeypatch):
- home = tmp_path / ".hermes"
- other = home / "profiles" / "b"
- other.mkdir(parents=True)
- monkeypatch.setattr(Path, "home", lambda: tmp_path)
- monkeypatch.setenv("HERMES_HOME", str(home))
- monkeypatch.setenv("PATH", "")
- for directory, servers in ((home, {"demo": {"command": "unused", "enabled": False}}),
- (other, {"demo": {"command": "unused", "enabled": True},
- "legacy": {"command": "unused"}})):
- (directory / "config.yaml").write_text(yaml.safe_dump(
- {"mcp_servers": servers, "terminal": {"backend": "docker"}}), encoding="utf-8")
- catalog = tmp_path / "catalog"
- for name, suggest in (("demo", {"keywords": ["demo"], "applications": ["Fixture Paint"],
- "examples": ["Draw a picture."], "requires_app": True}),
- ("legacy", {"keywords": ["legacy"]})):
- entry = catalog / name
- entry.mkdir(parents=True)
- (entry / "manifest.yaml").write_text(yaml.safe_dump({
- "manifest_version": 1, "name": name, "description": "Fixture entry",
- "transport": {"type": "stdio", "command": "must-not-run"}, "suggest": suggest,
- }), encoding="utf-8")
- monkeypatch.setenv("HERMES_OPTIONAL_MCPS", str(catalog))
-
- from agent import secret_scope
- from tui_gateway import launch_profile_policy
- monkeypatch.setattr(secret_scope, "_MULTIPLEX_ACTIVE", False)
- monkeypatch.setattr(launch_profile_policy, "_snapshot", None)
- from hermes_cli.web_server import _SESSION_HEADER_NAME, _SESSION_TOKEN, app
- client = TestClient(app)
- client.headers[_SESSION_HEADER_NAME] = _SESSION_TOKEN
- return client, home, other
-
-
-def test_catalog_detection_is_opt_in_and_preserves_profile_state(catalog_client, tmp_path, monkeypatch):
- from hermes_cli import mcp_app_detection as detection
- from hermes_constants import get_hermes_home
-
- client, home, other = catalog_client
- import socket
- import subprocess
-
- def forbidden(*_args, **_kwargs):
- pytest.fail("Catalog discovery must not execute apps, install or probe the network")
-
- monkeypatch.setattr(subprocess, "Popen", forbidden)
- monkeypatch.setattr(socket, "create_connection", forbidden)
- app_root = tmp_path / "Applications"
- app_root.mkdir()
- if sys.platform == "darwin":
- (app_root / "Fixture Paint.app").mkdir()
- elif sys.platform == "win32":
- (app_root / "Fixture Paint").mkdir()
- else:
- (app_root / "fixture.desktop").write_text("[Desktop Entry]\nName=Fixture Paint\nExec=must-not-run\n")
- monkeypatch.setattr(detection, "_application_roots", lambda: [app_root])
- calls = []
- discover = detection.discover_catalog_apps
-
- def checked_discover(criteria):
- with pytest.raises(RuntimeError):
- asyncio.get_running_loop() # Scans stay off the event loop.
- assert get_hermes_home() == home # No named-profile scope/skills lock spans discovery.
- calls.append(criteria)
- return discover(criteria)
-
- monkeypatch.setattr(detection, "discover_catalog_apps", checked_discover)
- snapshots = {directory: (directory / "config.yaml").read_bytes() for directory in (home, other)}
- for profile, enabled, legacy_installed in ((None, False, False), ("b", True, True), (None, False, False)):
- params = {"profile": profile} if profile else {}
- before = len(calls)
- old = client.get("/api/mcp/catalog", params=params)
- assert old.status_code == 200, old.text
- assert len(calls) == before
- assert "discovery" not in old.json()
- assert all("detected_apps" not in entry for entry in old.json()["entries"])
- new = client.get("/api/mcp/catalog", params={**params, "detect_apps": "true", "future_hint": "ignored"})
- assert new.status_code == 200, new.text
- data = new.json()
- assert data["discovery"] == {"scope": "backend", "status": "ok", "platform": sys.platform}
- entries = {entry["name"]: entry for entry in data["entries"]}
- assert entries["demo"]["detected_apps"] == ["Fixture Paint"]
- assert entries["demo"]["installed"] is True and entries["demo"]["enabled"] is enabled
- assert entries["legacy"]["detected_apps"] == []
- assert entries["legacy"]["installed"] is legacy_installed
- assert entries["legacy"]["suggest"]["applications"] == []
- assert entries["legacy"]["suggest"]["requires_app"] is False
- for entry in data["entries"]:
- entry.pop("detected_apps")
- data.pop("discovery")
- assert data == old.json()
- assert len(calls) == before + 1
- assert {directory: (directory / "config.yaml").read_bytes() for directory in snapshots} == snapshots
- future = tmp_path / "catalog" / "fixture-paint"
- future.mkdir()
- manifest = future / "manifest.yaml"
- manifest.write_text(yaml.safe_dump({
- "manifest_version": 1, "name": "fixture-paint", "description": "Create illustrations in Fixture Paint",
- "transport": {"type": "stdio", "command": "must-not-run"},
- }), encoding="utf-8")
- fresh = client.get("/api/mcp/catalog?detect_apps=true").json()
- added = next(entry for entry in fresh["entries"] if entry["name"] == "fixture-paint")
- assert added["suggest"] is None
- assert added["detected_apps"] == ["fixture paint"]
- unusual_names = ("_fixture-paint", "fixture-paint-", "x" * 81)
- for name in unusual_names:
- directory = tmp_path / "catalog" / name
- directory.mkdir()
- (directory / "manifest.yaml").write_text(yaml.safe_dump({
- "manifest_version": 1, "name": name, "description": "Valid catalog name, unusable inferred app label",
- "transport": {"type": "stdio", "command": "must-not-run"},
- }), encoding="utf-8")
- mixed = {entry["name"]: entry for entry in client.get("/api/mcp/catalog?detect_apps=true").json()["entries"]}
- assert mixed["fixture-paint"]["detected_apps"] == ["fixture paint"]
- assert all(mixed[name]["detected_apps"] == [] for name in unusual_names)
- manifest.unlink()
- assert all(entry["name"] != "fixture-paint" for entry in client.get("/api/mcp/catalog?detect_apps=true").json()["entries"])
- assert client.get("/api/mcp/catalog", params={"profile": "missing", "detect_apps": True}).status_code == 404
-
-
-def test_catalog_discovery_failure_retains_entries_as_unknown(catalog_client, monkeypatch):
- from hermes_cli import mcp_app_detection as detection
-
- client, _home, _other = catalog_client
- calls = []
-
- def failed_discovery(criteria):
- calls.append(criteria)
- raise OSError("private path must not be returned")
-
- monkeypatch.setattr(detection, "discover_catalog_apps", failed_discovery)
- old = client.get("/api/mcp/catalog?detect_apps=false").json()
- assert calls == []
- response = client.get("/api/mcp/catalog?detect_apps=true")
- assert response.status_code == 200
- data = response.json()
- assert data["discovery"] == {"scope": "backend", "status": "unavailable", "platform": sys.platform}
- assert all(entry.pop("detected_apps") == [] for entry in data["entries"])
- data.pop("discovery")
- assert data == old
- assert "private path" not in response.text
- assert client.get("/api/mcp/catalog?detect_apps=not-a-bool").status_code == 422
diff --git a/website/docs/developer-guide/onboarding-recommendations.md b/website/docs/developer-guide/onboarding-recommendations.md
deleted file mode 100644
index fa3b8b84d22..00000000000
--- a/website/docs/developer-guide/onboarding-recommendations.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-title: Onboarding recommendations
-sidebar_label: Onboarding recommendations
----
-
-# Onboarding recommendations
-
-Guided onboarding suggests outcomes from the user's app preferences and observed capabilities. It does not grant access or implement a second connection lifecycle. The feature remains inside the existing `HERMES_GUEST_ONBOARDING` flow.
-
-## What takes priority
-
-The fork card leads with two first tasks built from the setup picks and the scan; a recognized RTX/DGX Spark or a newly set-up machine gets "Install a few apps for this &lt;machine>" among them, and "Help me set up this &lt;machine>" is always a row. The fresh-machine signal is the existing age heuristic, not proof of the OS installation date. A Spark with unknown age gets a hardware-specific callout, not a claim that its OS is new.
-
-Otherwise the guide favors relevant app-backed tasks, with a connection-free alternative. Detecting an app earns at most one option; the remaining choices come from the user's goals and other capabilities. Several ideas for the same app are appropriate only when explicitly requested. Choosing an inbox task means using real inbox data after permission, not building a mock inbox when permission is missing. A skipped or unavailable required connection leaves that task blocked; the user can choose a different task or supply data.
-
-## Catalog metadata
-
-Read the actual catalog at runtime. An entry does not need new recommendation metadata: detection falls back to its catalog name (with slug separators treated as spaces), and the model derives tasks from its description. Removing an entry removes it from future snapshots. No product-specific entry, package or install recipe belongs in the onboarding change.
-
-Catalog owners may optionally provide richer hints:
-
-```yaml
-suggest:
- keywords: [example, modeling]
- hosts: [example.com]
- applications: [Example Studio]
- requires_app: true
- examples:
- - Light a product render in Example Studio
-```
-
-- `keywords` and `hosts` retain their existing meaning. `applications`, `examples` and `requires_app` are optional additions.
-- `applications` contains up to 16 safe labels/aliases, each at most 80 characters. No paths, shell arguments, regexes or scripts.
-- `examples` contains up to six printable single-line outcomes, at most 240 characters each. The model distills those into the existing option chips' shorter labels.
-- `requires_app` is true only when the local application is a prerequisite. Desktop-app presence can be a relevance signal for a cloud service without being a requirement.
-- Example capabilities and setup prerequisites must be checked against the integration's actual documentation. A catalog entry is not proof of account access, entitlement, add-on readiness or a live tool connection.
-
-The managed-app picker keeps its curated leaders while making other enabled rows from the live catalog searchable. A newly deployed managed connector is no longer discarded merely because its slug is absent from the leader list. No new portal metadata endpoint is required.
-
-## Discovery and scope
-
-`GET /api/mcp/catalog?detect_apps=true` adds:
-
-- `entries[].detected_apps`: matching catalog-derived application names or optional explicit aliases only.
-- `discovery`: `{scope: "backend", status: "ok" | "unavailable", platform: string}`.
-
-The default catalog request performs no app discovery. The optional scan checks standard application locations and exact safe PATH candidates on the **backend machine**, where its MCP processes run. It never launches apps, starts MCPs, installs packages, reads application documents or contacts the network. It returns neither a full inventory nor filesystem paths.
-
-The scan has directory, entry and time budgets. It is not an exhaustive installed-software inventory. Access failures, an exhausted budget or an unsupported host report `unavailable`; positive observations remain useful, and missing observations are not evidence of absence. macOS app bundles, Linux desktop entries and Windows common program directories have platform-specific readers. Windows registry enumeration is not included.
-
-Desktop pins the catalog request to the guide or handoff's backend/profile. It never combines a desktop-local app observation with a remote MCP host. A temporary-profile API probe can retain the actual OS home for read-only app discovery without reading the installed profile's configuration.
-
-## Recommendation and execution boundaries
-
-Recommendations rank explicit task relevance and selected apps before configuration and app-presence signals. Disabled integrations are not automatically resurfaced without explicit interest. Required local apps need positive detection or an existing configuration before they qualify. Each seed contains a small selection of candidates, not the entire catalog.
-
-The guide receives a read-only snapshot when its session is created. The handoff refreshes that snapshot for the working profile and includes the selected candidates' full setup notes. Neither path mutates an existing system prompt, caches connection authority, or performs setup. An old or unavailable catalog falls back to the existing onboarding behavior.
-
-| Evidence | Meaning | Next action |
-| --- | --- | --- |
-| App detected, MCP absent | Application signal, setup still needed | Existing `manage_connections` install approval |
-| MCP configured but disabled, explicitly requested | Configuration exists, intentionally not active | Existing enable approval |
-| MCP configured and enabled | Configuration only; connection unverified | Discover its available tools and verify before use |
-| Managed app not connected | Account permission required | Existing managed connect card |
-| Skipped, unavailable or missing session capability | Not authorized/usable | Explain the blocked task; no bypass or automatic retry |
-
-For MCP targets, `status` is **not** a supported `manage_connections` action. The snapshot supplies `setupAction` (`install`, `enable`, or null); authorization is requested only when actually required. Managed account status remains a separate supported action. This distinction is verified against actual generated tool arguments, not only prompt text.
-
-The legacy composer suggestion provider can only complete hosted HTTP OAuth. It excludes local-app and non-OAuth entries so new metadata cannot route a local editor into that unrelated flow. Onboarding uses the shared connection operation instead.
-
-## Compatibility with the connection-operation work
-
-The implementation consumes the public `manage_connections` tool and the existing catalog API. It does not modify connection-operation states, generated RPC contracts, account identifiers, OAuth callbacks, retry ownership, watcher behavior or settled-result handling.
-
-It was checked against the current integration and Sid's pending [connection-operation PR](https://github.com/NousResearch/hermes-agent/pull/111008). That PR moves MCP execution into the backend; recommendations do not depend on which side currently executes the operation. Optional catalog fields preserve older clients, and missing fields preserve older backends. Sid's cancelled portal toolkit-metadata endpoint is not a dependency.
-
-There is one intentional product-policy overlap in the onboarding runbooks and their tests: the old requirement to produce a no-account substitute is replaced by the accepted task's actual prerequisites. That overlap must be reconciled when the branches meet, not retained as contradictory instructions. Compatibility with an unknown future breaking API change is not implied.
-
-## Verification boundaries
-
-Contract tests cover catalogue parsing, opt-in read-only discovery, A/B/A profile isolation, missing metadata, ranking, backend-pinned seed creation, legal MCP setup actions and preservation of fresh-machine/Spark priority.
-
-Live inference over synthetic onboarding turns can verify the recommended outcome and generated setup action. Native discovery can verify a real installed app signal. Neither is proof of OAuth completion or execution inside Blender: that still requires the application's add-on/server, the user's approval and a harmless live tool check. Read the actual returned entry's setup notes; onboarding does not supply its own integration recipe.
diff --git a/website/docs/user-guide/features/mcp.md b/website/docs/user-guide/features/mcp.md
index d29bca692f5..cca98c08f2a 100644
--- a/website/docs/user-guide/features/mcp.md
+++ b/website/docs/user-guide/features/mcp.md
@@ -297,7 +297,10 @@ keywords as a completed word, or contains a pasted link whose hostname ends
with one of the host suffixes. It is purely advisory — installs still flow
through the same validated catalog/config paths — and most hosted remote
entries (Atlassian, Sentry, Notion, Stripe, Vercel, Supabase, and friends)
-declare it.
+declare it. Optional `applications:` (up to 16 app names), `requires_app: true`
+(the MCP needs that local app; such entries are never offered as a one-click
+pill) and `examples:` (up to six one-line outcomes) describe entries that drive
+a desktop application.
GitHub is deliberately **not** in the catalog: its hosted MCP requires each
client to bring its own OAuth app (generic dynamic client registration is