Hermes source: gateway/delivery_ledger.py, gateway/delivery.py, cron/scheduler_tick.py, cron/occurrences.py, cron/scheduler_authority.py, cron/scheduler_liveness.py, cron/quota_hold.py, hermes_state_runtime.py.
Mechanics to implement in the gateway and heartbeat scheduler:
- Reply delivery is at-least-once: the reply row is written to a ledger before the send; a crash-recovered send carries a visible duplicate marker. Obligation id is a content hash of session key, message reference and reply text, so re-recording collapses to one row. Owner stamps are pid plus process start time, compare-and-set.
- Scheduled jobs fire at most once: the schedule is advanced before the job runs; if the advance cannot be persisted the job is skipped on purpose; each fire is identified by its exact scheduled instant; an unclear outcome pauses the job and only a matching verified receipt lifts that pause; liveness is silence since the last progress stamp, not run length.
- Per-session admission queue with a runtime epoch and generation fences; rows started by an older epoch become unknown and need an operator's word.
- Each guarantee is stated in the code next to the choice.
Allen's heartbeat and the hive's queue have no stated guarantee today.
Acceptance: kill during send shows one marked duplicate and no silent loss; kill during a cron fire shows no second fire and a paused job with its receipt path; a wedged job is reclaimed while a long busy one is not.
Parent: aien-dev/aien-architecture#267. Research note: aien-architecture docs/research/hermes-agent-prior-art.md. Prior art: Hermes Agent, Nous Research, MIT, commit 5480918 (2026-10-18). No Hermes code is copied; the mechanism is re-implemented from reading. The module header credits Hermes Agent, Nous Research, the MIT licence and the commit. Rust now, pure part effect-free and content-addressed so it can move to Omega (ADR 0024). No Python.
🤖 Generated with Claude Code