ISSUE DESCRIPTION ssh Tunnel Model Transfer issue I have installed hermes in a Docker…
- User
ISSUE DESCRIPTION
ssh Tunnel Model Transfer issue I have installed hermes in a Docker Container on Ubuntu Server and Connection it with a Customer Router to a free nividea Neutron 120B Modell and it worked over Telegramm. (I used squid for blocking Special Download requests or webpages) Then I installed the Desktop App on Windows my Main pc, started it and connected via ssh but inside i just couldnt See the Model I Like „Coded in“ so I tried to Connect to via App but everytime I Go through the process of tipping everything it Lords and then Colosseum but the Modell doesnˋt Sems to change or Save.
Evaluation contract
Remote YAML lookup must resolve dotted paths only through direct children inside the selected indentation block and must not cross into sibling blocks or match a same-named key under another parent. Flat-key lookup is restricted to column zero. Return
nullfor missing parents or leaves, strip matching single or double quotes from returned values, and report offsets that point exactly to the raw value substring so writers can replace it safely. Support arbitrary nesting depth.Interface
Type: Interface Name: YamlPathHit Path: src/main/ssh-remote.ts Fields: value: string, valueStart: number, valueEnd: number Description: Result returned by YAML key lookup, containing the unquoted value and its exact source offsets.
Type: Function Name: findTopLevelKey Path: src/main/ssh-remote.ts Input: content: string, key: string Output: YamlPathHit | null Description: Resolves a key at column zero without matching nested occurrences.
Type: Function Name: findYamlPath Path: src/main/ssh-remote.ts Input: content: string, dottedPath: string Output: YamlPathHit | null Description: Resolves a dotted YAML path while respecting parent-child indentation boundaries.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /hermes-desktop, current file: none) bash-$
Assistant
Now I'll write the new YAML helpers and rewrite lines 570–645.
Assistant
I've completed the fix. Final state of the change:
Assistant
Summary of the change (all in
src/main/ssh-remote.ts):- Added a small, indentation-aware YAML resolver:
YamlPathHitinterface (value,valueStart,valueEnd).findTopLevelKey(content, key)— matches only keys declared at column zero, never nested occurrences.findYamlPath(content, dottedPath)— walks parent → direct children blocks (child indent derived from the block itself, block ends at the first line with indent ≤ parent indent), so it never crosses into sibling blocks or matches a same-named key under another parent; arbitrary nesting depth supported; returnsnullfor missing parents/leaves.- Values are returned with matching
'/"stripped, trailing# commentignored, and offsets point exactly at the raw value substring (quotes included) so writers can splice safely.
- Rewrote the config readers/writers on top of these helpers:
sshGetConfigValue/sshSetConfigValuenow honour dotted keys (memory.provider,agent.service_tier,network.proxy, …) instead of escaping the dot into a literal key or matching the firstkey:anywhere; missing leaves/parents are created instead of silently no-oping. sshGetModelConfig/sshSetModelConfignow targetmodel.provider,model.default,model.base_url(falling back to root-level keys for legacy configs), enablemodel.streaming, and disablesmart_model_routing.enabledvia the path resolver — this is the actual root cause of "model change over SSH never saves" (the old regexes wrote intomemory.provider/ whicheverprovider:came first).
Checklist
- Reproduced the reported error: The issue is behavioural (remote model selection not persisting), so I reproduced it analytically and by test: the old
sshGetConfigValue/sshSetConfigValueused^\s*key:at any indent (hits the firstprovider:/default:in the file — e.g. undermemory:) and escaped dots somemory.providernever matched at all. I confirmed the new behaviour with a scratch vitest that mockschild_process.spawnand simulates a remoteconfig.yaml. - Confirmed the fix resolves it: With the mocked SSH round-trip,
sshSetModelConfigwrites provider/default/base_url inside themodel:block, leavesmemory.provideruntouched, setsmodel.streaming: true, and setssmart_model_routing.enabled: false; a subsequentsshGetModelConfigreads back exactly the new values. Dotted get/set (memory.provider,network.proxy) also work now. - Edge cases: single/double-quoted and plain scalars, inline comments, empty values, keys with colons in the value, quoted keys, list items (
- name:isn't treated as a mapping child key), blank/comment lines, deeper-than-two nesting, same-named keys in sibling and nested blocks, files without trailing newline, missing leaf (inserted into existing parent with the parent's child indent) and missing parent (new block appended), and rejection of values containing"/\/newlines before any remote write. - Ran existing tests:
npx vitest rungives the same result before and after my change (4 files / 6 tests fail only because the Electron binary isn't installed in this sandbox; 305 pass).npm run typecheckpasses,prettierreports the new code as already formatted, and ESLint shows no new errors (only the file's pre-existing style warnings). All temporary scratch tests were deleted; onlysrc/main/ssh-remote.tsis modified.
- Added a small, indentation-aware YAML resolver:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
claude-sonnet-5Compare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-35B-A3BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →
Qwen/Qwen3.6-27BCompare side by side →