mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
A final response generated but not confirmed-delivered was the one artifact the gateway could lose without a trace: crash or planned restart between finalize and platform ACK dropped it silently, and the resume path re-ran the whole turn at full cost (#58818 P1, #41696, #63695's gateway half). gateway/delivery_ledger.py records each outbound final response in state.db (same conventions as the async-delegation ledger: WAL, owner pid + process-start-time liveness, bounded retention): pending -> attempting -> delivered | failed startup sweep on dead-owner rows -> redeliver | abandoned Contract (the lessons from the closed delivery-outbox attempt #61790): - obligation recorded BEFORE the first send attempt; cleared only on SendResult.success (destination acceptance, #51184) - ambiguity is labeled, never silently retried: rows that were mid-send when the process died redeliver with a visible '♻️ Recovered reply — may be a duplicate' prefix (honest at-least-once) - stable ids from session_key + inbound message id + content, so distinct threads/topics can never collide - poison rows bounded: 3 attempts / 24h freshness -> abandoned; claim atomically re-stamps ownership so racing sweeps can't double-claim - redelivery clears resume_pending for the session so the resume path never re-runs a turn whose answer the ledger already holds - best-effort everywhere: ledger failure can never block or delay a send - slash-command/ephemeral/empty responses are not recorded; cron and proactive delivery stay on DeliveryRouter (separate subsystem) Config: gateway.delivery_ledger (default on; no version bump needed). Validation: 30 ledger+producer tests; 352 blast-radius gateway tests green; cross-process E2E (record in process A, kill it mid-send, claim + marker + redeliver in a fresh process B against the same state.db). |
||
|---|---|---|
| .. | ||
| docs | ||
| i18n/zh-Hans/docusaurus-plugin-content-docs/current | ||
| scripts | ||
| src | ||
| static | ||
| .gitignore | ||
| docusaurus.config.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| sidebars.ts | ||
| tsconfig.json | ||
Website
This website is built using Docusaurus, a modern static website generator.
Installation
yarn
Local Development
yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
Build
yarn build
This command generates static content into the build directory and can be served using any static contents hosting service.
Deployment
Using SSH:
USE_SSH=true yarn deploy
Not using SSH:
GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.
Diagram Linting
CI runs ascii-guard to lint docs for ASCII box diagrams. Use Mermaid (````mermaid`) or plain lists/tables instead of ASCII boxes to avoid CI failures.