hermes-agent/tests/plugins
Ben 3fc7b624d8 feat(cron,gateway): NAS-JWT fire verifier + /api/cron/fire webhook (Chronos)
Phase 4E (E.1 + E.2). The inbound side of Chronos: NAS POSTs the agent when a
one-shot fires; the agent verifies a NAS-minted JWT and runs the job.

E.1 — plugins/cron/chronos/verify.py:
- verify_nas_fire_token(token, expected_audience, jwks_or_key, issuer): verifies
  signature against the NAS JWKS (RS/ES family; symmetric rejected), aud == this
  agent, exp/nbf, iss, and purpose == "cron_fire" (so a general agent JWT can't
  be replayed against the fire endpoint). Returns claims or None; never raises.
  Crypto delegated to PyJWT[crypto] (already a declared dep) — no hand-rolled
  JWT, no new dependency. No key configured → refuse (never unsigned-decode a
  security boundary).
- get_fire_verifier(): pluggable indirection so the DQ-4 escape hatch
  (direct per-job cron-key) can swap in with no handler change.

E.2 — gateway/platforms/api_server.py:
- POST /api/cron/fire (registered only when _CRON_AVAILABLE). Authenticated by
  the NAS-JWT via get_fire_verifier() — NOT API_SERVER_KEY (NAS holds no API
  key; this is the only inbound that triggers remote job execution, so it gets
  its own purpose-scoped check). Verifier args come from cron.chronos.* config.
  401 on bad/missing/forged token. 400 on missing job_id. On success: 202 +
  fire_due runs in the background (so a long agent turn never trips NAS's HTTP
  timeout); the store CAS claim inside fire_due de-dupes a scheduler retry.

Tests:
- test_chronos_verify (11): REAL RS256 signing — valid→claims, wrong-aud,
  missing/wrong purpose, expired, wrong-iss, tampered-signature (attacker key),
  no-key-refuse, empty-token, JWKS-URL key resolution, get_fire_verifier.
- test_cron_fire_webhook (5): valid→202+fire, invalid→401+no-fire, missing
  token→401, missing job_id→400, and fire path does NOT require API_SERVER_KEY.
api_server regression suites (214) green.

E.3 (NAS endpoints) is a separate cross-repo PR; the wire contract lands next
(docs/chronos-managed-cron-contract.md).
2026-06-18 14:46:33 +10:00
..
browser fix(browser): self-review pass — dead-import, log levels, future-proofing 2026-05-17 04:04:15 -07:00
dashboard_auth feat(dashboard-auth): add generic self-hosted OIDC provider 2026-06-04 03:23:45 -07:00
image_gen fix(image_gen): use gpt-5.5 for Codex image host 2026-06-06 19:31:51 -07:00
memory fix(openviking): don't block the command thread on session switch; lock turn state 2026-06-18 00:21:21 +05:30
model_providers fix: route minimax m3 reasoning controls through profile 2026-06-15 07:08:43 -07:00
platforms/photon fix(photon): preserve text in mixed iMessage attachments (salvage #46513) (#46818) 2026-06-17 16:14:24 -05:00
transcription feat(stt): add stt.providers.<name> command-provider registry 2026-05-25 01:41:19 -07:00
tts feat(tts): add register_tts_provider() plugin hook (closes #30398) 2026-05-24 18:04:54 -07:00
video_gen fix(xai): route video models by modality 2026-06-01 19:00:30 -07:00
web revert(web): remove keyless Parallel search fallback (#46350) 2026-06-14 16:47:57 -07:00
__init__.py fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) 2026-04-05 22:43:33 -07:00
test_achievements_plugin.py test: use subprocesses for each test file (#29016) 2026-05-21 16:40:04 +05:30
test_chronos_cron.py feat(cron): Chronos NAS-mediated managed-cron provider (scale-to-zero) 2026-06-18 14:40:56 +10:00
test_chronos_verify.py feat(cron,gateway): NAS-JWT fire verifier + /api/cron/fire webhook (Chronos) 2026-06-18 14:46:33 +10:00
test_discord_runtime_failure.py fix(discord): recover from runtime gateway task exits (#44383) 2026-06-11 15:39:01 -04:00
test_disk_cleanup_plugin.py test: assert disk cleanup prunes protected walks 2026-06-15 05:25:27 -07:00
test_google_meet_audio.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_google_meet_node.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_google_meet_plugin.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_google_meet_realtime.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_kanban_attachments.py feat(kanban): file attachments on tasks (#35395) 2026-05-30 07:41:04 -07:00
test_kanban_dashboard_plugin.py fix(dashboard): sanction plugin WS/upload auth via SDK helpers (gated mode) 2026-06-03 16:59:36 -07:00
test_kanban_worker_runs.py feat(kanban): add POST /runs/{run_id}/terminate endpoint 2026-05-29 00:21:54 -07:00
test_langfuse_plugin.py fix(langfuse): redact base64 data URIs instead of truncating into invalid base64 2026-06-10 10:49:36 +05:30
test_nemo_relay_plugin.py fix(nemo-relay): preserve downstream errors in adaptive execution (#42691) 2026-06-09 02:31:10 -07:00
test_plugin_dashboard_auth_contract.py fix(dashboard): sanction plugin WS/upload auth via SDK helpers (gated mode) 2026-06-03 16:59:36 -07:00
test_retaindb_plugin.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_security_guidance_plugin.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_teams_pipeline_plugin.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00