From bb4703c761ea6687b6399aa2e61e0a08fabd3ca3 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 26 May 2026 15:40:24 -0700 Subject: [PATCH] docs(auth): replace stale 'hermes login' references with 'hermes auth add' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'hermes login' was removed (the command now just prints a deprecation message and exits). The bundled hermes-agent SKILL.md, in-code error messages, the tip rotation, the proxy adapters, and the docs site still pointed agents and users at the dead command — so models loading the skill kept running 'hermes login --provider openai-codex' and getting a dead-end print. Replacements use the canonical 'hermes auth add ' surface (or bare 'hermes auth' for the interactive manager). Files: - skills/autonomous-ai-agents/hermes-agent/SKILL.md (+ regenerated docs page) - hermes_cli/tips.py (tip rotation) - agent/google_oauth.py (gemini-cli error message) - agent/conversation_loop.py (nous re-auth troubleshooting line) - agent/credential_sources.py (docstring) - hermes_cli/proxy/cli.py + hermes_cli/proxy/adapters/nous_portal.py (proxy auth hints) - tests/hermes_cli/test_proxy.py (updated assertions) - website/docs/reference/faq.md, website/docs/user-guide/features/subscription-proxy.md - zh-Hans i18n mirrors for the above 'hermes logout' is still a live command and is left untouched. The 'hermes login' stub in hermes_cli/auth.py:login_command() and the cli-commands.md 'Deprecated' rows are intentionally kept as the discoverable deprecation surface. --- agent/conversation_loop.py | 2 +- agent/credential_sources.py | 10 ++++---- agent/google_oauth.py | 2 +- hermes_cli/proxy/adapters/nous_portal.py | 4 ++-- hermes_cli/proxy/cli.py | 2 +- hermes_cli/tips.py | 2 +- .../hermes-agent/SKILL.md | 10 ++++---- tests/hermes_cli/test_proxy.py | 4 ++-- website/docs/reference/faq.md | 2 +- .../user-guide/features/subscription-proxy.md | 6 ++--- .../autonomous-ai-agents-hermes-agent.md | 24 +++++++++++-------- .../current/reference/faq.md | 2 +- .../user-guide/features/subscription-proxy.md | 4 ++-- .../autonomous-ai-agents-hermes-agent.md | 10 ++++---- 14 files changed, 46 insertions(+), 38 deletions(-) diff --git a/agent/conversation_loop.py b/agent/conversation_loop.py index abcb342d04f..35a64df48fe 100644 --- a/agent/conversation_loop.py +++ b/agent/conversation_loop.py @@ -2218,7 +2218,7 @@ def run_conversation( print(f"{agent.log_prefix} Response: {_body_text}") print(f"{agent.log_prefix} Most likely: Portal OAuth expired, account out of credits, or agent key revoked.") print(f"{agent.log_prefix} Troubleshooting:") - print(f"{agent.log_prefix} • Re-authenticate: hermes login --provider nous") + print(f"{agent.log_prefix} • Re-authenticate: hermes auth add nous") print(f"{agent.log_prefix} • Check credits / billing: https://portal.nousresearch.com") print(f"{agent.log_prefix} • Verify stored credentials: {_dhh}/auth.json") print(f"{agent.log_prefix} • Switch providers temporarily: /model --provider openrouter") diff --git a/agent/credential_sources.py b/agent/credential_sources.py index 6c0a081a47d..f99a7586257 100644 --- a/agent/credential_sources.py +++ b/agent/credential_sources.py @@ -240,11 +240,11 @@ def _clear_auth_store_provider(provider: str) -> bool: def _remove_nous_device_code(provider: str, removed) -> RemovalResult: """Nous OAuth lives in auth.json providers.nous — clear it and suppress. - We suppress in addition to clearing because nothing else stops the - user's next `hermes login` run from writing providers.nous again - before they decide to. Suppression forces them to go through - `hermes auth add nous` to re-engage, which is the documented re-add - path and clears the suppression atomically. + We suppress in addition to clearing because nothing else stops a future + `hermes auth add nous` (or any other path that writes providers.nous) + from re-seeding before the user has decided to. Suppression forces + them to go through `hermes auth add nous` to re-engage, which is the + documented re-add path and clears the suppression atomically. """ result = RemovalResult() if _clear_auth_store_provider(provider): diff --git a/agent/google_oauth.py b/agent/google_oauth.py index 6f45c370f6c..97a65349dfa 100644 --- a/agent/google_oauth.py +++ b/agent/google_oauth.py @@ -656,7 +656,7 @@ def get_valid_access_token(*, force_refresh: bool = False) -> str: creds = load_credentials() if creds is None: raise GoogleOAuthError( - "No Google OAuth credentials found. Run `hermes login --provider google-gemini-cli` first.", + "No Google OAuth credentials found. Run `hermes auth add google-gemini-cli` first.", code="google_oauth_not_logged_in", ) diff --git a/hermes_cli/proxy/adapters/nous_portal.py b/hermes_cli/proxy/adapters/nous_portal.py index e85d2100404..57c0a8824cf 100644 --- a/hermes_cli/proxy/adapters/nous_portal.py +++ b/hermes_cli/proxy/adapters/nous_portal.py @@ -104,7 +104,7 @@ class NousPortalAdapter(UpstreamAdapter): state = self._read_state() if state is None: raise RuntimeError( - "Not logged into Nous Portal. Run `hermes login nous` first." + "Not logged into Nous Portal. Run `hermes auth add nous` first." ) try: @@ -135,7 +135,7 @@ class NousPortalAdapter(UpstreamAdapter): if not agent_key: raise RuntimeError( "Nous Portal refresh did not return a usable agent_key. " - "Try `hermes login nous` to re-authenticate." + "Try `hermes auth add nous` to re-authenticate." ) base_url = ( diff --git a/hermes_cli/proxy/cli.py b/hermes_cli/proxy/cli.py index 6accd949705..7c7b86caf08 100644 --- a/hermes_cli/proxy/cli.py +++ b/hermes_cli/proxy/cli.py @@ -44,7 +44,7 @@ def cmd_proxy_start(args: Any) -> int: return 2 if not adapter.is_authenticated(): - auth_hint = getattr(adapter, "auth_hint", f"hermes login {adapter.name}") + auth_hint = getattr(adapter, "auth_hint", f"hermes auth add {adapter.name}") print( f"Not logged into {adapter.display_name}. " f"Run `{auth_hint}` first.", diff --git a/hermes_cli/tips.py b/hermes_cli/tips.py index 786631fa215..feebe4310a0 100644 --- a/hermes_cli/tips.py +++ b/hermes_cli/tips.py @@ -263,7 +263,7 @@ TIPS = [ "Custom providers: save named endpoints in config.yaml under custom_providers.", "HERMES_EPHEMERAL_SYSTEM_PROMPT injects a system prompt that's never persisted to history.", "credential_pool_strategies supports fill_first, round_robin, least_used, and random rotation.", - "hermes login supports OAuth-based auth for Nous and OpenAI Codex providers.", + "hermes auth add nous or hermes auth add openai-codex sets up OAuth-based providers.", "The API server supports both Chat Completions and Responses API with server-side state.", "tool_preview_length: 0 in config shows full file paths in the spinner's activity feed.", "hermes status --deep runs deeper diagnostic checks across all components.", diff --git a/skills/autonomous-ai-agents/hermes-agent/SKILL.md b/skills/autonomous-ai-agents/hermes-agent/SKILL.md index 2177c9c6a5c..42aab2dd1ef 100644 --- a/skills/autonomous-ai-agents/hermes-agent/SKILL.md +++ b/skills/autonomous-ai-agents/hermes-agent/SKILL.md @@ -100,8 +100,10 @@ hermes config path Print config.yaml path hermes config env-path Print .env path hermes config check Check for missing/outdated config hermes config migrate Update config with new options -hermes login [--provider P] OAuth login (nous, openai-codex) -hermes logout Clear stored auth +hermes auth Interactive credential manager +hermes auth add PROVIDER Add OAuth or API-key credential (e.g. nous, openai-codex, qwen-oauth) +hermes auth list List stored credentials +hermes auth remove PROVIDER Remove a stored credential hermes doctor [--fix] Check dependencies and config hermes status [--all] Show component status ``` @@ -390,7 +392,7 @@ Full config reference: https://hermes-agent.nousresearch.com/docs/user-guide/con | AI Gateway (Vercel) | API key | `AI_GATEWAY_API_KEY` | | OpenCode Zen | API key | `OPENCODE_ZEN_API_KEY` | | OpenCode Go | API key | `OPENCODE_GO_API_KEY` | -| Qwen OAuth | OAuth | `hermes login --provider qwen-oauth` | +| Qwen OAuth | OAuth | `hermes auth add qwen-oauth` | | Custom endpoint | Config | `model.base_url` + `model.api_key` in config.yaml | | GitHub Copilot ACP | External | `COPILOT_CLI_PATH` or Copilot CLI | @@ -812,7 +814,7 @@ and logs — avoids shell-escaping backslashes in bash. ### Model/provider issues 1. `hermes doctor` — check config and dependencies -2. `hermes login` — re-authenticate OAuth providers +2. `hermes auth` — re-authenticate OAuth providers (or `hermes auth add `) 3. Check `.env` has the right API key 4. **Copilot 403**: `gh auth login` tokens do NOT work for Copilot API. You must use the Copilot-specific OAuth device code flow via `hermes model` → GitHub Copilot. diff --git a/tests/hermes_cli/test_proxy.py b/tests/hermes_cli/test_proxy.py index 5f0af4db503..255610ae390 100644 --- a/tests/hermes_cli/test_proxy.py +++ b/tests/hermes_cli/test_proxy.py @@ -207,7 +207,7 @@ def test_nous_adapter_retry_credential_skips_opaque_bearer(tmp_path, monkeypatch def test_nous_adapter_get_credential_raises_when_not_logged_in(tmp_path, monkeypatch): monkeypatch.setenv("HERMES_HOME", str(tmp_path)) adapter = NousPortalAdapter() - with pytest.raises(RuntimeError, match="hermes login nous"): + with pytest.raises(RuntimeError, match="hermes auth add nous"): adapter.get_credential() @@ -784,4 +784,4 @@ def test_cmd_proxy_start_refuses_when_unauthenticated(capsys, tmp_path, monkeypa rc = cmd_proxy_start(args) assert rc == 2 err = capsys.readouterr().err - assert "hermes login nous" in err + assert "hermes auth add nous" in err diff --git a/website/docs/reference/faq.md b/website/docs/reference/faq.md index 01bf783f5d4..7c70662c319 100644 --- a/website/docs/reference/faq.md +++ b/website/docs/reference/faq.md @@ -19,7 +19,7 @@ Hermes Agent works with any OpenAI-compatible API. Supported providers include: - **[OpenRouter](https://openrouter.ai/)** — access hundreds of models through one API key (recommended for flexibility) - **Nous Portal** — Nous Research's own inference endpoint - **OpenAI** — GPT-5.4, GPT-5-codex, GPT-4.1, GPT-4o, etc. -- **Anthropic** — Claude models (direct API, OAuth via `hermes login anthropic`, OpenRouter, or any compatible proxy) +- **Anthropic** — Claude models (direct API, OAuth via `hermes auth add anthropic`, OpenRouter, or any compatible proxy) - **Google** — Gemini models (direct API via `gemini` provider, the `google-gemini-cli` OAuth provider, OpenRouter, or compatible proxy) - **z.ai / ZhipuAI** — GLM models - **Kimi / Moonshot AI** — Kimi models diff --git a/website/docs/user-guide/features/subscription-proxy.md b/website/docs/user-guide/features/subscription-proxy.md index 8f0fe31f9ca..0625ba45b32 100644 --- a/website/docs/user-guide/features/subscription-proxy.md +++ b/website/docs/user-guide/features/subscription-proxy.md @@ -29,7 +29,7 @@ proxy when you just want **the model** through your subscription. ### 1. Log into your provider (one-time) ```bash -hermes login nous +hermes auth add nous ``` This opens your browser for the Nous Portal OAuth flow. Hermes stores @@ -88,10 +88,10 @@ Hermes proxy upstream adapters [nous ] Nous Portal — ready (bearer expires 2026-05-15T06:43:21Z) ``` -If you see `not logged in`, run `hermes login nous`. If you see +If you see `not logged in`, run `hermes auth add nous`. If you see `credentials need attention`, your refresh token was revoked (rare — happens if you signed out from the Portal web UI) — just re-run -`hermes login nous`. +`hermes auth add nous`. ## Allowed paths diff --git a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md index f92fdfe72d1..0b984876647 100644 --- a/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md +++ b/website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md @@ -21,7 +21,7 @@ Configure, extend, or contribute to Hermes Agent. | License | MIT | | Platforms | linux, macos, windows | | Tags | `hermes`, `setup`, `configuration`, `multi-agent`, `spawning`, `cli`, `gateway`, `development` | -| Related skills | [`claude-code`](/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code), [`codex`](/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex), [`opencode`](/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode) | +| Related skills | [`claude-code`](/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-claude-code), [`codex`](/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex), [`opencode`](/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-opencode) | ## Reference: full SKILL.md @@ -117,8 +117,10 @@ hermes config path Print config.yaml path hermes config env-path Print .env path hermes config check Check for missing/outdated config hermes config migrate Update config with new options -hermes login [--provider P] OAuth login (nous, openai-codex) -hermes logout Clear stored auth +hermes auth Interactive credential manager +hermes auth add PROVIDER Add OAuth or API-key credential (e.g. nous, openai-codex, qwen-oauth) +hermes auth list List stored credentials +hermes auth remove PROVIDER Remove a stored credential hermes doctor [--fix] Check dependencies and config hermes status [--all] Show component status ``` @@ -353,7 +355,8 @@ The registry of record is `hermes_cli/commands.py` — every consumer ~/.hermes/config.yaml Main configuration ~/.hermes/.env API keys and secrets $HERMES_HOME/skills/ Installed skills -~/.hermes/sessions/ Session transcripts +~/.hermes/sessions/ Gateway routing index, request dumps, *.jsonl transcripts (and optional per-session JSON snapshots when sessions.write_json_snapshots: true) +~/.hermes/state.db Canonical session store (SQLite + FTS5) ~/.hermes/logs/ Gateway and error logs ~/.hermes/auth.json OAuth tokens and credential pools ~/.hermes/hermes-agent/ Source code (if git-installed) @@ -406,7 +409,7 @@ Full config reference: https://hermes-agent.nousresearch.com/docs/user-guide/con | AI Gateway (Vercel) | API key | `AI_GATEWAY_API_KEY` | | OpenCode Zen | API key | `OPENCODE_ZEN_API_KEY` | | OpenCode Go | API key | `OPENCODE_GO_API_KEY` | -| Qwen OAuth | OAuth | `hermes login --provider qwen-oauth` | +| Qwen OAuth | OAuth | `hermes auth add qwen-oauth` | | Custom endpoint | Config | `model.base_url` + `model.api_key` in config.yaml | | GitHub Copilot ACP | External | `COPILOT_CLI_PATH` or Copilot CLI | @@ -713,8 +716,9 @@ sessions still have zero `kanban_*` schema footprint unless configured. - **Dispatcher** runs inside the gateway by default (`kanban.dispatch_in_gateway: true`) — reclaims stale claims, promotes ready tasks, atomically claims, spawns assigned profiles. - Auto-blocks a task after the configured `kanban.failure_limit` - consecutive non-success attempts (default: 2). + Auto-blocks a task after `failure_limit` consecutive spawn failures + (default 2; configurable via `kanban.failure_limit` or per-task + `max_retries`). - **Isolation:** board is the hard boundary (workers get `HERMES_KANBAN_BOARD` pinned in env); tenant is a soft namespace within a board for workspace-path + memory-key isolation. @@ -827,7 +831,7 @@ and logs — avoids shell-escaping backslashes in bash. ### Model/provider issues 1. `hermes doctor` — check config and dependencies -2. `hermes login` — re-authenticate OAuth providers +2. `hermes auth` — re-authenticate OAuth providers (or `hermes auth add `) 3. Check `.env` has the right API key 4. **Copilot 403**: `gh auth login` tokens do NOT work for Copilot API. You must use the Copilot-specific OAuth device code flow via `hermes model` → GitHub Copilot. @@ -858,7 +862,7 @@ Common gateway problems: - **Windows-specific issues** (`Alt+Enter` newline, WinError 10106, UTF-8 BOM config, test suite, line endings): see the dedicated **Windows-Specific Quirks** section above. ### Auxiliary models not working -If `auxiliary` tasks (vision, compression) fail silently, the `auto` provider can't find a backend. Either set `OPENROUTER_API_KEY` or `GOOGLE_API_KEY`, or explicitly configure each auxiliary task's provider: +If `auxiliary` tasks (vision, compression, session_search) fail silently, the `auto` provider can't find a backend. Either set `OPENROUTER_API_KEY` or `GOOGLE_API_KEY`, or explicitly configure each auxiliary task's provider: ```bash hermes config set auxiliary.vision.provider hermes config set auxiliary.vision.model @@ -883,7 +887,7 @@ hermes config set auxiliary.vision.model | Env variables | `hermes config env-path` or [Env vars reference](https://hermes-agent.nousresearch.com/docs/reference/environment-variables) | | CLI commands | `hermes --help` or [CLI reference](https://hermes-agent.nousresearch.com/docs/reference/cli-commands) | | Gateway logs | `~/.hermes/logs/gateway.log` | -| Session files | `~/.hermes/sessions/` or `hermes sessions browse` | +| Session files | `hermes sessions browse` (reads state.db) | | Source code | `~/.hermes/hermes-agent/` | --- diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/faq.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/faq.md index a969f48f1d7..9cb1cd024ff 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/faq.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/faq.md @@ -19,7 +19,7 @@ Hermes Agent 可与任何兼容 OpenAI 的 API 配合使用。支持的提供商 - **[OpenRouter](https://openrouter.ai/)** — 通过一个 API key 访问数百个模型(推荐,灵活性强) - **Nous Portal** — Nous Research 自有推理端点 - **OpenAI** — GPT-5.4、GPT-5-codex、GPT-4.1、GPT-4o 等 -- **Anthropic** — Claude 模型(直接 API、通过 `hermes login anthropic` 进行 OAuth、OpenRouter 或任何兼容代理) +- **Anthropic** — Claude 模型(直接 API、通过 `hermes auth add anthropic` 进行 OAuth、OpenRouter 或任何兼容代理) - **Google** — Gemini 模型(通过 `gemini` 提供商直接调用 API、`google-gemini-cli` OAuth 提供商、OpenRouter 或兼容代理) - **z.ai / ZhipuAI** — GLM 模型 - **Kimi / Moonshot AI** — Kimi 模型 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/subscription-proxy.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/subscription-proxy.md index 509ce68765b..0d754621944 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/subscription-proxy.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/subscription-proxy.md @@ -24,7 +24,7 @@ description: "将你的 Nous Portal 订阅(或其他 OAuth 提供商)用作 ### 1. 登录你的提供商(仅需一次) ```bash -hermes login nous +hermes auth add nous ``` 这会打开浏览器进行 Nous Portal OAuth 流程。Hermes 将刷新令牌存储在 `~/.hermes/auth.json` 中——与所有 Hermes 提供商登录信息存放在同一位置。 @@ -76,7 +76,7 @@ Hermes proxy upstream adapters [nous ] Nous Portal — ready (bearer expires 2026-05-15T06:43:21Z) ``` -如果显示 `not logged in`,请运行 `hermes login nous`。如果显示 `credentials need attention`,说明你的刷新令牌已被撤销(较少见——通常发生在你从 Portal Web UI 退出登录时)——重新运行 `hermes login nous` 即可。 +如果显示 `not logged in`,请运行 `hermes auth add nous`。如果显示 `credentials need attention`,说明你的刷新令牌已被撤销(较少见——通常发生在你从 Portal Web UI 退出登录时)——重新运行 `hermes auth add nous` 即可。 ## 允许的路径 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md index 88b360b332c..aee9ae2fc14 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md @@ -117,8 +117,10 @@ hermes config path Print config.yaml path hermes config env-path Print .env path hermes config check Check for missing/outdated config hermes config migrate Update config with new options -hermes login [--provider P] OAuth login (nous, openai-codex) -hermes logout Clear stored auth +hermes auth 交互式凭据管理器 +hermes auth add PROVIDER 添加 OAuth 或 API key 凭据(例如 nous、openai-codex、qwen-oauth) +hermes auth list 列出已存储的凭据 +hermes auth remove PROVIDER 移除已存储的凭据 hermes doctor [--fix] Check dependencies and config hermes status [--all] Show component status ``` @@ -402,7 +404,7 @@ Profiles 使用 `~/.hermes/profiles//`,布局相同。 | AI Gateway (Vercel) | API key | `AI_GATEWAY_API_KEY` | | OpenCode Zen | API key | `OPENCODE_ZEN_API_KEY` | | OpenCode Go | API key | `OPENCODE_GO_API_KEY` | -| Qwen OAuth | OAuth | `hermes login --provider qwen-oauth` | +| Qwen OAuth | OAuth | `hermes auth add qwen-oauth` | | 自定义端点 | 配置 | `config.yaml` 中的 `model.base_url` + `model.api_key` | | GitHub Copilot ACP | 外部 | `COPILOT_CLI_PATH` 或 Copilot CLI | @@ -737,7 +739,7 @@ export PYTHONPATH="$(pwd)" ### 模型/提供商问题 1. `hermes doctor` — 检查配置和依赖 -2. `hermes login` — 重新认证 OAuth 提供商 +2. `hermes auth` — 重新认证 OAuth 提供商(或 `hermes auth add `) 3. 检查 `.env` 中是否有正确的 API key 4. **Copilot 403**:`gh auth login` 的 token **不适用于** Copilot API。必须通过 `hermes model` → GitHub Copilot 使用 Copilot 专用 OAuth 设备码流程。