Skip to content

feat: add Hermes CLI agent integration#702

Open
stochastic-sisyphus wants to merge 52 commits into
refactoringhq:mainfrom
stochastic-sisyphus:main
Open

feat: add Hermes CLI agent integration#702
stochastic-sisyphus wants to merge 52 commits into
refactoringhq:mainfrom
stochastic-sisyphus:main

Conversation

@stochastic-sisyphus

Copy link
Copy Markdown

Adds support for Hermes Agent (https://hermes-agent.nousresearch.com) as a first-class external CLI agent in Tolaria.

Backend:

  • Introduces hermes-discovery and hermes-cli modules following the existing agent runtime pattern.
  • Detects the hermes binary via mise, ~/.local/bin, PATH, and jason default directories.
  • Spawns hermes chat -q -Q --yolo with CWD set to the active vault.
  • Streams stdout line-by-line to the Tolaria right-panel chat UI, and forwards stderr as structured error events.

Frontend:

  • Adds hermes to the AiAgentId union, registry, and agent-switching commands.
  • Includes Hermes in onboarding, settings, status bar, and command-palette test fixtures.
  • Provides an install/docs link for the onboarding flow.

- Add hermes_discovery for binary detection via mise, ~/.local/bin, PATH
- Add hermes_cli with stream_chat for Tolaria right-panel AI chat
- Register hermes in AiAgentId enum, settings, and command dispatch
- Add Hermes to frontend agent registry and all related test fixtures
- Update onboarding, status bar, settings, and command registry tests
Copilot AI review requested due to automatic review settings May 19, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new AI agent (“Hermes”) across the frontend and Tauri backend, including discovery, CLI streaming, and UI/test fixtures.

Changes:

  • Extend AI agent definitions/types to include hermes and update agent cycling/status normalization.
  • Add Tauri Hermes discovery + CLI streaming implementation and wire it into agent status + streaming dispatch.
  • Update mocks and test fixtures to include Hermes (and Kiro in some places).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/mock-tauri/mock-handlers.ts Extends mocked get_ai_agents_status payload to include hermes and updates kiro.
src/lib/aiAgents.ts Adds hermes to agent union/definitions and includes it in normalization.
src/lib/aiAgents.test.ts Updates helper tests for Hermes and status normalization/cycling.
src/hooks/useCommandRegistry.test.ts Extends command registry tests to include Hermes switch command.
src/hooks/useAiAgentsStatus.test.ts Extends hook tests to include Hermes (and Kiro) status handling.
src/hooks/useAiAgentPreferences.test.ts Extends preferences hook tests to include Hermes (and Kiro) statuses.
src/components/status-bar/AiAgentsBadge.test.tsx Extends status badge test fixtures to include Hermes (and Kiro).
src/components/StatusBar.test.tsx Extends status bar test fixtures to include Hermes (and Kiro).
src/components/SettingsPanel.test.tsx Extends settings panel test fixtures to include Hermes (and Kiro).
src/components/AiAgentsOnboardingPrompt.test.tsx Extends onboarding prompt tests to include Hermes/Kiro install CTAs and URLs.
src/App.test.tsx Extends app tests’ agent status fixtures to include Hermes (and Kiro).
src-tauri/src/settings.rs Adds hermes as a supported default AI agent id.
src-tauri/src/lib.rs Exposes Hermes CLI module and adds discovery module.
src-tauri/src/hermes_discovery.rs Implements Hermes binary discovery + candidate paths and tests.
src-tauri/src/hermes_cli.rs Implements Hermes streaming runner, ANSI-stripping, and error formatting.
src-tauri/src/commands/ai.rs Adds kiro/hermes defaults in a status-returning function.
src-tauri/src/ai_agents.rs Adds Hermes agent id/status field and wires status + streaming dispatch.

Comment thread src/lib/aiAgents.ts
Comment on lines 114 to 118
pi: normalizeAvailability(payload?.pi),
gemini: normalizeAvailability(payload?.gemini),
kiro: normalizeAvailability(payload?.kiro),
hermes: normalizeAvailability(payload?.hermes),
}
Comment thread src/lib/aiAgents.test.ts
Comment on lines +29 to +33
codex: { status: 'missing', version: null },
opencode: { installed: true, version: '0.3.1' },
pi: { installed: true, version: '0.70.2' },
gemini: { installed: true, version: '0.5.1' },
kiro: { status: 'missing', version: null },
opencode: { installed: true, version: '0.3.1' },
pi: { installed: true, version: '0.70.2' },
gemini: { installed: true, version: '0.5.1' },
kiro: { status: 'missing', version: null },
Comment on lines +468 to +469
kiro: { status: 'missing', version: null },
hermes: { status: 'missing', version: null },
Comment on lines +57 to +66
command
.arg("chat")
.arg("-q")
.arg(prompt)
.arg("-Q")
.arg("--yolo")
.arg("-t")
.arg("terminal,file")
.current_dir(vault_path)
.stdin(Stdio::null())
Comment on lines +35 to +47
let stderr_output = stderr_handle.join().unwrap_or_default();
let status = child.wait().map_err(|e| format!("Wait failed: {e}"))?;
if !status.success() {
emit(AiAgentStreamEvent::Error {
message: format_hermes_error(HermesError {
stderr_output: &stderr_output,
status: status.to_string(),
}),
});
}

emit(AiAgentStreamEvent::Done);
Ok(session_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants