Open
Conversation
latekvo
commented
Apr 12, 2026
This comment was marked as outdated.
This comment was marked as outdated.
8d99376 to
f8e8220
Compare
Add hermesAdapter to the MCP config registry so `argent init` can write the mcp_servers.argent entry into ~/.hermes/config.yaml. - Uses the yaml Document API (parseDocument/setIn/toString) to preserve user comments and formatting on round-trip. - remove() cleans up by deleting the argent key from mcp_servers, or the entire mcp_servers block when argent is the only entry. - readYamlDocument throws on malformed YAML instead of silently clobbering; writeYamlDocument uses lineWidth: 0 to avoid re-wrapping long user strings. - Adds symmetric local→global fallback in the init write loop so global-only adapters (Hermes, Windsurf) are not silently skipped when the user picks scope=local.
f8e8220 to
8a62796
Compare
latekvo
commented
Apr 17, 2026
Comment on lines
+313
to
+322
| } else if (scope !== "global" && adapter.globalPath()) { | ||
| const fallback = adapter.globalPath()!; | ||
| try { | ||
| adapter.write(fallback, mcpEntry); | ||
| mcpResults.push( | ||
| `${pc.green("+")} ${adapter.name} ${pc.dim(`(global fallback: ${fallback})`)}` | ||
| ); | ||
| } catch (err) { | ||
| mcpResults.push(`${pc.red("x")} ${adapter.name}: ${pc.dim(String(err))}`); | ||
| } |
Member
Author
There was a problem hiding this comment.
This if-else already handled global->local fallback.
This PR only adds the third local->global fallback case handling.
User is notified about this fallback mechanism at the agent selection stage - that's also where they can choose to disable integration with a specific agent.
readYaml (POJO round-trip) was added to utils.ts but never called — the hermes adapter uses the Document-returning helpers exclusively. Drop it and rename readYamlDocument/writeYamlDocument to readYaml/writeYaml so the naming matches the readJson/readToml pairs; with only one flavor left, the Document suffix no longer disambiguates anything.
For adapters like Hermes and Windsurf that only expose a global config path (or conversely, only a project path), the multiselect menu now shows an italic cyan note next to the adapter name so users understand up front which scope the entry will land in, instead of discovering it after selection.
latekvo
commented
Apr 17, 2026
Comment on lines
+209
to
+224
| const choices = ALL_ADAPTERS.map((a) => { | ||
| const parts: string[] = []; | ||
| if (detectedNames.includes(a.name)) parts.push("detected"); | ||
| const hasProject = a.projectPath(process.cwd()) != null; | ||
| const hasGlobal = a.globalPath() != null; | ||
| if (!hasProject && hasGlobal) { | ||
| parts.push(pc.italic(pc.cyan(`ⓘ will be installed into ${a.name}'s global config`))); | ||
| } else if (hasProject && !hasGlobal) { | ||
| parts.push(pc.italic(pc.cyan(`ⓘ will be installed into ${a.name}'s project config`))); | ||
| } | ||
| return { | ||
| value: a, | ||
| label: a.name, | ||
| hint: parts.length > 0 ? parts.join(", ") : undefined, | ||
| }; | ||
| }); |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
hermesAdaptertopackages/mcp/src/cli/mcp-configs.tssupporting Hermes (Nous Research AI coding agent CLI) with YAML-based config format (mcp_serverskey)readYaml/writeYamlhelpers topackages/mcp/src/cli/utils.tsusing theyamlpackageScreen.Recording.2026-04-17.at.17.37.58.mov
Screen.Recording.2026-04-17.at.17.43.02.mov
Before this PR, adapters with only one config path (only local or only global) without were installing regardless of user's scope selection. This PR makes this fact more visible, allowing the user to disable the undesired installation targets.
Would appreciate a UI opinion, i went with A because B was scary in my opinion, but something in between could also work:
Test plan
mcp-configs.test.ts(7 new Hermes tests + updated adapter count test)tsc --noEmit