Skip to content

[Adapter] Support Hermes CLI #21

Description

@teseo

Kind

implement

Goal

Integrate human.md with Hermes using plugin or shell hooks for pre-tool, session, and context events.

Non-goals

  • Adding a Hermes-specific policy engine.
  • Treating fail-open hook errors as hard enforcement.
  • Supporting unrelated Hermes gateway deployment behavior.

Invariants

  • pre_tool_call deny is explicit and tested.
  • Hook errors and timeouts have a documented fail-open or wrapper fail-closed policy.
  • JSON stdin/stdout remains compatible with Hermes hook execution.
  • Session state is isolated and cleaned up.

Behavioral contract / States

Translate Hermes pre_tool_call, post_tool_call, pre_llm_call, on_session_start, and on_session_end into canonical events. Return the expected hook response and preserve a diagnostic trail for hook failures.

Scope surface

Hermes plugin/shell hook adapter, configuration examples, timeout handling, and tests.

Acceptance

  • Verify a blocked pre_tool call does not execute.
  • Verify session start/end and context injection fixtures.
  • Test hook timeout and malformed JSON behavior.
  • Run: python3 -m pytest tests/test_guard.py -v and the Hermes adapter smoke test.

Split triggers

  • Plugin and shell hooks have incompatible semantics that cannot share one adapter.
  • Gateway-only behavior needs a separate delivery contract.

Dependencies / Parent

Blocked by: #1, #2, #3
Parent Epic: #15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions