All plugins

hermes-room

Hermes Room washes untrusted web, email, file and tool output before Hermes reads it: deterministically, with model help for semantic attacks, and with receipts you can audit. Layer 1 (always, local, stdlib-only) strips zero-width/bidi/control characters, ANSI escapes and hidden-HTML payloads, and masks leaked secrets (AWS/GitHub/GitLab/Slack/OpenAI/Google keys, JWTs, private-key blocks, password=/secret= assignments). Layer 2 runs only when Layer 1 flags something: a host-model reviewer via ctx.llm.complete_structured, your active Hermes model - no provider/model override, no extra API key - 20s timeout, 800 tokens, fail-open to Layer 1. Every change yields a local JSONL Trust Receipt (SHA-256, rule IDs, counts, reviewer verdict, never raw content): trust_receipt shows what changed, trust_report exports Markdown. Disclosure - reads only tool-output text; no network beyond the user's own provider call via ctx.llm; no shell, no background processes, no telemetry; no credentials required (requires_env is empty); writes solely to <HERMES_HOME>/hermes-room/receipts.jsonl (hashes/counts only, local); fails open, never blocks or breaks the tool loop. Disclosure β€” rewrites the result of every tool (web, email, MCP, read_file, terminal, skills) before the model sees it: it strips hidden HTML/control characters, deletes phrases that look like injected instructions, masks secret-looking values and adds an [UNTRUSTED ...] header, so files read through it may differ from what is on disk; when a rule fires it sends up to 8,000 characters of the unmasked output to your active Hermes model for review (an extra model call, up to 20 s) and may replace the result with the reviewer's re-washed text; receipts in <HERMES_HOME>/hermes-room/receipts.jsonl hold hashes, rule IDs and counts plus the reviewer's verdict, quoted snippets and up to 2,000 characters of its reply; no other network, shell, background work or telemetry.

adenijiridwan43Toolsv0.2.0Updated 21 days ago

About

Hermes Room washes untrusted web, email, file and tool output before Hermes reads it: deterministically, with model help for semantic attacks, and with receipts you can audit. Layer 1 (always, local, stdlib-only) strips zero-width/bidi/control characters, ANSI escapes and hidden-HTML payloads, and masks leaked secrets (AWS/GitHub/GitLab/Slack/OpenAI/Google keys, JWTs, private-key blocks, password=/secret= assignments). Layer 2 runs only when Layer 1 flags something: a host-model reviewer via ctx.llm.complete_structured, your active Hermes model - no provider/model override, no extra API key - 20s timeout, 800 tokens, fail-open to Layer 1. Every change yields a local JSONL Trust Receipt (SHA-256, rule IDs, counts, reviewer verdict, never raw content): trust_receipt shows what changed, trust_report exports Markdown. Disclosure - reads only tool-output text; no network beyond the user's own provider call via ctx.llm; no shell, no background processes, no telemetry; no credentials required (requires_env is empty); writes solely to <HERMES_HOME>/hermes-room/receipts.jsonl (hashes/counts only, local); fails open, never blocks or breaks the tool loop. Disclosure β€” rewrites the result of every tool (web, email, MCP, read_file, terminal, skills) before the model sees it: it strips hidden HTML/control characters, deletes phrases that look like injected instructions, masks secret-looking values and adds an [UNTRUSTED ...] header, so files read through it may differ from what is on disk; when a rule fires it sends up to 8,000 characters of the unmasked output to your active Hermes model for review (an extra model call, up to 20 s) and may replace the result with the reviewer's re-washed text; receipts in <HERMES_HOME>/hermes-room/receipts.jsonl hold hashes, rule IDs and counts plus the reviewer's verdict, quoted snippets and up to 2,000 characters of its reply; no other network, shell, background work or telemetry.

πŸ›‘οΈ Hermes Room

Turn untrusted web, email, file and tool output into safe context before Hermes reads it β€” with receipts.

Hermes Room
Version
Python
License
Mode

Local-first sanitizer + Trust Receipt. Follows your Hermes Desktop model. No extra key.

A skill can tell Hermes to be careful. Hermes Room changes the bytes Hermes receives β€” deterministically, with model help for semantic attacks, and evidence you can audit.

✨ Features

  • 🧼 Deterministic wash (always, free, local) β€” strips zero-width / bidi / control chars, ANSI escapes, hidden HTML, script/style payloads.
  • πŸ” Secret / DLP masking β€” masks AWS keys, GitHub/GitLab/Slack/OpenAI/Google tokens, JWTs, generic password=/secret=/api_key= assignments, and full private-key blocks before the model sees them.
  • πŸ€– Host-model reviewer (Mode 1) β€” ctx.llm.complete_structured against your active Hermes model. No provider override, no extra API key. Runs only on suspicion.
  • πŸ”— Link & hidden-content markers β€” replaces invisible spans with visible [hidden … removed] markers; annotates labelβ†’href domain mismatch.
  • 🧾 Trust Receipt β€” local JSONL: SHA-256, rule IDs, reviewer verdict, provider/model. Never raw content by default.
  • πŸ” Evidence tools β€” trust_receipt (what changed) and trust_report (Markdown audit export).
  • πŸ› οΈ Fail-open β€” reviewer timeout/error β†’ keep Layer 1 result, never break Hermes tool loop.

πŸ—οΈ How it works

flowchart LR
    subgraph Hermes
        LLM[Main Agent Model]
    end
    Tool[Tool call: web / file / email / terminal] --> Result[Tool result]
    Result --> Hook[transform_tool_result]
    Hook --> L1[L1: Deterministic wash]
    L1 -->|risk medium/high| L2[L2: Host-model reviewer]
    L1 -->|clean| Receipt[(Trust Receipt)]
    L2 --> Rewash[L1 re-wash of model output]
    Rewash --> Receipt
    Receipt --> Clean[Cleaned + UNTRUSTED header]
    Clean --> LLM

Layer 1 is stdlib-only and runs on every tool result. It strips controls / hidden HTML / addresses and masks leaked secrets. Layer 2 runs only when Layer 1 flags something (or long imperative content), with strict caps: 20s timeout, 800 tokens, 8k chars.

πŸš€ Quickstart

# Install into Hermes
hermes plugins install hermes-room
hermes plugins enable hermes-room

# Verify (same checks catalog CI runs)
hermes plugins doctor . --ci
hermes plugins validate . --install-deps

Then in Hermes:

Summarize fixtures/poisoned.html

Call trust_receipt to see what was removed. Run tests/:

python -m unittest discover -s tests -t . -v

Demo variants

# 1. Poisoned page β€” hidden injection payload
fixtures/poisoned.html

# 2. Secret leak β€” fake AWS key / GitHub token / password / private key
fixtures/secret-output.txt

Both fixture files contain fake/example values only.

🎬 Demo (90s)

  1. Open fixtures/poisoned.html β€” harmless article + hidden injection payload.
  2. Ask Hermes to summarize it.
  3. trust_receipt β†’ removed items, hash, reviewer verdict.
  4. Ask "What did you receive?" β€” Hermes quotes cleaned content only.
  5. trust_report β†’ export Markdown.
  6. Repeat with fixtures/clean.html β€” passes unchanged.
  7. Repeat with fixtures/secret-output.txt β€” fake secrets are masked, receipt shows secret_* rule IDs.

βš™οΈ Mode 1 β€” why no extra key

You pick the model in Hermes Desktop as usual. Hermes Room calls:

ctx.llm.complete_structured(instructions=..., input=..., json_schema=REVIEW_SCHEMA, purpose="hermes-room.sanitize")

No provider= / model= / task= override β†’ uses your active provider/model, host-owned credentials, audited in agent.log. Clean content skips the call entirely.

🧩 Why plugin, not skill

SkillHermes Room Plugin
Advice the model may followRewrites bytes before context
Can't strip hidden Unicode/HTML reliablyMechanical, tested pipeline
Self-reported, no evidenceLocal receipts with hashes + verdicts
Needs model complianceWorks in CLI / gateway / cron / subagents

πŸ”’ Disclosure & honesty

  • Modifies tool output only when changes are made; cleansed text gets [UNTRUSTED source=… risk=…] header.
  • Receipts local: ~/.hermes/hermes-room/receipts.jsonl (or $HERMES_HOME/hermes-room/). Raw content not stored by default.
  • Uses your Hermes host model for bounded reviewer calls. No network beyond that, no Node/Docker, no credentials, no auto-approval, no wallet access.
  • Reduces poisoned context β€” not a guarantee, not an approval system or sandbox.

πŸ“ Project structure

hermes-room/
β”œβ”€β”€ plugin.yaml          # manifest: hermes-room 0.2.0
β”œβ”€β”€ __init__.py          # register(ctx): hook + tools
β”œβ”€β”€ sanitizer.py         # Layer 1 deterministic wash
β”œβ”€β”€ reviewer.py          # Layer 2 host-model reviewer (Mode 1)
β”œβ”€β”€ receipts.py          # Trust Receipt store
β”œβ”€β”€ schemas.py           # trust_receipt / trust_report
β”œβ”€β”€ fixtures/            # poisoned / clean / hidden-unicode / ANSI / secret-output
β”œβ”€β”€ tests/               # 9 unittest cases
β”œβ”€β”€ README.md
β”œβ”€β”€ ARCHITECTURE.md
β”œβ”€β”€ LICENSE
└── .gitignore

🀝 Contributing & community

Issues/PRs welcome. Keep PRs stdlib-only, add fixtures + tests for new patterns, update README badges/version together.

πŸ“„ License

MIT. Built for the Hermes Agent Plugin Hackathon β€” hermes plugins install hermes-room should just work.


Made locally, reviewed locally. Your data stays in your Room.

README from the reviewed commit b2f7b25; it updates when the author re-pins.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section