From 05b67a036231a8b60a8a973e0134d9ca5d16600d Mon Sep 17 00:00:00 2001 From: Cleat Date: Fri, 3 Jul 2026 14:26:33 -0500 Subject: [PATCH] docs: fix website link and anchor warnings --- website/docs/getting-started/learning-path.md | 11 ++-- .../software-development-code-wiki.md | 2 +- .../current/developer-guide/contributing.md | 2 +- .../developer-guide/creating-skills.md | 2 +- .../developer-guide/memory-provider-plugin.md | 2 +- .../current/getting-started/installation.md | 2 +- .../current/getting-started/learning-path.md | 18 +++---- .../current/getting-started/nix-setup.md | 8 +-- .../current/guides/azure-foundry.md | 4 +- .../current/guides/build-a-hermes-plugin.md | 12 ++--- .../current/guides/local-llm-on-mac.md | 2 +- .../current/guides/local-ollama-setup.md | 2 +- .../current/guides/migrate-from-openclaw.md | 4 +- .../current/guides/oauth-over-ssh.md | 19 ++++++- .../guides/operate-teams-meeting-pipeline.md | 2 +- .../guides/run-hermes-with-nous-portal.md | 2 +- .../current/guides/use-mcp-with-hermes.md | 2 +- .../guides/webhook-github-pr-review.md | 4 +- .../current/integrations/nous-portal.md | 6 +-- .../current/integrations/providers.md | 12 ++--- .../reference/environment-variables.md | 2 +- .../current/reference/faq.md | 4 +- .../current/reference/profile-commands.md | 2 +- .../current/reference/slash-commands.md | 10 ++-- .../current/user-guide/cli.md | 4 +- .../current/user-guide/configuration.md | 24 ++++----- .../current/user-guide/docker.md | 6 +-- .../current/user-guide/features/browser.md | 2 +- .../user-guide/features/context-files.md | 2 +- .../current/user-guide/features/cron.md | 4 +- .../features/extending-the-dashboard.md | 52 +++++++++---------- .../current/user-guide/features/honcho.md | 2 +- .../features/kanban-worker-lanes.md | 2 +- .../current/user-guide/features/mcp.md | 6 +-- .../current/user-guide/features/overview.md | 2 +- .../current/user-guide/features/plugins.md | 4 +- .../current/user-guide/features/skills.md | 12 ++--- .../current/user-guide/features/spotify.md | 2 +- .../current/user-guide/features/tts.md | 12 ++--- .../current/user-guide/features/vision.md | 2 +- .../user-guide/features/web-dashboard.md | 2 +- .../current/user-guide/features/web-search.md | 4 +- .../current/user-guide/messaging/discord.md | 6 +-- .../current/user-guide/messaging/feishu.md | 8 +-- .../current/user-guide/messaging/index.md | 6 +-- .../current/user-guide/messaging/matrix.md | 2 +- .../user-guide/messaging/open-webui.md | 2 +- .../current/user-guide/messaging/teams.md | 4 +- .../current/user-guide/messaging/telegram.md | 12 ++--- .../current/user-guide/security.md | 4 +- .../current/user-guide/sessions.md | 6 +-- .../productivity/productivity-powerpoint.md | 2 +- .../research-research-paper-writing.md | 2 +- .../current/user-guide/tui.md | 2 +- .../current/user-guide/windows-native.md | 4 +- 55 files changed, 179 insertions(+), 161 deletions(-) diff --git a/website/docs/getting-started/learning-path.md b/website/docs/getting-started/learning-path.md index 619e2010394ad..164b8b5f7f005 100644 --- a/website/docs/getting-started/learning-path.md +++ b/website/docs/getting-started/learning-path.md @@ -28,7 +28,7 @@ First-time users almost always want `hermes setup --portal` — one OAuth covers |---|---|---|---| | **Beginner** | Get up and running, have basic conversations, use built-in tools | [Installation](/getting-started/installation) → [Quickstart](/getting-started/quickstart) → [CLI Usage](/user-guide/cli) → [Configuration](/user-guide/configuration) | ~1 hour | | **Intermediate** | Set up messaging bots, use advanced features like memory, cron jobs, and skills | [Sessions](/user-guide/sessions) → [Messaging](/user-guide/messaging) → [Tools](/user-guide/features/tools) → [Skills](/user-guide/features/skills) → [Memory](/user-guide/features/memory) → [Cron](/user-guide/features/cron) | ~2–3 hours | -| **Advanced** | Build custom tools, create skills, train models with RL, contribute to the project | [Architecture](/developer-guide/architecture) → [Adding Tools](/developer-guide/adding-tools) → [Creating Skills](/developer-guide/creating-skills) → [Contributing](/developer-guide/contributing) | ~4–6 hours | +| **Advanced** | Build custom tools, create skills, export training trajectories, contribute to the project | [Architecture](/developer-guide/architecture) → [Adding Tools](/developer-guide/adding-tools) → [Creating Skills](/developer-guide/creating-skills) → [Trajectory Format](/developer-guide/trajectory-format) → [Contributing](/developer-guide/contributing) | ~4–6 hours | ## By Use Case @@ -98,18 +98,18 @@ For most custom tool creation, start with plugins. The [Adding Tools](/developer page is for built-in Hermes core development, not the usual user/custom-tool path. ::: -### "I want to train models" +### "I want to prepare training data" -Use reinforcement learning to fine-tune model behavior with Hermes Agent's RL training pipeline (powered by [Atropos](https://github.com/NousResearch/atropos)). +Export Hermes Agent conversations as trajectory data for fine-tuning or evaluation. 1. [Quickstart](/getting-started/quickstart) 2. [Configuration](/user-guide/configuration) -3. [Atropos RL Environments](https://github.com/NousResearch/atropos) (external) +3. [Trajectory Format](/developer-guide/trajectory-format) 4. [Provider Routing](/user-guide/features/provider-routing) 5. [Architecture](/developer-guide/architecture) :::tip -RL training works best when you already understand the basics of how Hermes Agent handles conversations and tool calls. Run through the Beginner path first if you're new. +Trajectory data is most useful when you already understand how Hermes Agent handles conversations and tool calls. Run through the Beginner path first if you're new. ::: ### "I want to use it as a Python library" @@ -140,6 +140,7 @@ Not sure what's available? Here's a quick directory of major features: | **Browser** | Web browsing and scraping | [Browser](/user-guide/features/browser) | | **Hooks** | Event-driven callbacks and middleware | [Hooks](/user-guide/features/hooks) | | **Batch Processing** | Process multiple inputs in bulk | [Batch Processing](/user-guide/features/batch-processing) | +| **Trajectory Export** | Generate data for fine-tuning or evaluation | [Trajectory Format](/developer-guide/trajectory-format) | | **Provider Routing** | Route requests across multiple LLM providers | [Provider Routing](/user-guide/features/provider-routing) | ## What to Read Next diff --git a/website/docs/user-guide/skills/optional/software-development/software-development-code-wiki.md b/website/docs/user-guide/skills/optional/software-development/software-development-code-wiki.md index 7d41054deac5d..1b978c8cccd73 100644 --- a/website/docs/user-guide/skills/optional/software-development/software-development-code-wiki.md +++ b/website/docs/user-guide/skills/optional/software-development/software-development-code-wiki.md @@ -21,7 +21,7 @@ Generate wiki docs + Mermaid diagrams for any codebase. | License | MIT | | Platforms | linux, macos, windows | | Tags | `Documentation`, `Mermaid`, `Architecture`, `Diagrams`, `Wiki`, `Code-Analysis` | -| Related skills | [`codebase-inspection`](/docs/user-guide/skills/bundled/github/github-codebase-inspection), [`github-repo-management`](/docs/user-guide/skills/bundled/github/github-github-repo-management) | +| Related skills | [`codebase-inspection`](/user-guide/skills/bundled/github/github-codebase-inspection), [`github-repo-management`](/user-guide/skills/bundled/github/github-github-repo-management) | ## Reference: full SKILL.md diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/contributing.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/contributing.md index 773017012a642..8a8f44d90c572 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/contributing.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/contributing.md @@ -27,7 +27,7 @@ description: "如何为 Hermes Agent 做贡献 — 开发环境配置、代码 - 构建新的 skill?从 [创建 Skill](./creating-skills.md) 开始 - 构建新的推理提供商?从 [添加提供商](./adding-providers.md) 开始 -## 开发环境配置 +## 开发环境配置 {#development-setup} ### 前置要求 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/creating-skills.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/creating-skills.md index 728e24ac4b369..363a299e7b3bc 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/creating-skills.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/creating-skills.md @@ -178,7 +178,7 @@ required_environment_variables: 旧版 `prerequisites.env_vars` 作为向后兼容的别名仍受支持。 -### Config 配置项(config.yaml) +### Config 配置项(config.yaml) {#config-settings-configyaml} Skill 可声明非密钥配置项,这些配置项存储在 `config.yaml` 的 `skills.config` 命名空间下。与环境变量(存储密钥)不同,config 配置项用于路径、偏好设置及其他非敏感值。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/memory-provider-plugin.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/memory-provider-plugin.md index 2b681c8114b35..ea704181a0fd4 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/memory-provider-plugin.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/developer-guide/memory-provider-plugin.md @@ -200,7 +200,7 @@ mgr.on_session_end([]) mgr.shutdown_all() ``` -## 添加 CLI 命令 +## 添加 CLI 命令 {#adding-cli-commands} Memory provider 插件可以注册自己的 CLI 子命令树(例如 `hermes my-provider status`、`hermes my-provider config`)。这套系统基于约定发现,无需修改核心文件。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md index 6e91995e74450..032eda0c25c7b 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/installation.md @@ -18,7 +18,7 @@ description: "在 Linux、macOS、WSL2、原生 Windows 或通过 Termux 在 And curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash ``` -### Windows(原生,PowerShell) +### Windows(原生,PowerShell)— 早期 Beta {#windows-native-powershell--early-beta} 原生 Windows 无需 WSL 即可运行 Hermes——CLI、gateway、TUI 和工具均可原生运行。(原生安装与 WSL2 安装可干净共存;唯一仅限 WSL2 的功能见下方功能说明。)遇到 bug 请[提交 issue](https://github.com/NousResearch/hermes-agent/issues)。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/learning-path.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/learning-path.md index 4d2443d23e431..a9ba5009062bc 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/learning-path.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/learning-path.md @@ -18,15 +18,15 @@ Hermes Agent 功能丰富——CLI 助手、Telegram/Discord 机器人、任务 - **有明确目标?** 跳至[按使用场景](#by-use-case),找到匹配的场景。 - **随便浏览?** 查看[主要功能](#key-features-at-a-glance)表格,快速了解 Hermes Agent 的全部能力。 -## 按经验水平 +## 按经验水平 {#by-experience-level} | 水平 | 目标 | 推荐阅读 | 预计时间 | |---|---|---|---| | **初级** | 快速上手,进行基本对话,使用内置工具 | [安装](/getting-started/installation) → [快速入门](/getting-started/quickstart) → [CLI 用法](/user-guide/cli) → [配置](/user-guide/configuration) | 约 1 小时 | | **中级** | 搭建消息机器人,使用记忆、cron 任务、技能等高级功能 | [会话](/user-guide/sessions) → [消息](/user-guide/messaging) → [工具](/user-guide/features/tools) → [技能](/user-guide/features/skills) → [记忆](/user-guide/features/memory) → [Cron](/user-guide/features/cron) | 约 2–3 小时 | -| **高级** | 构建自定义工具、创建技能、使用强化学习训练模型、参与项目贡献 | [架构](/developer-guide/architecture) → [添加工具](/developer-guide/adding-tools) → [创建技能](/developer-guide/creating-skills) → [强化学习训练](/user-guide/features/rl-training) → [贡献指南](/developer-guide/contributing) | 约 4–6 小时 | +| **高级** | 构建自定义工具、创建技能、导出训练轨迹、参与项目贡献 | [架构](/developer-guide/architecture) → [添加工具](/developer-guide/adding-tools) → [创建技能](/developer-guide/creating-skills) → [轨迹格式](/developer-guide/trajectory-format) → [贡献指南](/developer-guide/contributing) | 约 4–6 小时 | -## 按使用场景 +## 按使用场景 {#by-use-case} 选择与您目标匹配的场景,每个场景均按推荐顺序链接到相关文档。 @@ -93,18 +93,18 @@ Cron 任务让 Hermes Agent 按计划执行任务——每日摘要、定期检 对于大多数自定义工具的创建,建议从插件开始。[添加工具](/developer-guide/adding-tools)页面面向 Hermes 核心内置开发,而非常规用户/自定义工具路径。 ::: -### "我想训练模型" +### "我想准备训练数据" -使用强化学习(RL)通过 Hermes Agent 内置的 RL 训练流水线对模型行为进行微调。 +将 Hermes Agent 对话导出为轨迹数据,用于微调或评估。 1. [快速入门](/getting-started/quickstart) 2. [配置](/user-guide/configuration) -3. [强化学习训练](/user-guide/features/rl-training) +3. [轨迹格式](/developer-guide/trajectory-format) 4. [Provider 路由](/user-guide/features/provider-routing) 5. [架构](/developer-guide/architecture) :::tip -强化学习训练在您已了解 Hermes Agent 如何处理对话和工具调用的基础上效果最佳。如果您是新手,请先完成初级路径。 +当您已了解 Hermes Agent 如何处理对话和工具调用时,轨迹数据最有用。如果您是新手,请先完成初级路径。 ::: ### "我想将其作为 Python 库使用" @@ -118,7 +118,7 @@ Cron 任务让 Hermes Agent 按计划执行任务——每日摘要、定期检 5. [工具](/user-guide/features/tools) 6. [会话](/user-guide/sessions) -## 主要功能一览 +## 主要功能一览 {#key-features-at-a-glance} 不确定有哪些功能?以下是主要功能的快速目录: @@ -135,7 +135,7 @@ Cron 任务让 Hermes Agent 按计划执行任务——每日摘要、定期检 | **浏览器** | 网页浏览与抓取 | [浏览器](/user-guide/features/browser) | | **Hooks** | 事件驱动的回调与中间件 | [Hooks](/user-guide/features/hooks) | | **批处理** | 批量处理多个输入 | [批处理](/user-guide/features/batch-processing) | -| **强化学习训练** | 使用强化学习微调模型 | [强化学习训练](/user-guide/features/rl-training) | +| **轨迹导出** | 生成用于微调或评估的数据 | [轨迹格式](/developer-guide/trajectory-format) | | **Provider 路由** | 在多个 LLM provider 之间路由请求 | [Provider 路由](/user-guide/features/provider-routing) | ## 下一步阅读 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/nix-setup.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/nix-setup.md index eb003cd325978..48925f4dec87c 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/nix-setup.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/getting-started/nix-setup.md @@ -331,7 +331,7 @@ Nix 用户最常见自定义需求的快速参考: --- -## 密钥管理 +## 密钥管理 {#secrets-management} :::danger 切勿将 API 密钥放入 `settings` 或 `environment` Nix 表达式中的值会进入 `/nix/store`,该目录是全局可读的。请始终使用带有密钥管理器的 `environmentFiles`。 @@ -415,7 +415,7 @@ Agent 身份文件是独立的:Hermes 从 `$HERMES_HOME/SOUL.md` 加载其主 --- -## MCP 服务器 +## MCP 服务器 {#mcp-servers} `mcpServers` 选项以声明式方式配置 [MCP(Model Context Protocol,模型上下文协议)](https://modelcontextprotocol.io)服务器。每个服务器使用 **stdio**(本地命令)或 **HTTP**(远程 URL)传输方式。 @@ -601,7 +601,7 @@ Nix 构建的二进制文件能在 Ubuntu 容器内运行,是因为 `/nix/stor --- -## 插件 +## 插件 {#plugins} NixOS 模块支持声明式插件安装——无需命令式的 `hermes plugins install`。 @@ -878,7 +878,7 @@ nix build .#checks.x86_64-linux.config-roundtrip # 合并脚本保留用户 └── (Agent 创建的文件) ``` -### 容器模式 +### 容器模式 {#container-mode} 相同的布局,挂载到容器中: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/azure-foundry.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/azure-foundry.md index 03e5fc3d5982c..e56cddbaaa716 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/azure-foundry.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/azure-foundry.md @@ -126,7 +126,7 @@ Hermes 在 `config.yaml` 中只管理一个 Entra 专属配置项: Entra 模式下不会将任何密钥写入 `~/.hermes/.env`——`azure-identity` 在进程内缓存令牌(在可用时也会使用操作系统密钥链 / `~/.IdentityService`)。 -### 凭据解析顺序 +### 凭据解析顺序 {#credential-resolution-order} `azure-identity` 的 `DefaultAzureCredential` 在每次令牌请求时按以下链路逐一尝试,在第一个返回令牌的凭据处停止: @@ -169,7 +169,7 @@ hermes # 使用你的 az login 令牌 **CI 中的服务主体:** - 在 runner 环境中设置 `AZURE_TENANT_ID`、`AZURE_CLIENT_ID`、`AZURE_CLIENT_SECRET`。 -#### 主权云(政府云、中国云) +#### 主权云(政府云、中国云) {#sovereign-clouds-government-china} 导出 `AZURE_AUTHORITY_HOST`(例如 Azure Government 使用 `https://login.microsoftonline.us`,Azure China 使用 `https://login.partner.microsoftonline.cn`)。`azure-identity` 会直接读取该变量。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/build-a-hermes-plugin.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/build-a-hermes-plugin.md index 19b77da25783b..0d0132dbdbf9c 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/build-a-hermes-plugin.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/build-a-hermes-plugin.md @@ -375,7 +375,7 @@ with open(_DATA_FILE) as f: _DATA = yaml.safe_load(f) ``` -### 捆绑技能 +### 捆绑技能 {#bundle-skills} 插件可以随附技能文件,代理通过 `skill_view("plugin:skill")` 加载。在 `__init__.py` 中注册: @@ -418,7 +418,7 @@ skill_view("my-workflow") # → 内置版本(不受影响) 旧的 `shutil.copy2` 模式(将技能复制到 `~/.hermes/skills/`)仍然有效,但存在与内置技能名称冲突的风险。新插件请优先使用 `ctx.register_skill()`。 ::: -### 根据环境变量决定是否启用 +### 根据环境变量决定是否启用 {#gate-on-environment-variables} 如果你的插件需要 API 密钥: @@ -452,7 +452,7 @@ requires_env: 两种格式可在同一列表中混用。已设置的变量会被静默跳过。 -### 懒加载可选 Python 依赖 +### 懒加载可选 Python 依赖 {#lazy-install-optional-python-dependencies} 如果你的插件封装了一个并非所有用户都会安装的 SDK(供应商 SDK、重型 ML 库、平台特定包),不要在模块顶部 `import` 它。在工具处理器内部使用 `tools.lazy_deps.ensure(...)` 辅助函数——Hermes 会在首次使用时安装该包,并受用户 `security.allow_lazy_installs` 配置的控制。 @@ -541,7 +541,7 @@ def register(ctx): 所有回调都应接受 `**kwargs` 以保持向前兼容性。如果钩子回调崩溃,会被记录日志并跳过。其他钩子和代理继续正常运行。 -### `pre_llm_call` 上下文注入 +### `pre_llm_call` 上下文注入 {#pre_llm_call-context-injection} 这是唯一一个返回值有意义的钩子。当 `pre_llm_call` 回调返回包含 `"context"` 键的字典(或纯字符串)时,Hermes 会将该文本注入**当前轮次的用户消息**中。这是记忆插件、RAG 集成、护栏以及任何需要向模型提供额外上下文的插件所使用的机制。 @@ -676,7 +676,7 @@ def register(ctx): **活跃提供商限制:** 记忆插件 CLI 命令仅在其提供商是配置中活跃的 `memory.provider` 时才会出现。如果用户尚未设置你的提供商,你的 CLI 命令不会出现在帮助输出中。 -### 注册斜杠命令 +### 注册斜杠命令 {#register-slash-commands} 插件可以注册会话内斜杠命令——用户在对话中输入的命令(如 `/lcm status` 或 `/ping`)。这些命令在 CLI 和网关(Telegram、Discord 等)中均可使用。 @@ -1051,7 +1051,7 @@ tts: **完整指南:** [TTS 自定义命令提供商](/user-guide/features/tts#custom-command-providers) · [STT](/user-guide/features/tts#voice-message-transcription-stt)。 -## 通过 pip 分发 +## 通过 pip 分发 {#distribute-via-pip} 如需公开分享插件,在你的 Python 包中添加 entry point: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-llm-on-mac.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-llm-on-mac.md index 027d409ca9a46..9cc77abbd65ea 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-llm-on-mac.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-llm-on-mac.md @@ -220,7 +220,7 @@ hermes model --- -## 超时设置 +## 超时设置 {#timeouts} Hermes 会自动检测本地端点(localhost、局域网 IP)并放宽其流式传输超时限制。大多数情况下无需额外配置。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-ollama-setup.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-ollama-setup.md index 06ea18fbb110c..a853b47ecedb3 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-ollama-setup.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/local-ollama-setup.md @@ -152,7 +152,7 @@ Hermes 将使用终端工具、文件操作和你的本地模型——无需任 /model gemma2:9b ``` -## 第六步:优化速度 +## 第六步:优化速度 {#step-6-optimize-for-speed} ### 增大 Ollama 的上下文窗口 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrate-from-openclaw.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrate-from-openclaw.md index 5827597754b3f..40f380bcf23cd 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrate-from-openclaw.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrate-from-openclaw.md @@ -179,7 +179,7 @@ TTS 设置从 OpenClaw 配置的**两个**位置读取,优先级如下: | 频道绑定 | `archive/bindings.json` | 按平台手动配置 | | 复杂频道配置 | `archive/channels-deep-config.json` | 手动配置各平台 | -## API 密钥解析 +## API 密钥解析 {#api-key-resolution} 启用 `--migrate-secrets` 时,API 密钥按以下优先级从**四个来源**收集: @@ -196,7 +196,7 @@ TTS 设置从 OpenClaw 配置的**两个**位置读取,优先级如下: 不在此白名单中的密钥一律不会被复制。 -## SecretRef 处理 +## SecretRef 处理 {#secretref-handling} OpenClaw 配置中 token 和 API 密钥的值支持三种格式: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/oauth-over-ssh.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/oauth-over-ssh.md index 63c2fd3a6ef4f..500631477b71a 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/oauth-over-ssh.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/oauth-over-ssh.md @@ -26,7 +26,24 @@ hermes auth add spotify --no-browser # → 浏览器重定向到 127.0.0.1:43827/callback,隧道转发到远程监听器,登录完成。 ``` -Hermes 会在 `Waiting for callback on ...` 一行打印实际绑定的端口——从那里复制。Spotify 默认端口为 `43827`。 +`56121` 是 xAI OAuth 使用的端口。Spotify 请将其替换为 `43827`。Hermes 会在 `Waiting for callback on ...` 这一行打印它实际绑定的端口——从那里复制。 + +## 仅限浏览器的远程环境(Cloud Shell / Codespaces / EC2 Instance Connect) {#browser-only-remote-cloud-shell--codespaces--ec2-instance-connect} + +如果你没有常规的 SSH 客户端——例如你在 GCP Cloud Shell、GitHub Codespaces、AWS EC2 Instance Connect、Gitpod 或其他基于浏览器的控制台中运行 Hermes——上述 SSH 隧道不可用。请改用 `--manual-paste`: + +```bash +hermes auth add xai-oauth --manual-paste +# → Hermes 打印一个授权 URL,在笔记本的浏览器中打开它。 +# → 在浏览器中批准。重定向到 127.0.0.1:56121/callback 会加载失败 +# ——这是预期行为。 +# → 从失败页面的地址栏复制完整 URL。 +# → 在终端的 "Callback URL:" 提示处粘贴。 +``` + +同样的标志也适用于集成模型选择器的 `hermes model --manual-paste`。如果不想粘贴完整 URL,也可以只接受裸的 `?code=...&state=...` 查询片段。 + +Hermes 对两种路径使用**相同的 PKCE verifier、state 和 nonce**,因此上游 OAuth 流程在字节层面完全一致——`--manual-paste` 纯粹是回调跳转的传输方式变更,不会降低安全性。 ## 哪些提供商需要此操作 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/operate-teams-meeting-pipeline.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/operate-teams-meeting-pipeline.md index 482622fe507f2..244108b6de9ee 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/operate-teams-meeting-pipeline.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/operate-teams-meeting-pipeline.md @@ -46,7 +46,7 @@ hermes teams-pipeline maintain-subscriptions hermes teams-pipeline maintain-subscriptions --dry-run ``` -### 自动化订阅续期(生产环境必须配置) +### 自动化订阅续期(生产环境必须配置) {#automating-subscription-renewal-required-for-production} **Microsoft Graph 订阅最多 72 小时后过期。** 若无任何续期操作,会议通知将在 3 天后静默停止,流水线看起来像是"故障"。这是所有基于 Graph 的集成中最常见的运维故障模式。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/run-hermes-with-nous-portal.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/run-hermes-with-nous-portal.md index 8739d0fa3fb70..1f4b58c8e457b 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/run-hermes-with-nous-portal.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/run-hermes-with-nous-portal.md @@ -173,7 +173,7 @@ hermes cron add "Daily AI news summary" "every day at 9am" \ 对于多人共用一台机器的团队场景,每个人有自己的 Portal 账号 → 每个 home 目录保存各自的 `~/.hermes/auth.json` → 用户之间不共享 token。这是正确的边界划分。 -## 故障排查 +## 故障排查 {#troubleshooting} ### 运行 `hermes setup --portal` 后,`hermes portal info` 显示"not logged in" diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/use-mcp-with-hermes.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/use-mcp-with-hermes.md index b2b942541d3d5..ee5ac3f1d795e 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/use-mcp-with-hermes.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/use-mcp-with-hermes.md @@ -109,7 +109,7 @@ mcp_servers: 对于敏感系统,这通常是最佳默认设置。 -## WSL2:将 WSL 中的 Hermes 桥接到 Windows Chrome +## WSL2:将 WSL 中的 Hermes 桥接到 Windows Chrome {#wsl2-bridge-hermes-in-wsl-to-windows-chrome} 以下是适用场景的实际配置: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/webhook-github-pr-review.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/webhook-github-pr-review.md index 6fdc332dedfad..bc2bb383370f9 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/webhook-github-pr-review.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/webhook-github-pr-review.md @@ -140,7 +140,7 @@ tail -f "${HERMES_HOME:-$HOME/.hermes}/logs/gateway.log" --- -## 使用 ngrok 进行本地测试 +## 使用 ngrok 进行本地测试 {#local-testing-with-ngrok} 如果 Hermes 在你的笔记本上运行,使用 [ngrok](https://ngrok.com/) 将其暴露到公网: @@ -269,7 +269,7 @@ GitLab 的 payload 字段与 GitHub 不同——例如,MR 标题使用 `{objec --- -## 安全说明 +## 安全说明 {#security-notes} - **永远不要在生产环境中使用 `INSECURE_NO_AUTH`**——它会完全禁用签名验证。仅用于本地开发。 - **定期轮换你的 webhook secret**,并在 GitHub(webhook 设置)和你的 `config.yaml` 中同步更新。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/nous-portal.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/nous-portal.md index 265abb4aed10d..647f2013fa854 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/nous-portal.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/nous-portal.md @@ -68,7 +68,7 @@ Portal 代理了来自整个生态系统的精选 agentic 模型目录——统 [原生 Windows](/user-guide/windows-native) 上,逐个配置 API 密钥是其最大痛点——在 Windows 上分别安装 Firecrawl 账号、FAL 账号、Browser Use 账号、OpenAI 密钥,是整个 agent 配置过程中摩擦最高的部分。Portal 订阅消除了这一问题:一次 OAuth 覆盖模型和所有 gateway 工具,Windows 用户无需手动配置四个后端,即可获得与 macOS/Linux 相同的体验。 -## 关于 Hermes 4 的说明 +## 关于 Hermes 4 的说明 {#a-note-on-hermes-4} Nous Research 自家的 **Hermes 4** 系列(Hermes-4-70B、Hermes-4-405B)通过 Portal 提供,享有大幅折扣。这些是**前沿混合推理对话模型**——在数学、科学、指令遵循、schema 遵从、角色扮演和长文写作方面表现出色。 @@ -176,7 +176,7 @@ hermes portal open # 在浏览器中打开订阅管理页面 hermes model ``` -### 将 gateway 与自有后端混用 +### 将 gateway 与自有后端混用 {#mixing-the-gateway-with-your-own-backends} 如果你已有 Browserbase 账号并希望继续使用,同时通过 Nous 路由网页搜索和图像生成,这是支持的。使用 `hermes tools` 为每个工具单独选择后端: @@ -226,7 +226,7 @@ browser: OAuth refresh token 单独存储在 `~/.hermes/auth.json`(不在 `config.yaml` 中——凭证与配置有意分开存放)。 -## 令牌处理 +## 令牌处理 {#token-handling} Hermes 在每次推理调用时从存储的 Portal refresh token 生成短期 JWT,而非复用长期 API 密钥。令牌生命周期完全自动管理——刷新、生成、在瞬时 401 时重试——你无需关心这些细节。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md index 68d7d5d076754..c39b0cabdb52e 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/integrations/providers.md @@ -260,7 +260,7 @@ model: 使用 Z.AI / GLM 提供商时,Hermes 会自动探测多个端点(全球版、中国版、编程版)以找到接受你 API key 的端点。无需手动设置 `GLM_BASE_URL`——可用端点会被自动检测并缓存。 ::: -### xAI(Grok)— Responses API + Prompt 缓存 +### xAI(Grok)— Responses API + Prompt 缓存 {#xai-grok--responses-api--prompt-caching} xAI 通过 Responses API(`codex_responses` 传输)接入,自动支持 Grok 4 模型的推理——无需 `reasoning_effort` 参数,服务端默认进行推理。在 `~/.hermes/.env` 中设置 `XAI_API_KEY` 并在 `hermes model` 中选择 xAI,或直接用 `grok` 作为快捷方式输入 `/model grok-4-1-fast-reasoning`。 @@ -808,7 +808,7 @@ Hermes 会自动以 64K 上下文长度加载 LM Studio 模型。 --- -### WSL2 网络(Windows 用户) +### WSL2 网络(Windows 用户) {#wsl2-networking-windows-users} 由于 Hermes Agent 需要 Unix 环境,Windows 用户在 WSL2 内运行它。如果你的模型服务器(Ollama、LM Studio 等)运行在 **Windows 主机**上,需要桥接网络——WSL2 使用具有独立子网的虚拟网络适配器,因此 WSL2 内的 `localhost` 指向 Linux 虚拟机,**而非** Windows 主机。 @@ -1039,7 +1039,7 @@ ClawRouter 需要在 Base 或 Solana 上有 USDC 充值的钱包用于支付。 --- -### 其他兼容提供商 +### 其他兼容提供商 {#other-compatible-providers} 任何具有 OpenAI 兼容 API 的服务均可使用。一些常用选项: @@ -1069,7 +1069,7 @@ model: --- -### 上下文长度检测 +### 上下文长度检测 {#context-length-detection} :::note 两个设置,容易混淆 **`context_length`** 是**总上下文窗口**——输入和输出 token 的合计预算(例如 Claude Opus 4.6 为 200,000)。Hermes 用它来决定何时压缩历史记录以及验证 API 请求。 @@ -1358,7 +1358,7 @@ provider_routing: **快捷方式:** 在任意模型名称后附加 `:nitro` 进行吞吐量排序(如 `anthropic/claude-sonnet-4:nitro`),或附加 `:floor` 进行价格排序。 -## OpenRouter Pareto Code 路由器 +## OpenRouter Pareto Code 路由器 {#openrouter-pareto-code-router} OpenRouter 提供一个实验性编程模型路由器 `openrouter/pareto-code`,自动将请求路由到满足编程质量标准的最便宜模型(按 [Artificial Analysis](https://artificialanalysis.ai/) 排名)。选择此模型并在 `~/.hermes/config.yaml` 中调整 `min_coding_score` 参数: @@ -1379,7 +1379,7 @@ openrouter: - 参见 OpenRouter 的 [Pareto Router 文档](https://openrouter.ai/docs/guides/routing/routers/pareto-router) 了解完整路由器行为。 - 要将 Pareto Code 路由器用于特定**辅助任务**(压缩、视觉等)而非主智能体,在该任务下设置 `extra_body.plugins`——参见[辅助模型 → OpenRouter 路由与辅助任务的 Pareto Code](/user-guide/configuration#openrouter-routing--pareto-code-for-auxiliary-tasks)。 -## 故障转移提供商 +## 故障转移提供商 {#fallback-providers} 配置一个备用提供商链,当主模型失败时(速率限制、服务器错误、认证失败)Hermes 按顺序尝试。规范格式是顶级 `fallback_providers:` 列表: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md index 7ee79f7651122..c5b523ad79cb1 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/environment-variables.md @@ -413,7 +413,7 @@ description: "Hermes Agent 使用的所有环境变量完整参考" | `GATEWAY_ALLOWED_USERS` | 跨所有平台允许的逗号分隔用户 ID | | `GATEWAY_ALLOW_ALL_USERS` | 无需白名单允许所有用户(`true`/`false`,默认:`false`) | -### Microsoft Graph(Teams 会议) +### Microsoft Graph(Teams 会议) {#microsoft-graph-teams-meetings} 用于即将推出的 Teams 会议摘要流水线的 Microsoft Graph REST 客户端的仅应用凭证。Azure 门户操作步骤和所需 API 权限详见[注册 Microsoft Graph 应用程序](/guides/microsoft-graph-app-registration)。 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 e1c39b9b1f054..350d1090ac5ab 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 @@ -446,7 +446,7 @@ lsof -i :8080 hermes config show ``` -#### WSL:网关持续断开连接或 `hermes gateway start` 失败 +#### WSL:网关持续断开连接或 `hermes gateway start` 失败 {#wsl-gateway-keeps-disconnecting-or-hermes-gateway-start-fails} **原因:** WSL 的 systemd 支持不稳定。许多 WSL2 安装未启用 systemd,即使启用,服务也可能在 WSL 重启或 Windows 空闲关机后无法存活。 @@ -614,7 +614,7 @@ hermes chat --- -## Profiles(配置文件) +## Profiles(配置文件) {#profiles} ### Profiles 与直接设置 HERMES_HOME 有何不同? diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/profile-commands.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/profile-commands.md index dad4207daf8c6..30255b87335ce 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/profile-commands.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/profile-commands.md @@ -285,7 +285,7 @@ hermes profile import ./work-2026-03-29.tar.gz hermes profile import ./work-2026-03-29.tar.gz --name work-restored ``` -## 发行版命令 +## 发行版命令 {#distribution-commands} :::tip **初次接触发行版?** 请先阅读 [Profile 发行版用户指南](../user-guide/profile-distributions.md) — 其中通过完整示例介绍了原因、时机和方法。以下章节是在你已知需求时使用的简明 CLI 参考。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/slash-commands.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/slash-commands.md index be7e1ca69ac14..69a1833aacf35 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/slash-commands.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/slash-commands.md @@ -13,7 +13,7 @@ Hermes 有两个斜杠命令入口,均由 `hermes_cli/commands.py` 中的中 已安装的 skill(技能)也会在两个入口以动态斜杠命令的形式暴露。这包括内置 skill,如 `/plan`,它会打开计划模式并将 markdown 计划保存在活动工作区/后端工作目录下的 `.hermes/plans/` 中。 -## 权限与管理员/用户分级 +## 权限与管理员/用户分级 {#permissions-and-adminuser-split} 每个支持按用户白名单的消息平台(Telegram、Discord、Slack、Matrix、Mattermost、Signal 等)都支持两级斜杠命令分级:**管理员**可使用所有已注册命令,**普通用户**只能使用你在 `user_allowed_commands` 中列出的命令(以及始终允许的 `/help` 和 `/whoami`)。在 `~/.hermes/gateway-config.yaml` 中对应平台的 `extra:` 块内配置 `allow_admin_from` 和 `user_allowed_commands`(以及群组等效项 `group_allow_admin_from` / `group_user_allowed_commands`)。 @@ -99,7 +99,7 @@ Hermes 有两个斜杠命令入口,均由 `hermes_cli/commands.py` 中的中 | `/reload` | 将 `.env` 变量重新加载到运行中的会话(无需重启即可获取新 API 密钥) | | `/plugins` | 列出已安装的插件及其状态 | -### 信息 +### 信息 {#info} | 命令 | 描述 | |---------|-------------| @@ -150,7 +150,7 @@ quick_commands: 不支持将纯字符串 prompt 快捷方式作为快捷命令。较长的可复用 prompt 请放入 skill,或使用 `type: alias` 指向现有斜杠命令。 -### 自定义模型别名 +### 自定义模型别名 {#custom-model-aliases} 为常用模型定义自己的短名称,然后在 CLI 或任意消息平台中通过 `/model ` 调用。别名在两者中的行为完全一致,支持仅会话(默认)和 `--global` 切换。 @@ -243,7 +243,7 @@ hermes config set model.aliases.grok x-ai/grok-4 | `/help` | 显示消息平台帮助。 | | `/` | 按名称调用任意已安装的 skill。 | -## 注意事项 +## 注意事项 {#notes} - `/skin`、`/snapshot`、`/reload`、`/tools`、`/toolsets`、`/browser`、`/config`、`/cron`、`/platforms`、`/paste`、`/image`、`/statusbar`、`/plugins`、`/busy`、`/indicator`、`/redraw`、`/clear`、`/history`、`/save`、`/copy`、`/handoff`、`/billing` 和 `/quit` 是**仅限 CLI** 的命令。 - `/skills` **仅在搜索/浏览/安装时属于 CLI-only**;其写入审批子命令(`pending`、`approve`、`reject`、`diff`、`approval`)在 `skills.write_approval` 开启时也可在消息平台使用。`/memory` 可在**两个表面**使用。 @@ -252,7 +252,7 @@ hermes config set model.aliases.grok x-ai/grok-4 - `/status`、`/version`、`/background`、`/queue`、`/steer`、`/voice`、`/reload-mcp`、`/reload-skills`、`/rollback`、`/debug`、`/fast`、`/footer`、`/curator`、`/kanban`、`/credits`、`/suggestions`、`/blueprint`、`/sessions` 和 `/yolo` 在 **CLI 和消息 gateway 中均可使用**。 - `/voice join`、`/voice channel` 和 `/voice leave` 仅在 Discord 上有意义。 -## 破坏性命令的确认提示 +## 破坏性命令的确认提示 {#confirmation-prompts-for-destructive-commands} CLI 在执行会丢弃未保存会话状态的斜杠命令前会提示确认。当前破坏性命令集为: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/cli.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/cli.md index ced238eca24d5..75f9937e085db 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/cli.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/cli.md @@ -90,7 +90,7 @@ hermes -w -z "Fix issue #123" # 在 worktree 中以单次查询模式运行 恢复之前的会话时(`hermes -c` 或 `hermes --resume `),横幅与输入提示符之间会出现一个"Previous Conversation"面板,显示对话历史的简洁摘要。详情及配置说明参见[会话——恢复时的对话摘要](sessions.md#conversation-recap-on-resume)。 -## 快捷键 +## 快捷键 {#keybindings} | 按键 | 操作 | |-----|--------| @@ -378,7 +378,7 @@ auxiliary: 压缩触发时,中间轮次会被摘要,同时始终保留前 3 轮和后 20 轮。 -## 后台会话 +## 后台会话 {#background-sessions} 在独立的后台会话中运行 prompt,同时继续使用 CLI 进行其他工作: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md index cd3748530d316..8b053ffe2b975 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/configuration.md @@ -122,7 +122,7 @@ terminal: Agent 拥有与您的用户账户相同的文件系统访问权限。使用 `hermes tools` 禁用不需要的工具,或切换到 Docker 进行沙箱隔离。 ::: -### Docker 后端 +### Docker 后端 {#docker-backend} 在具有安全加固的 Docker 容器内运行命令(所有权限已删除、无权限提升、PID 限制)。 @@ -166,7 +166,7 @@ terminal: **凭据转发:** `docker_forward_env` 中列出的环境变量首先从您的 shell 环境解析,然后回退到 `~/.hermes/.env`。技能也可以声明 `required_environment_variables`,这些变量会自动合并。 -### SSH 后端 +### SSH 后端 {#ssh-backend} 通过 SSH 在远程服务器上运行命令。使用 ControlMaster 进行连接复用(5 分钟空闲保活)。默认启用持久 shell —— 状态(cwd、环境变量)在命令之间保持。 @@ -411,7 +411,7 @@ export TERMINAL_LOCAL_PERSISTENT=true 有关每个后端的详细信息,请参阅[代码执行](features/code-execution.md)和 [README 的终端部分](features/tools.md)。 -## 技能设置 +## 技能设置 {#skill-settings} 技能可以通过其 SKILL.md frontmatter 声明自己的配置设置。这些是非机密值(路径、偏好、域设置),存储在 `config.yaml` 的 `skills.config` 命名空间下。 @@ -541,7 +541,7 @@ worktree: true # 始终创建 worktree(与 hermes -w 相同) node_modules/ ``` -## 上下文压缩 +## 上下文压缩 {#context-compression} Hermes 自动压缩长对话以保持在模型的上下文窗口内。压缩摘要器是一个单独的 LLM 调用 —— 您可以将其指向任何 provider 或端点。 @@ -700,7 +700,7 @@ Hermes 对流式传输有单独的超时层,以及用于非流式调用的陈 上下文压力是自动的 —— 无需配置。它纯粹作为面向用户的通知触发,不修改消息流或向模型上下文注入任何内容。 -## 凭据池策略 +## 凭据池策略 {#credential-pool-strategies} 当您为同一 provider 拥有多个 API 密钥或 OAuth token 时,配置轮换策略: @@ -712,7 +712,7 @@ credential_pool_strategies: 选项:`fill_first`(默认)、`round_robin`、`least_used`、`random`。完整文档请参阅[凭据池](/user-guide/features/credential-pools)。 -## Prompt 缓存 +## Prompt 缓存 {#prompt-caching} 当活跃 provider 支持时,Hermes 自动开启跨会话 prompt 缓存 —— 无需用户配置。 @@ -722,7 +722,7 @@ Qwen Cloud(阿里巴巴 DashScope)上游将缓存 TTL 限制为 5 分钟, 不存在禁用此功能的旋钮 —— 缓存始终开启,即使在单轮对话中也能节省费用,因为仅系统提示词就占输入 token 数的相当大比例。 -## 辅助模型 +## 辅助模型 {#auxiliary-models} Hermes 使用"辅助"模型处理图像分析、网页摘要、浏览器截图分析、会话标题生成和上下文压缩等附带任务。默认情况下(`auxiliary.*.provider: "auto"`),Hermes 将每个辅助任务路由到您的**主聊天模型** —— 与您在 `hermes model` 中选择的相同 provider/模型。您无需配置任何内容即可开始,但请注意,在昂贵的推理模型(Opus、MiniMax M2.7 等)上,辅助任务会增加显著成本。如果您希望无论主模型如何都使用便宜且快速的附带任务,请显式设置 `auxiliary..provider` 和 `auxiliary..model`(例如,在 OpenRouter 上使用 Gemini Flash 进行视觉和网页提取)。 @@ -788,7 +788,7 @@ Hermes 中的每个模型槽位 —— 辅助任务、压缩、回退 —— 使 `"main"` provider 选项表示"使用我的主 agent 使用的任何 provider" —— 它仅在 `auxiliary:`、`compression:` 和 `fallback_model:` 配置中有效。它**不是**顶级 `model.provider` 设置的有效值。如果您使用自定义 OpenAI 兼容端点,请在 `model:` 部分设置 `provider: custom`。所有主模型 provider 选项请参阅 [AI Providers](/integrations/providers)。 ::: -### 完整辅助配置参考 +### 完整辅助配置参考 {#full-auxiliary-config-reference} ```yaml auxiliary: @@ -893,7 +893,7 @@ auxiliary: `fallback_chain` 适用于任何辅助任务 —— `compression`、`vision`、`web_extract`、`approval`、`skills_hub`、`mcp` 等。 -### OpenRouter 路由和辅助任务的 Pareto Code +### OpenRouter 路由和辅助任务的 Pareto Code {#openrouter-routing--pareto-code-for-auxiliary-tasks} 当辅助任务解析到 OpenRouter(显式或通过 `provider: "main"` 而您的主 agent 在 OpenRouter 上)时,主 agent 的 `provider_routing` 和 `openrouter.min_coding_score` 设置**不会传播** —— 按设计,每个辅助任务是独立的。要为特定辅助任务设置 OpenRouter provider 偏好或使用 [Pareto Code 路由器](/integrations/providers#openrouter-pareto-code-router),请通过 `extra_body` 按任务设置: @@ -1146,7 +1146,7 @@ tts: **速度回退层次:** provider 特定速度(例如 `tts.edge.speed`)→ 全局 `tts.speed` → `1.0` 默认值。设置全局 `tts.speed` 以在所有 provider 上应用统一速度,或按 provider 覆盖以进行精细控制。 -## 显示设置 +## 显示设置 {#display-settings} ```yaml display: @@ -1382,7 +1382,7 @@ whatsapp: - `ignore` 静默丢弃未授权的 DM。 - 平台部分覆盖全局默认值,因此您可以在广泛范围内保持配对启用,同时使一个平台更安静。 -## 快速命令 +## 快速命令 {#quick-commands} 定义自定义命令,这些命令要么在不调用 LLM 的情况下运行 shell 命令,要么将一个斜杠命令别名为另一个。Exec 快速命令是零 token 的,对于从消息平台(Telegram、Discord 等)进行快速服务器检查或实用脚本很有用。 @@ -1557,7 +1557,7 @@ security: - `tirith_timeout` —— 等待 tirith 扫描的最大秒数。如果扫描超时,命令继续执行。 - `tirith_fail_open` —— 为 `true`(默认)时,如果 tirith 不可用或失败,允许命令执行。设置为 `false` 以在 tirith 无法验证时阻止命令。 -## 网站黑名单 +## 网站黑名单 {#website-blocklist} 阻止 agent 的 web 和浏览器工具访问特定域名: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/docker.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/docker.md index 8b1609ef12bb5..d9133634d2bc1 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/docker.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/docker.md @@ -258,7 +258,7 @@ docker run -d \ nousresearch/hermes-agent gateway run ``` -## Dockerfile 说明 +## Dockerfile 说明 {#what-the-dockerfile-does} 官方镜像基于 `debian:13.4`,包含: @@ -289,7 +289,7 @@ docker run -d \ 除非你在命令链中保留 `/init`(或等效的旧版 `docker/entrypoint.sh` shim,它会转发到 stage2 hook),否则不要覆盖镜像入口点。s6-overlay 的 `/init` 以 root 运行,以便在首次启动时对卷执行 chown,然后通过 `s6-setuidgid` 为每个受监管的服务**以及**主程序降权至 `hermes` 用户。在官方镜像内以 root 启动 `hermes gateway run` 默认会被拒绝,因为这可能在 `/opt/data` 中留下 root 所有的文件,导致后续 dashboard 或 gateway 启动失败。仅在你有意接受该风险时才设置 `HERMES_ALLOW_ROOT_GATEWAY=1`。 ::: -### Per-profile gateway 监管 +### Per-profile gateway 监管 {#per-profile-gateway-supervision} 在容器内,每个通过 `hermes profile create ` 创建的 profile 都会自动在 `/run/service/gateway-/` 注册一个受 s6 监管的 gateway 服务。你在宿主机上运行的生命周期命令在此同样适用: @@ -417,7 +417,7 @@ networks: 如果某个工具可能对大多数 Hermes Agent 用户有用,考虑将其贡献到上游,而不是在私有派生镜像中维护。在 [hermes-agent 仓库](https://github.com/NousResearch/hermes-agent)提交 issue 或 pull request,描述该工具及其使用场景。被纳入官方镜像的工具惠及所有用户,并避免了维护下游 fork 的开销。 -## 连接本地推理服务器(vLLM、Ollama 等) +## 连接本地推理服务器(vLLM、Ollama 等) {#connecting-to-local-inference-servers-vllm-ollama-etc} 在 Docker 中运行 Hermes 且推理服务器(vLLM、Ollama、text-generation-inference 等)也在宿主机或另一个容器中运行时,网络配置需要额外注意。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md index fe82502e9950e..24f759dfc69ba 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/browser.md @@ -329,7 +329,7 @@ google-chrome \ 通过 CDP 连接后,所有浏览器工具(`browser_navigate`、`browser_click` 等)将在您的实时浏览器实例上运行,而非启动云端会话。 -### WSL2 + Windows Chrome:优先使用 MCP 而非 `/browser connect` +### WSL2 + Windows Chrome:优先使用 MCP 而非 `/browser connect` {#wsl2--windows-chrome-prefer-mcp-over-browser-connect} 若 Hermes 在 WSL2 内运行,但您想控制的 Chrome 窗口在 Windows 宿主机上,`/browser connect` 通常不是最佳方案。 diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/context-files.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/context-files.md index a9116b46ea852..38b8b82e4a707 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/context-files.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/context-files.md @@ -144,7 +144,7 @@ The following project context files have been loaded and should be followed: 注意,SOUL 内容直接插入,不带额外的包装文本。 -## 安全性:Prompt 注入防护 +## 安全性:Prompt 注入防护 {#security-prompt-injection-protection} 所有上下文文件在被纳入之前都会扫描潜在的 prompt 注入。扫描器检查以下内容: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/cron.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/cron.md index e543f8cfcb22c..a6d2b62424c3d 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/cron.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/cron.md @@ -186,7 +186,7 @@ hermes cron edit --clear-skills - `--remove-skill` 删除指定的已附加 skill - `--clear-skills` 删除所有已附加的 skill -## 生命周期操作 +## 生命周期操作 {#lifecycle-actions} Cron 任务现在拥有比创建/删除更完整的生命周期。 @@ -416,7 +416,7 @@ cron: 或设置 `HERMES_CRON_SCRIPT_TIMEOUT` 环境变量。解析顺序为:环境变量 → config.yaml → 默认 120 秒。 -## 无 agent 模式(纯脚本任务) +## 无 agent 模式(纯脚本任务) {#no-agent-mode-script-only-jobs} 对于不需要 LLM 推理的周期性任务——经典的看门狗、磁盘/内存告警、心跳、CI ping——在创建时传入 `no_agent=True`。调度器按计划运行你的脚本,并直接投递其 stdout,完全跳过 agent: diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/extending-the-dashboard.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/extending-the-dashboard.md index f783dc5619749..7503ccd95869f 100644 --- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/extending-the-dashboard.md +++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/user-guide/features/extending-the-dashboard.md @@ -52,11 +52,11 @@ Hermes Web Dashboard(`hermes dashboard`)在设计上支持换肤和扩展, --- -## 主题 +## 主题 {#themes} 主题是存储在 `~/.hermes/dashboard-themes/` 中的 YAML 文件。文件名无关紧要(系统使用主题的 `name:` 字段),但惯例是 `.yaml`。所有字段均为可选——缺失的键会回退到内置的 `default` 主题,因此一个主题可以只包含一个颜色。 -### 快速上手——你的第一个主题 +### 快速上手——你的第一个主题 {#quick-start--your-first-theme} ```bash mkdir -p ~/.hermes/dashboard-themes @@ -77,7 +77,7 @@ palette: 这就是全部入门流程:一个文件,两个颜色。以下内容均为可选的进阶配置。 -### 调色板、字体排版、布局 +### 调色板、字体排版、布局 {#palette-typography-layout} 这三个块是主题的核心。每个块相互独立——覆盖其中一个,其余保持不变。 @@ -144,7 +144,7 @@ layout: density: compact ``` -### 布局变体 +### 布局变体 {#layout-variants} `layoutVariant` 选择整体 shell 布局。缺省时默认为 `"standard"`。 @@ -160,7 +160,7 @@ layoutVariant: cockpit 当前变体通过 `document.documentElement.dataset.layoutVariant` 暴露,因此 `customCSS` 中的原始 CSS 可通过 `:root[data-layout-variant="cockpit"] ...` 定向匹配。 -### 主题资源(图片作为 CSS 变量) +### 主题资源(图片作为 CSS 变量) {#theme-assets-images-as-css-vars} 随主题附带图片 URL。每个命名插槽会成为一个 CSS 变量(`--theme-asset-`),内置 shell 和任何插件均可读取。`bg` 插槽自动接入 backdrop;其他插槽面向插件开放。 @@ -192,7 +192,7 @@ const hero = getComputedStyle(document.documentElement) .getPropertyValue("--theme-asset-hero").trim(); ``` -### 组件外观覆盖 +### 组件外观覆盖 {#component-chrome-overrides} `componentStyles` 可在不编写 CSS 选择器的情况下重新设置各 shell 组件的样式。每个桶(bucket)的条目会成为 CSS 变量(`--component--`),shell 的共享组件会读取这些变量。因此 `card:` 的覆盖应用于所有 ``,`header:` 应用于应用栏,以此类推。 @@ -218,7 +218,7 @@ componentStyles: 属性名使用 camelCase(`clipPath`),输出为 kebab-case(`clip-path`)。值为纯 CSS 字符串——CSS 接受的任何内容均可(`clip-path`、`border-image`、`background`、`box-shadow`、`animation` 等)。 -### 颜色覆盖 +### 颜色覆盖 {#color-overrides} 大多数主题不需要此功能——3 层调色板已派生出所有 shadcn token。当你需要派生无法产生的特定强调色时(例如柔和主题的更柔和的破坏性红色,或品牌专属的成功绿色),才使用 `colorOverrides`。 @@ -236,7 +236,7 @@ colorOverrides: 每个键与 `--color-` CSS 变量一一对应(例如 `primaryForeground` → `--color-primary-foreground`)。此处设置的任何键仅对当前激活主题生效,切换到其他主题时覆盖会被清除。 -### 原始 `customCSS` +### 原始 `customCSS` {#raw-customcss} 对于 `componentStyles` 无法表达的选择器级外观——伪元素、动画、媒体查询、主题范围内的覆盖——可将原始 CSS 写入 `customCSS`: @@ -258,7 +258,7 @@ customCSS: | CSS 在主题应用时以单个带作用域的 `