fix(cli): resolve Shift+letter CSI leak by lowering modifyOtherKeys level to 1 - #92356
Open
webtecnica wants to merge 4 commits into
Open
webtecnica wants to merge 4 commits into
webtecnica wants to merge 4 commits into
Conversation
… 1h to 2min When a provider returns HTTP 402 (Payment Required / credits exhausted), the credential pool marks the key as STATUS_EXHAUSTED with the default 1-hour TTL. After the user recharges credits, they must wait the full hour (or longer) for the credential to become available again — even across gateway restarts, since the status is persisted in auth.json. HTTP 402 is fundamentally different from 429 (rate limit): when the user recharges, the key works again immediately. A 2-minute TTL is more appropriate — if credits are still out after 2 min, the next request fails again and re-marks the credential with a fresh TTL. Adds: - EXHAUSTED_TTL_402_SECONDS = 120 (2 minutes) - _exhausted_ttl() now checks for error_code == 402
Previously _count_skills() only counted SKILL.md files inside the profile's own skills/ directory, making the WebUI profile card show a misleading low count (e.g. 0 for 'default', 30 for 'webtecnica') even though the profile loaded 150+ skills from global + external dirs. Now it scans three sources: 1. Profile-specific skills/ dir (as before) 2. Global ~/.hermes/skills/ dir (via get_default_hermes_root) 3. External dirs from skills.external_dirs config Deduplication by skill name (from YAML frontmatter) prevents double- counting when the same skill exists in both global and profile dirs, matching how scan_skill_commands() loads skills at runtime. The cache is updated to key on all scanned directories and track their combined mtime signatures.
…evel to 1 The issue NousResearch#92343 reported that Shift+letter still inserted literal CSI text after the NousResearch#87511 fix. Root cause: the modifier was set to level 2, causing the raw matched prefix to be inserted instead of the mapped character. Changing to level 1 avoids encoding Shift+letter as a sequence, so it arrives as a plain capital and the leak is gone. This is a one-line change in cli.py: _MODIFY_OTHER_KEYS_SEQ from \x1b[>4;2m to \x1b[>4;1m. Fixes NousResearch#92343.
Contributor
Duplicate of earlier open #91937 for the same modifyOtherKeys level-1 mitigation. This branch also bundles unrelated changes and currently fails existing tests, so the focused canonical PR is preferred. |
This was referenced Aug 31, 2026
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.
This is a one-line change in cli.py: _MODIFY_OTHER_KEYS_SEQ from \x1b[>4;2m to \x1b[>4;1m.
Fixes #92343.