hermes-agent/hermes_cli
shitcoinsherpa 48e65631f6 Fix auth store file lock for Windows (msvcrt) with reentrancy support
fcntl is not available on Windows. This adds msvcrt.locking as a
fallback for cross-process advisory locking on Windows.

msvcrt.locking is not reentrant within the same thread, unlike fcntl.flock.
This matters because resolve_codex_runtime_credentials holds the lock and
then calls _save_codex_tokens, which tries to acquire it again. Without
reentrancy tracking, this deadlocks on Windows after a 15-second timeout.

Uses threading.local() to track lock depth per thread, allowing nested
acquisitions to pass through without re-acquiring the underlying lock.

Also handles msvcrt-specific requirements: file must be opened in r+ mode
(not a+), must have at least 1 byte of content, and the file pointer must
be at position 0 before locking.
2026-03-05 17:16:03 -05:00
..
__init__.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
auth.py Fix auth store file lock for Windows (msvcrt) with reentrancy support 2026-03-05 17:16:03 -05:00
banner.py feat(mcp): banner integration, /reload-mcp command, resources & prompts 2026-03-02 19:15:59 -08:00
callbacks.py refactor: reorganize agent and CLI structure for improved clarity 2026-02-21 23:17:18 -08:00
codex_models.py refactor(auth): transition Codex OAuth tokens to Hermes auth store 2026-03-01 19:59:24 -08:00
colors.py Cleanup time! 2026-02-20 23:23:32 -08:00
commands.py feat(cli): add /usage command to display session token usage 2026-03-01 00:23:19 -08:00
config.py feat: add container resource configuration prompts in setup wizard 2026-03-04 03:29:05 -08:00
cron.py refactor: streamline cron job handling and update CLI commands 2026-02-21 16:21:19 -08:00
doctor.py Merge remote-tracking branch 'origin/main' into codex/align-codex-provider-conventions-mainrepo 2026-02-26 10:56:29 -08:00
gateway.py feat: add detailed setup instructions for Telegram, Discord, and Slack platforms 2026-03-03 20:05:15 -08:00
main.py feat: add interactive setup for messaging platforms in gateway CLI 2026-03-03 18:57:33 -08:00
models.py Update model version in hermes_cli to use openai/gpt-5.3-codex 2026-02-25 13:26:14 -08:00
pairing.py Cleanup time! 2026-02-20 23:23:32 -08:00
runtime_provider.py fix: prioritize OPENROUTER_API_KEY over OPENAI_API_KEY 2026-03-03 00:28:26 +03:00
setup.py Merge PR #274: fix(setup): handle TerminalMenu init failures with safe fallback 2026-03-05 01:26:58 -08:00
skills_hub.py Cleanup time! 2026-02-20 23:23:32 -08:00
status.py refactor(cli): Finalize OpenAI Codex Integration with OAuth 2026-02-28 21:47:51 -08:00
tools_config.py feat: enhance Home Assistant integration with service discovery and setup 2026-03-03 05:16:53 -08:00
uninstall.py Cleanup time! 2026-02-20 23:23:32 -08:00