hermes-agent/tests/honcho_plugin
Aakash Kattelu 2aa359ea70 feat(honcho): add OAuth device-code login (RFC 8628) for headless environments
Adds a device authorization grant flow alongside the existing loopback
OAuth flow, so `hermes setup` can connect to Honcho cloud from SSH and
other no-browser environments.

- oauth.py: new HTTP seams — _http_post_form_status (non-raising, since
  RFC 8628 polling reads the OAuth error off a 400) and _http_get_json
  for the RFC 8414 metadata probe
- oauth_flow.py: DeviceCode, request_device_code, poll_for_token with
  slow_down backoff (+5s, capped at 60s) bounded by expires_in, typed
  errors (AccessDenied, DeviceCodeExpired, AuthorizationTimeout), and
  supports_device_login (fail-closed metadata gate); device flow ends in
  the same install_grant tail as loopback so refresh/status work
  unchanged
- oauth_flow.py: loopback callback now serves a "sign-in was not
  completed" page on consent cancel instead of the success page
- cli.py: cloud menu offers oauth / device / apikey; the device option
  only appears when the host advertises the grant, and becomes the
  default when no browser is detected
- 18 new tests covering the full flow against a local fake AS, backoff
  schedule, error mapping, deadline bound, metadata gate, and wizard
  branches

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 07:53:12 -07:00
..
__init__.py feat(memory): pluggable memory provider interface with profile isolation, review fixes, and honcho CLI restoration (#4623) 2026-04-02 15:33:51 -07:00
test_async_memory.py fix(ci): make tests, workflows, and attribution reliable under load (#66373) 2026-07-17 20:55:24 +00:00
test_cli.py feat(honcho): add OAuth device-code login (RFC 8628) for headless environments 2026-07-24 07:53:12 -07:00
test_client.py fix(ci): make tests, workflows, and attribution reliable under load (#66373) 2026-07-17 20:55:24 +00:00
test_empty_profile_hint.py feat(honcho): explain why when honcho_profile returns an empty card 2026-04-27 12:37:33 -07:00
test_oauth.py feat(memory): Honcho OAuth connect — desktop and CLI flows + token refresh (#44335) 2026-06-22 19:16:47 -05:00
test_oauth_flow.py feat(honcho): add OAuth device-code login (RFC 8628) for headless environments 2026-07-24 07:53:12 -07:00
test_pin_peer_name.py chore(honcho): replace example Telegram UID with placeholder 2026-06-11 15:06:07 -04:00
test_query_rewrite.py fix(honcho): enforce recall latency and budget contracts 2026-07-16 12:48:48 -07:00
test_session.py test(honcho): align observer-resolution test with post-#62290 call shape 2026-07-16 22:25:22 -07:00