Skip to content

feat(setup): add Hermes Agent hook integration#49

Merged
Grivn merged 1 commit into
masterfrom
feat/hermes-setup-hooks
Jun 1, 2026
Merged

feat(setup): add Hermes Agent hook integration#49
Grivn merged 1 commit into
masterfrom
feat/hermes-setup-hooks

Conversation

@Grivn

@Grivn Grivn commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

Adds mnemon setup --target hermes using Hermes Agent's native shell hook surface instead of a MemoryProvider adapter.

  • detects Hermes via hermes or ~/.hermes
  • writes ~/.hermes/skills/mnemon/SKILL.md
  • installs Hermes shell hooks under ~/.hermes/agent-hooks/mnemon/
  • patches ~/.hermes/config.yaml for on_session_start, pre_llm_call, post_llm_call, and optional on_session_finalize
  • supports eject cleanup for owned skill, hooks, config entries, and transient hook state
  • documents the new target in English and Chinese usage docs

This is one native-hook implementation path for #2; it intentionally does not close the issue because a Hermes MemoryProvider/plugin path may still be worth tracking separately.

Validation

  • go test ./internal/setup ./cmd
  • go build -o mnemon .
  • bash scripts/check_bilingual_sync.sh
  • git diff --check
  • isolated HOME smoke test for mnemon setup --target hermes --yes
  • isolated HOME smoke test for mnemon setup --eject --target hermes --yes

Note: go test ./... still fails in existing harness UI/read tests that depend on real project lifecycle fixture data (TestPagesRenderRealData, TestLoadRealProjectRendersData); those failures are unrelated to this change.

Add Hermes Agent as a setup target using its native shell hook surface. The installer writes a mnemon skill, deploys Hermes-specific hook scripts, and patches ~/.hermes/config.yaml for session start, pre-LLM recall injection, post-response nudges, and optional session finalization guidance.

The YAML patcher preserves unrelated Hermes config, replaces prior mnemon hook entries idempotently, and eject removes the owned skill, hooks, config entries, and transient state. Validation: go test ./internal/setup ./cmd, go build -o mnemon ., scripts/check_bilingual_sync.sh, and manual setup/eject smoke checks with an isolated HOME.
@Grivn Grivn merged commit f0c1aa0 into master Jun 1, 2026
1 check passed
@Grivn Grivn deleted the feat/hermes-setup-hooks branch June 1, 2026 11:22
@elessarrr

elessarrr commented Jun 5, 2026

Copy link
Copy Markdown

'...it intentionally does not close the issue because a Hermes MemoryProvider/plugin path may still be worth tracking separately.' could you flesh out a bit more what you were expecting here please?

@Grivn

Grivn commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

Sure. This PR covers the standard Mnemon integration path: hook + skill, using Hermes' native hook and skill surfaces.

I kept #2 open because the issue also surfaced another interesting direction: a Hermes MemoryProvider / plugin integration. This is the comment I had in mind: #2 (comment)

That seems like a valid alternative for users who want Mnemon to behave more like a first-class Hermes memory backend.

I haven't looked deeply enough yet to say whether that should become an official path, and it has different tradeoffs from the hook approach, especially around automatic memory writes vs. Mnemon's LLM-supervised writeback model. So I'd rather keep the issue open for now and evaluate that separately.

@Grivn

Grivn commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

@elessarrr just adding an explicit mention here so this doesn't get lost: #49 (comment)

@elessarrr

elessarrr commented Jun 5, 2026

Copy link
Copy Markdown

Thanks for clarifying, @Grivn. This PR covers my original proposal; glad it shipped. I’ll step back for now and keep an eye on issues in case an interesting opportunity to contribute comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants