Files
hermes-agent/hermes_cli/local_runtime
alt-glitch 56f44c6f7a refactor: read JSON sidecars through utils.read_json_or_empty
Six private readers repeated the body of utils.read_json_or_empty
line for line: read utf-8-sig, return {} on OSError or ValueError,
return {} for a JSON value that is not an object.

rich_sent_store._load and stuck_loop_counts._read_counts only took a
path, so they are deleted and their callers call read_json_or_empty.
prune_advisor._read_estimate, webapp_access._registration,
left_core_migration._auth_store and local_runtime.recovery.read_state
compute their path, so they keep their names and read through the
shared helper. utils is imported inside the function where the module
already imports utils lazily, so module import cost is unchanged.

boot_bootstrap.read_last_known stays: it is boot code that imports no
utils, and it is a public name other modules import.
environments/base._load_json_store stays: modal.py and
vercel_sandbox.py import it.
2026-11-16 13:56:35 +05:30
..
…
…
…