refactor(hermes_cli): AST-neutral closer hugging across r3-17 slice files

This commit is contained in:
Teknium
2026-09-02 23:58:31 -07:00
parent 1ceca3c326
commit 3494f7cf23
15 changed files with 182 additions and 369 deletions
+2 -4
View File
@@ -70,8 +70,7 @@ _KEYS_DROPPED_WITH_WARNING = {"sampling"}
# (hermes key, codex key, skip note) — timeouts are emitted as floats or skipped when non-numeric.
_TIMEOUT_KEYS = (
("timeout", "tool_timeout_sec", "timeout (not numeric)"),
("connect_timeout", "startup_timeout_sec", "connect_timeout (not numeric)"),
)
("connect_timeout", "startup_timeout_sec", "connect_timeout (not numeric)"))
def _str_map(d: dict) -> dict[str, str]:
@@ -130,8 +129,7 @@ def _translate_one_server(name: str, hermes_cfg: dict) -> tuple[Optional[dict],
# env-var passthrough (HERMES_HOME, PYTHONPATH) could carry one in pathological cases.
_TOML_ESCAPES = (
("\\", "\\\\"), ('"', '\\"'), ("\b", "\\b"), ("\t", "\\t"),
("\n", "\\n"), ("\f", "\\f"), ("\r", "\\r"),
)
("\n", "\\n"), ("\f", "\\f"), ("\r", "\\r"))
def _escape_toml_string(value: str) -> str: