Skip to content

The agent that grows with you

fix(telemetry): a cancelled or lapsed provider sign-in is abandoned, not failed

Tekniumac9c8b4d0214
diff --git a/hermes_cli/auth_device_flow.py b/hermes_cli/auth_device_flow.py
index 1627970912a..5f5a7fec1f3 100644
--- a/hermes_cli/auth_device_flow.py
+++ b/hermes_cli/auth_device_flow.py
@@ -22,6 +22,7 @@ from urllib.parse import parse_qs, urlparse
from hermes_cli.auth_constants import (
AuthError, DEFAULT_NOUS_PORTAL_URL, DEVICE_AUTH_POLL_INTERVAL_CAP_SECONDS,
DEVICE_CODE_GRANT_TYPE, OAUTH_OVER_SSH_DOCS_URL, httpx)
+from hermes_cli.auth_error_copy import DeviceCodeExpired
from utils import is_truthy_value
# Log-record parity with the origin module (caplog tests pin "hermes_cli.auth").
@@ -394,7 +395,7 @@ def _poll_for_token(
"Token endpoint returned a non-JSON error response"),
# Enriched at the SOURCE so the CLI login and the dashboard/desktop poller
# (web_server_oauth._nous_promotion_poller surfaces it to the UI) both inherit the guidance.
- on_timeout=lambda: TimeoutError(_nous_device_auth_timeout_message(portal_base_url)))
+ on_timeout=lambda: DeviceCodeExpired(_nous_device_auth_timeout_message(portal_base_url)))
def _prompt_yes_no(prompt: str, *, default: str) -> bool:
diff --git a/hermes_cli/auth_error_copy.py b/hermes_cli/auth_error_copy.py
index fc66db705a3..aef0209c870 100644
--- a/hermes_cli/auth_error_copy.py
+++ b/hermes_cli/auth_error_copy.py
@@ -30,6 +30,16 @@ DEVICE_FLOW_ERROR_COPY = {
}
+class DeviceCodeExpired(TimeoutError):
+ """The device code ran out before the user approved it in the browser (not a network timeout)."""
+
+ code = "device_code_timeout"
+
+
+# ``AuthError.code`` values the device-code pollers raise when the code runs out.
+_DEVICE_CODE_EXPIRED_CODES = frozenset({"device_code_timeout", "timeout"})
+
+
class SignInCopyError(RuntimeError):
"""Exception whose ``str()`` is already user copy (lead line + ``Details:`` line)."""
@@ -40,12 +50,18 @@ class SignInCopyError(RuntimeError):
def is_network_error(exc: BaseException) -> bool:
"""True for connection/DNS/timeout failures from httpx, requests or the stdlib."""
- if isinstance(exc, SignInCopyError):
+ if isinstance(exc, (SignInCopyError, DeviceCodeExpired)):
return False
names = {cls.__name__ for cls in type(exc).__mro__}
return bool(names & _NETWORK_ERROR_TYPES) or isinstance(exc, (ConnectionError, TimeoutError))
+def is_device_code_expired(exc: BaseException) -> bool:
+ """True when a device-code sign-in ended because its code ran out (any provider)."""
+ return (getattr(exc, "code", None) in _DEVICE_CODE_EXPIRED_CODES
+ or getattr(exc, "oauth_error_code", "") == "expired_token")
+
+
def is_cancelled(exc: BaseException) -> bool:
return isinstance(exc, (KeyboardInterrupt, EOFError)) or (
isinstance(exc, SystemExit) and exc.code in (130, None, 0))
diff --git a/hermes_cli/observability/shared_metrics_setup.py b/hermes_cli/observability/shared_metrics_setup.py
index 9a2d2e1097f..002656103e7 100644
--- a/hermes_cli/observability/shared_metrics_setup.py
+++ b/hermes_cli/observability/shared_metrics_setup.py
@@ -34,21 +34,24 @@ STALE_AFTER_S = 3600
_NOT_A_PROVIDER = frozenset({"aux-config", "cancel", "reasoning", "remove-custom"})
_AUTH_ERROR_TYPES = frozenset({"AuthError", "SignInCopyError"})
_OAUTH_SESSION_KEY = "_metrics_setup_flow"
+_OAUTH_FAILURE_KEY = "_metrics_setup_failure"
+# Ends that are not failures: the user stopped it, or let the sign-in code run out.
+_NOT_FAILURES = frozenset({"cancelled", "expired"})
# Tokens other tools read too (gh, the Hugging Face Hub): saving one is not connecting that provider.
_SHARED_TOKENS = frozenset({"GH_TOKEN", "GITHUB_TOKEN", "HF_TOKEN"})
# OAuth session status (+ reason) at its end -> (event, failure_class).
_OAUTH_ENDINGS = {
"approved": ("completed", "none"),
- "cancelled": ("failed", "cancelled"),
+ "cancelled": ("abandoned", "none"),
"denied": ("failed", "auth"),
"expired": ("abandoned", "none"),
- "error": ("failed", "other"),
}
_OAUTH_REASONS = {
- "user_declined": ("failed", "cancelled"),
- "superseded": ("failed", "cancelled"),
+ "user_declined": ("abandoned", "none"),
+ "superseded": ("abandoned", "none"),
"timeout": ("abandoned", "none"),
"account_retired": ("failed", "auth"),
+ "anon_unreachable": ("failed", "network"),
}
@@ -98,19 +101,25 @@ def provider_setup_fields(*, surface: Any, provider: Any, event: Any, failure_cl
if surface not in contract.PROVIDER_SETUP_SURFACES or event not in contract.PROVIDER_SETUP_EVENTS:
return None
failure = "none"
- if event == "failed":
+ if event == "failed" and failure_class in _NOT_FAILURES: # a cancel or a lapsed code is a walk-away
+ event = "abandoned"
+ elif event == "failed":
failure = failure_class if failure_class in contract.PROVIDER_SETUP_FAILURE_CLASSES - {"none"} else "other"
return {"event": event, "failure_class": failure, "provider": provider_metric_name(provider), "surface": surface}
def setup_failure_class(exc: BaseException) -> str:
- """Closed class for an exception that ended a setup flow; inert (type checks only)."""
- from hermes_cli.auth_error_copy import is_cancelled, is_network_error
+ """Closed class for an exception that ended a setup flow; inert (type checks only). ``cancelled``
+ and ``expired`` (the sign-in code ran out before approval) are recorded ``abandoned``."""
+ from hermes_cli.auth_error_copy import is_cancelled, is_device_code_expired, is_network_error
names = {cls.__name__ for cls in type(exc).__mro__}
- if is_cancelled(exc) or "_SetupCancelled" in names: # Esc in the setup menus
+ # Esc in the setup menus, or consent declined on the provider's page.
+ if is_cancelled(exc) or "_SetupCancelled" in names or getattr(exc, "oauth_error_code", "") == "access_denied":
return "cancelled"
- if is_network_error(exc):
+ if is_device_code_expired(exc):
+ return "expired"
+ if is_network_error(exc) or (exc.__cause__ is not None and is_network_error(exc.__cause__)):
return "network"
if names & _AUTH_ERROR_TYPES:
return "auth"
@@ -342,10 +351,10 @@ def _is_go_back(exc: BaseException) -> bool:
def _close_backed_out() -> None:
- """The user went Back out of a provider flow and never resumed it: it ends as ``cancelled``."""
+ """The user went Back out of a provider flow and never resumed it: it ends ``abandoned``."""
pending, _cli.backed_out = getattr(_cli, "backed_out", None), None
if pending is not None:
- finish_provider_setup(pending[0], "failed", "cancelled")
+ finish_provider_setup(pending[0], "abandoned")
def _resumes(flow: SetupFlow, surface: Any, provider: Any) -> bool:
@@ -363,14 +372,14 @@ def cli_provider_setup(provider: Any) -> Iterator[None]:
tests driving the picker directly) nothing is tracked.
Completed when the flow saved a choice or changed the model route; a flow that returns without
- either failed with the class it reported, else the user backed out (``cancelled``). Back (Left
+ either failed with the class it reported, else the user backed out (``abandoned``). Back (Left
arrow) leaves the flow open: the replayed picker re-entering the same provider continues it (one
- ``started``); picking another provider, or leaving the entry point, ends it ``cancelled``.
+ ``started``); picking another provider, or leaving the entry point, ends it ``abandoned``.
"""
surface = getattr(_cli, "surface", None)
pending, _cli.backed_out = getattr(_cli, "backed_out", None), None
if pending is not None and not _resumes(pending[0], surface, provider):
- finish_provider_setup(pending[0], "failed", "cancelled")
+ finish_provider_setup(pending[0], "abandoned")
pending = None
flow, before = pending or (begin_provider_setup(surface, provider) if surface else None, None)
if flow is None:
@@ -397,8 +406,10 @@ def cli_provider_setup(provider: Any) -> Iterator[None]:
landed = before is not None and _model_route() != before
if landed:
finish_provider_setup(flow, "completed")
+ elif hints["failure"]:
+ finish_provider_setup(flow, "failed", hints["failure"])
else:
- finish_provider_setup(flow, "failed", hints["failure"] or "cancelled")
+ finish_provider_setup(flow, "abandoned")
# ---- dashboard / Desktop OAuth sessions ------------------------------------------------------
@@ -422,6 +433,14 @@ def attach_oauth_setup(sess: dict[str, Any] | None, flow: SetupFlow | None) -> N
sess[_OAUTH_SESSION_KEY] = flow
+def note_oauth_failure(sess: dict[str, Any] | None, exc: BaseException) -> None:
+ """A sign-in poller died with ``exc``: keep its closed class for the settle (the status alone is
+ ``error`` for a lapsed code, a dropped network and a refusal alike)."""
+ with contextlib.suppress(Exception):
+ if isinstance(sess, dict):
+ sess[_OAUTH_FAILURE_KEY] = setup_failure_class(exc)
+
+
def settle_oauth_setup(sess: dict[str, Any] | None, *, abandoned: bool = False) -> None:
"""End an OAuth session's flow from its status (no-op while pending, or when already ended)."""
try:
@@ -430,6 +449,8 @@ def settle_oauth_setup(sess: dict[str, Any] | None, *, abandoned: bool = False)
status = "cancelled" if sess.get("cancelled") else str(sess.get("status") or "")
ending = _OAUTH_REASONS.get(str(sess.get("reason") or "")) if status in {"denied", "error"} else None
ending = ending or _OAUTH_ENDINGS.get(status)
+ if ending is None and status == "error":
+ ending = ("failed", sess.get(_OAUTH_FAILURE_KEY) or "other")
if ending is None:
if not abandoned:
return
diff --git a/hermes_cli/web_routers/oauth.py b/hermes_cli/web_routers/oauth.py
index a7caf6b4012..904cf73fefa 100644
--- a/hermes_cli/web_routers/oauth.py
+++ b/hermes_cli/web_routers/oauth.py
@@ -128,7 +128,7 @@ def _track_oauth_setup(flow, session_id: str) -> None:
with _oauth_sessions_lock:
sess = _oauth_sessions.get(session_id)
if sess is None: # cancelled before the start response even returned
- finish_provider_setup(flow, "failed", "cancelled")
+ finish_provider_setup(flow, "abandoned")
return
attach_oauth_setup(sess, flow)
settle_oauth_setup(sess)
@@ -331,9 +331,11 @@ def _codex_full_login_worker(session_id: str) -> None:
sess["status"] = "approved"
_log.info("oauth/device: openai-codex login completed (session=%s)", session_id)
except Exception as e:
+ from hermes_cli.observability.shared_metrics_setup import note_oauth_failure
_log.warning("codex device-code worker failed (session=%s): %s", session_id, e)
with _oauth_sessions_lock:
s = _oauth_sessions.get(session_id)
+ note_oauth_failure(s, e)
if s:
s["status"] = "error"
s["error_message"] = str(e)
@@ -835,9 +837,10 @@ async def _end_oauth_setup_metric(flow, exc: Exception) -> None:
return
from hermes_cli.observability.shared_metrics_setup import finish_provider_setup, setup_failure_class
with contextlib.suppress(Exception):
- # A 401/403 from the start route is the provider refusing this account/client.
- refused = isinstance(exc, HTTPException) and exc.status_code in {401, 403}
- failure = "auth" if refused else setup_failure_class(exc)
+ # A 401/403 from the start route is the provider refusing this account/client; a 504 is the
+ # provider not answering in time.
+ status = exc.status_code if isinstance(exc, HTTPException) else None
+ failure = {401: "auth", 403: "auth", 504: "network"}.get(status) or setup_failure_class(exc)
await asyncio.get_running_loop().run_in_executor(None, finish_provider_setup, flow, "failed", failure)
@@ -894,4 +897,7 @@ async def cancel_oauth_session(session_id: str, request: Request, profile: Optio
_oauth_sessions.pop(session_id, None)
if sess is None:
return {"ok": False, "message": "session not found"}
+ # Recorded now, not when the poller next wakes: a Nous/xAI poll can block for the code's lifetime.
+ from hermes_cli.observability.shared_metrics_setup import settle_oauth_setup
+ await asyncio.get_running_loop().run_in_executor(None, settle_oauth_setup, sess)
return {"ok": True, "session_id": session_id}
diff --git a/hermes_cli/web_server_oauth.py b/hermes_cli/web_server_oauth.py
index d51bcfbb6b6..89114ae04f6 100644
--- a/hermes_cli/web_server_oauth.py
+++ b/hermes_cli/web_server_oauth.py
@@ -208,7 +208,9 @@ def _oauth_poller(label: str):
else:
_log.info("oauth/device: %s login completed (session=%s)", label, session_id)
except Exception as e:
+ from hermes_cli.observability.shared_metrics_setup import note_oauth_failure
_log.warning("%s device-code poll failed (session=%s): %s", label, session_id, e)
+ note_oauth_failure(sess, e)
with _oauth_sessions_lock:
sess["status"] = "error"
sess["error_message"] = str(e)
diff --git a/tests/hermes_cli/test_shared_metrics_signals.py b/tests/hermes_cli/test_shared_metrics_signals.py
index eb9162aecde..ed29f0e5b1b 100644
--- a/tests/hermes_cli/test_shared_metrics_signals.py
+++ b/tests/hermes_cli/test_shared_metrics_signals.py
@@ -234,9 +234,9 @@ def test_cli_flow_classifies_landed_backed_out_failed_and_raised(marks, monkeypa
pass
ends = [r for r in _setup_rows(marks.rows) if r[2] != "started"]
assert ends == [
- ("cli_setup", "anthropic", "completed", "none"), ("cli_setup", "anthropic", "failed", "cancelled"),
+ ("cli_setup", "anthropic", "completed", "none"), ("cli_setup", "anthropic", "abandoned", "none"),
("cli_setup", "nous", "failed", "no_models"), ("cli_setup", "gemini", "completed", "none"),
- ("cli_setup", "xai", "failed", "cancelled"), ("cli_setup", "xai", "failed", "network"),
+ ("cli_setup", "xai", "abandoned", "none"), ("cli_setup", "xai", "failed", "network"),
]
setup_metrics.note_provider_setup_saved() # outside a flow: inert
@@ -267,11 +267,11 @@ def test_cli_setup_navigation_esc_cancels_and_back_resumes_one_flow(marks, monke
with setup_metrics.provider_setup_surface("cli_setup"):
pass # ...and leaving the entry point without resuming it ends it
assert _setup_rows(marks.rows) == [
- ("cli_model", "xai", "started", "none"), ("cli_model", "xai", "failed", "cancelled"),
+ ("cli_model", "xai", "started", "none"), ("cli_model", "xai", "abandoned", "none"),
("cli_model", "anthropic", "started", "none"), ("cli_model", "anthropic", "completed", "none"),
- ("cli_model", "nous", "started", "none"), ("cli_model", "nous", "failed", "cancelled"),
+ ("cli_model", "nous", "started", "none"), ("cli_model", "nous", "abandoned", "none"),
("cli_model", "gemini", "started", "none"), ("cli_model", "gemini", "completed", "none"),
- ("cli_setup", "xai", "started", "none"), ("cli_setup", "xai", "failed", "cancelled"),
+ ("cli_setup", "xai", "started", "none"), ("cli_setup", "xai", "abandoned", "none"),
]
@@ -280,8 +280,9 @@ def test_cli_setup_navigation_esc_cancels_and_back_resumes_one_flow(marks, monke
({"status": "expired"}, ("abandoned", "none")),
({"status": "error", "reason": "timeout"}, ("abandoned", "none")),
({"status": "denied"}, ("failed", "auth")),
- ({"status": "denied", "reason": "user_declined"}, ("failed", "cancelled")),
- ({"status": "pending", "cancelled": True}, ("failed", "cancelled")),
+ ({"status": "denied", "reason": "user_declined"}, ("abandoned", "none")),
+ ({"status": "pending", "cancelled": True}, ("abandoned", "none")),
+ ({"status": "error", "reason": "anon_unreachable"}, ("failed", "network")),
])
def test_oauth_session_endings(marks, monkeypatch, sess, ending):
monkeypatch.setattr(setup_metrics, "web_setup_surface", lambda: "desktop")
@@ -292,6 +293,58 @@ def test_oauth_session_endings(marks, monkeypatch, sess, ending):
assert [r[2:] for r in _setup_rows(marks.rows)] == [("started", "none"), ending]
+def test_cancel_or_lapsed_code_is_never_a_failure_and_poller_errors_keep_their_class(marks, monkeypatch):
+ """A user cancel / a sign-in code left to run out is ``abandoned`` on every surface; a dashboard
+ poller's exception keeps its closed class instead of the bare session ``error`` -> ``other``."""
+ import httpx
+
+ from hermes_cli.auth_constants import _codex_err, _xai_err
+ from hermes_cli.auth_device_flow import _poll_for_token
+ from hermes_cli.auth_error_copy import device_flow_error
+ from hermes_cli.web_server_oauth import _oauth_poller, _oauth_sessions
+
+ monkeypatch.setattr(setup_metrics, "web_setup_surface", lambda: "desktop")
+ with setup_metrics.provider_setup_surface("cli_model"): # CLI: Ctrl-C mid sign-in
+ with pytest.raises(KeyboardInterrupt), setup_metrics.cli_provider_setup("nous"):
+ raise KeyboardInterrupt
+ flow = setup_metrics.begin_oauth_setup("openai-codex", None) # web start route: cancelled pre-response
+ setup_metrics.finish_provider_setup(flow, "failed", setup_metrics.setup_failure_class(KeyboardInterrupt()))
+
+ class Pending: # the real Nous poll loop running out of time on authorization_pending
+ status_code = 400
+
+ def json(self):
+ return {"error": "authorization_pending"}
+
+ with pytest.raises(TimeoutError) as lapsed:
+ _poll_for_token(SimpleNamespace(post=lambda *a, **k: Pending()), "https://p", "c", "d", 0, 1)
+ dropped = _xai_err("xAI OIDC discovery failed", "xai_discovery_failed")
+ dropped.__cause__ = httpx.ConnectError("down")
+ for provider, exc in [
+ ("nous", lapsed.value), ("xai-oauth", _xai_err("Timed out", "device_code_timeout")),
+ ("openai-codex", _codex_err("Login timed out after 15 minutes.", "device_code_timeout")),
+ ("nous", device_flow_error("access_denied", "declined")), ("xai-oauth", dropped),
+ ("nous", device_flow_error("invalid_client", "nope")),
+ ]:
+ sess = {"status": "pending", "profile": None}
+ _oauth_sessions["probe"] = sess
+ setup_metrics.attach_oauth_setup(sess, setup_metrics.begin_oauth_setup(provider, None))
+
+ @_oauth_poller(provider)
+ def poller(_sid, _sess, exc=exc):
+ raise exc
+
+ poller("probe")
+ setup_metrics.settle_oauth_setup(sess)
+ _oauth_sessions.pop("probe", None)
+ assert [r for r in _setup_rows(marks.rows) if r[2] != "started"] == [
+ ("cli_model", "nous", "abandoned", "none"), ("desktop", "openai-codex", "abandoned", "none"),
+ ("desktop", "nous", "abandoned", "none"), ("desktop", "xai-oauth", "abandoned", "none"),
+ ("desktop", "openai-codex", "abandoned", "none"), ("desktop", "nous", "abandoned", "none"),
+ ("desktop", "xai-oauth", "failed", "network"), ("desktop", "nous", "failed", "auth"),
+ ]
+
+
def test_pending_oauth_session_does_not_settle(marks, monkeypatch):
monkeypatch.setattr(setup_metrics, "web_setup_surface", lambda: "dashboard")
sess = {"status": "pending"}
diff --git a/website/docs/developer-guide/relay-shared-metrics.md b/website/docs/developer-guide/relay-shared-metrics.md
index fb9be1d2925..414c5c8f9f0 100644
--- a/website/docs/developer-guide/relay-shared-metrics.md
+++ b/website/docs/developer-guide/relay-shared-metrics.md
@@ -492,7 +492,7 @@ database and the count is not reported.
| Metric | Dimensions | Question it answers |
|---|---|---|
| `hermes.tool_unavailable.count` | provider, model, tool name (shipped built-ins only) | Which toolsets should be on by default: the model called a tool Hermes ships that this session did not enable. Any other unknown name (plugin, MCP, hallucinated) stays a `model_tool_quality` `unknown_tool` issue only. A built-in the session enabled but deferred behind `tool_search` (reachable through `tool_call`) is not unavailable. Background reviews, delegated children and cron jobs, whose toolsets are narrowed on purpose, are excluded. |
-| `hermes.provider_setup.count` | provider (catalog name; custom endpoints read `custom`), surface (`cli_setup`, `cli_model`, `tui`, `desktop`, `dashboard`), event (`started`, `completed`, `failed`, `abandoned`), failure class (`auth`, `network`, `no_models`, `cancelled`, `other`; `none` unless failed) | Where connecting a provider breaks down. `started` counts once a provider is picked; the flow's end is recorded by the surface that ran it. In the CLI pickers Esc ends the flow `failed`/`cancelled`; Back (Left arrow) keeps it open, so picking the same provider again continues it (one `started`), while picking another provider or leaving the command ends it `cancelled`. A flow nobody finished leaves a local marker that the next setup start or Hermes start in the profile reports as `abandoned` (its process is gone, or it has been pending over an hour); an OAuth device code left to expire is also `abandoned`. A new or changed provider API key saved from a form (TUI/Desktop/dashboard) and a newly added custom endpoint start and complete in one action; clearing a key, re-saving the same key, editing an existing endpoint, ecosystem tokens (`GITHUB_TOKEN`, `GH_TOKEN`, `HF_TOKEN`) and keys a tool's settings panel also asks for (e.g. `GEMINI_API_KEY`, `XAI_API_KEY`, `DEEPINFRA_API_KEY`) are not counted from the generic key form (the Desktop's onboarding and model settings mark their saves as a provider connection, so those count). Never a key, token, base URL or error text. Leaving the provider picker before choosing one is not counted. |
+| `hermes.provider_setup.count` | provider (catalog name; custom endpoints read `custom`), surface (`cli_setup`, `cli_model`, `tui`, `desktop`, `dashboard`), event (`started`, `completed`, `failed`, `abandoned`), failure class (`auth`, `network`, `no_models`, `other`; `none` unless failed; `cancelled` is no longer recorded, a cancel is `abandoned`) | Where connecting a provider breaks down. `started` counts once a provider is picked; the flow's end is recorded by the surface that ran it. A flow the user walked away from is `abandoned`, never `failed`: Esc or Ctrl-C in the CLI pickers, Cancel/Back on a Desktop or dashboard sign-in, consent declined on the provider's page, and a sign-in code left to expire (any provider). Back (Left arrow) in the CLI keeps the flow open, so picking the same provider again continues it (one `started`), while picking another provider or leaving the command ends it `abandoned`. A flow nobody finished leaves a local marker that the next setup start or Hermes start in the profile reports as `abandoned` (its process is gone, or it has been pending over an hour). A Desktop/dashboard sign-in that dies mid-poll keeps the class of the error that ended it (`network` for a dropped connection, `auth` for a refusal), not a bare `other`. A new or changed provider API key saved from a form (TUI/Desktop/dashboard) and a newly added custom endpoint start and complete in one action; clearing a key, re-saving the same key, editing an existing endpoint, ecosystem tokens (`GITHUB_TOKEN`, `GH_TOKEN`, `HF_TOKEN`) and keys a tool's settings panel also asks for (e.g. `GEMINI_API_KEY`, `XAI_API_KEY`, `DEEPINFRA_API_KEY`) are not counted from the generic key form (the Desktop's onboarding and model settings mark their saves as a provider connection, so those count). Never a key, token, base URL or error text. Leaving the provider picker before choosing one is not counted. |
| `hermes.feature_adoption.count` | feature (`memory`, `skills_created`, `delegation`, `cron`, `gateway_platform`, `desktop`, `tui`, `mcp`, `plugins`, `browser`, `voice`, `kanban`, `projects`, `bot_mode`, `curator`), days since install (`same_day`, `1d_to_7d`, `7d_to_30d`, `30d_to_90d`, `gte_90d`, `unknown`) | How long after install each major feature is first really used. Once per feature per install, latched in the local database, derived from the counters above (a foreground memory write, a skill created at the user's request (not by Hermes' background review), a successful MCP/plugin/browser/TTS/kanban tool call, a Desktop/TUI/gateway task, a cron run, a manual curator run; the scheduled curator pass does not count) plus direct first-use reports for Bot Mode messages and project creation. The age is the owning profile's (its first session). |
| `hermes.feature_disabled.count` | kind (`toolset`, `skill`, `plugin`, `platform`, `setting`, `memory`, `curator`, `compression`), name, surface (`cli_tools`, `cli_config`, `cli_slash`, `tui`, `desktop`, `dashboard`), event (`disabled`, `re_enabled`) | What users turn off. Diffed at the config write itself: a default-on toolset removed, a skill or plugin added to its disabled list, a default-`true` setting set false (and each moved back). Names are public only when shipped — toolset key, bundled/catalog skill, bundled/catalog plugin (messaging-platform plugins report as `platform`), `DEFAULT_CONFIG` key path (never a value) — else `custom`. Uninstalling a catalog skill counts as `disabled`. Only user entry points record (`hermes tools` / `config` / `skills` / `plugins`, chat slash commands, TUI/Desktop, dashboard); setup and migrations do not, even when a migration runs inside one of them (`hermes config migrate`, a profile created from the dashboard). A setting whose value is a `${VAR}` template is not compared. The diff and the record run on a background thread after the write, outside every config lock. At most once per (kind, name, event) per day. |
<!-- ---- end v5 signals ---- -->