hermes-agent/hermes_cli/subcommands
Brooklyn Nicholson 37d0766ba5 fix(pairing): keep GUI approvals off the code brute-force lockout
Follow-up hardening on the request-id grant path.

approve_request took the same lockout treatment as approve_code: gated by
it, and recording a miss toward it. But the two paths defend different
things. The lockout exists to stop guessing at the 8-char code space over a
messaging channel; a request id is only ever obtained by an admin already
authenticated to the store, so a miss means the row they clicked went stale.
Counting those let a handful of clicks on a stale list lock the operator out
of `hermes pairing approve` for an hour — the GUI DoSing the CLI.

Also drops the `code`/`code_hash_prefix` compat fields from list_pending.
The hash prefix is what admin surfaces mistook for an approvable code in the
first place, and re-exporting the request id under the old `code` key just
preserves the ambiguity; both consumers in the tree read `request_id` now.
The 16-hex sniffing that had been copy-pasted into the CLI and the endpoint
(where a chained conditional consulted it against the wrong field) moves to
one owner, PairingStore.looks_like_request_id.

The endpoint no longer reports a 429 on the request-id path, where lockout
can't apply — a stale id surfaced as a bogus "locked out" while the platform
sat locked for something else entirely.
2026-07-29 17:51:40 -05:00
..
__init__.py
…
_shared.py
…
acp.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
approvals.py feat(approvals): hermes approvals suggest — mine approval history into allowlist proposals 2026-07-26 17:49:03 -07:00
auth.py
…
backup.py
…
claw.py
…
config.py
…
console.py
…
cron.py
…
dashboard.py
…
debug.py
…
doctor.py
…
dump.py
…
gateway.py
…
gui.py
…
hooks.py
…
import_agent.py
…
import_cmd.py
…
insights.py
…
login.py
…
logout.py
…
logs.py
…
mcp.py feat(cli): add --connect-timeout flag to hermes mcp add 2026-07-05 19:10:00 -07:00
memory.py
…
model.py
…
monitoring.py
…
pairing.py
…
plugins.py
…
profile.py
…
prompt_size.py
…
security.py
…
setup.py
…
skills.py
…
skin.py
…
slack.py
…
status.py
…
sync.py
…
tools.py
…
uninstall.py feat: add uninstall dry-run mode 2026-07-07 05:12:24 -07:00
update.py
…
version.py
…
webhook.py
…
whatsapp.py
…