feat: add Hermes frontend types, API layer, and hooks (Phase 7)

- Add "hermes" to AppId union type and all exhaustive Record<AppId>
- Add HermesModelConfig, HermesAgentConfig, HermesEnvConfig types
- Add hermes field to VisibleApps, McpApps, ProxyTakeoverStatus
- Create src/lib/api/hermes.ts with Tauri invoke wrappers
- Create src/hooks/useHermes.ts with 5 query + 3 mutation hooks
- Register hermes in APP_IDS, APP_ICON_MAP (violet color scheme)
- Split MCP_SKILLS_APP_IDS into MCP_APP_IDS (includes hermes) and
  SKILLS_APP_IDS (excludes hermes, since Hermes has no Skills support)
- Wire hermes additive-mode into App.tsx (remove/duplicate handlers),
  ProviderList.tsx (live provider ID query + In Config badge),
  mutations.ts (cache invalidation on switch/add/delete)
- Add Hermes checkbox to McpFormModal
- Add basic hermes i18n keys (en/zh/ja)
This commit is contained in:
Jason
2026-04-15 17:41:33 +08:00
parent 576ff53a75
commit a0b585992a
23 changed files with 467 additions and 33 deletions
+39
View File
@@ -188,6 +188,7 @@ export interface VisibleApps {
gemini: boolean;
opencode: boolean;
openclaw: boolean;
hermes: boolean;
}
// WebDAV 同步状态
@@ -281,6 +282,8 @@ export interface Settings {
opencodeConfigDir?: string;
// 覆盖 OpenClaw 配置目录(可选)
openclawConfigDir?: string;
// 覆盖 Hermes 配置目录(可选)
hermesConfigDir?: string;
// ===== 当前供应商 ID(设备级)=====
// 当前 Claude 供应商 ID(优先于数据库 is_current
@@ -354,6 +357,7 @@ export interface McpApps {
gemini: boolean;
opencode: boolean;
openclaw: boolean;
hermes: boolean;
}
// MCP 服务器条目(v3.7.0 统一结构)
@@ -569,3 +573,38 @@ export interface OpenClawToolsConfig {
deny?: string[];
[key: string]: unknown; // preserve unknown fields
}
// ============================================================================
// Hermes Agent 专属配置
// ============================================================================
export interface HermesModelConfig {
default?: string;
provider?: string;
base_url?: string;
context_length?: number;
max_tokens?: number;
[key: string]: unknown;
}
export interface HermesAgentConfig {
max_turns?: number;
reasoning_effort?: string;
tool_use_enforcement?: string | boolean | string[];
[key: string]: unknown;
}
export interface HermesEnvConfig {
[key: string]: unknown;
}
export interface HermesHealthWarning {
code: string;
message: string;
path?: string;
}
export interface HermesWriteOutcome {
backupPath?: string;
warnings: HermesHealthWarning[];
}