fix: migrate hardcoded ~/.hermes paths to HERMES_HOME resolution (#835)
All checks were successful
Lint / lint (pull_request) Successful in 23s
All checks were successful
Lint / lint (pull_request) Successful in 23s
- tools/session_templates.py: use get_hermes_home() for template dir and state.db - tools/credential_redact.py: use get_hermes_home() for HERMES_HOME base - agent/context_budget.py: use get_hermes_home() for checkpoints dir - tools/crisis_tool.py: use HERMES_HOME env var with fallback for crisis log path - tools/hardcoded_path_guard.py: add noqa to example docstring lines - scripts/lint_hardcoded_paths.py: exclude lines already referencing HERMES_HOME Also fixes a pre-existing SyntaxError in credential_redact.py caused by raw strings with escaped quotes inside double-quoted literals.
This commit is contained in:
@@ -10,10 +10,10 @@ Usage:
|
||||
from tools.hardcoded_path_guard import check_path, validate_tool_args
|
||||
|
||||
# Check a single path
|
||||
err = check_path("/Users/apayne/.hermes/config.yaml")
|
||||
err = check_path("/Users/apayne/.hermes/config.yaml") # noqa: hardcoded-path-ok
|
||||
|
||||
# Validate all path-like args in a tool call
|
||||
clean_args, warnings = validate_tool_args("read_file", {"path": "/home/user/file.txt"})
|
||||
clean_args, warnings = validate_tool_args("read_file", {"path": "/home/user/file.txt"}) # noqa: hardcoded-path-ok
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user