refactor(termhub): compact re-export blocks and wrap companion-module docstrings

This commit is contained in:
Teknium
2026-09-02 15:59:18 -07:00
parent a8f3dc4946
commit d320d5f741
8 changed files with 56 additions and 119 deletions
+4 -2
View File
@@ -1,4 +1,7 @@
"""Sudo password plumbing and shell-command rewrites for the terminal tool: the per-scope interactive password cache, the /dev/tty prompt, real-sudo tokenizer (sudo -S -p '' rewrite), NOPASSWD probe, and the compound-background brace-group rewrite.
"""Sudo password plumbing and shell-command rewrites for the terminal tool: the
per-scope interactive password cache, the /dev/tty prompt, real-sudo tokenizer
(sudo -S -p '' rewrite), NOPASSWD probe, and the compound-background brace-
group rewrite.
Split out of ``tools/terminal_tool.py``; every public/patched name is re-imported there,
so ``tools.terminal_tool.<name>`` keeps resolving (and monkeypatching) as before.
@@ -23,7 +26,6 @@ logger = logging.getLogger("tools.terminal_tool")
# session can never reuse another's cached password in a long-lived process.
_sudo_password_cache: dict[str, str] = {}
_sudo_password_cache_lock = threading.Lock()