Repository navigation
feat(hermesagent): track Hermes Agent v0.21.3 hook events and MCP per-server keys - #3105
Merged
Merged
Conversation
…-server keys Re-validate the `hermesagent` target against Hermes Agent v0.21.3 (tag `v2026.9.14`): - `VALID_HOOKS` grew to 39 entries; add the two new shell-hook events `agent_loop_stopped` and `on_room_member_activity` so they no longer warn as undocumented, and move the compatibility pin in the warning, the doc comments and the docs from v0.20.2 to v0.21.3. - MCP: carry the per-server `protocol` (`auto` / `stateless` / `legacy`), `lazy` and the `lifecycle:` mapping, and the `oauth` keys Hermes actually reads (`client_name`, `client_metadata_url`, `cimd`, `token_endpoint_auth_method`, `application_type`, `user_agent`, `flow`, `timeout`, `scope`) in both directions. - Hermes reads a single space-separated `scope` string and never the `scopes` list earlier versions wrote; a `scopes` list is now folded into `scope` on generate and import so an authored scope finally reaches the authorization server. Refs #2414 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019yLN6CVqeZ8HCrjRb9o7mK
…and follow the scope fold in E2E The new lifecycle fixture wrote `__proto__` as an object-literal key, which JSON.stringify drops, so the assertion never exercised the pollution filter; it now uses the raw-JSON pattern the sibling test already relies on. The Hermes MCP E2E import test still expected the legacy `oauth.scopes` list, which is now folded into the `scope` string Hermes reads. Refs #2414 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019yLN6CVqeZ8HCrjRb9o7mK
Owner
Author
|
@dyoshikawa Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #2414
Re-validates the
hermesagenttarget against Hermes Agent v0.21.3 (tagv2026.9.14) and closes the mechanical gaps found:hermes_cli/plugins.py'sVALID_HOOKSnow holds 39 entries. The two events added in v0.21 —agent_loop_stoppedandon_room_member_activity— are added toHERMESAGENT_NATIVE_HOOK_EVENTS, so authoring them underhermesagent.hooksno longer warns as undocumented. The compatibility pin in the warning message, doc comments (@seelinks) anddocs/reference/{supported-tools,file-formats}.mdmoves from v0.20.2 to v0.21.3.copyHermesAdvancedFields):protocol(auto/stateless/legacy, mcp-config-reference),lazy(read intools/mcp_tool_discovery.py) and thelifecycle:mapping form of the stdio recycle timeouts (read intools/mcp_tool_common.py). The opaque-mapping copies (sampling,elicitation,identity_header,lifecycle) are now one loop to stay under the complexity cap.oauthkeys:copyHermesOauthkeeps the keystools/mcp_oauth.py/tools/mcp_oauth_device.pyread —client_name,client_metadata_url,cimd,token_endpoint_auth_method,application_type,user_agent,flow,timeout,scope— in addition to the existing callback/client-id keys.scopes→scope: Hermes reads only a single space-separatedscopestring (cfg.get("scope")); thescopeslist rulesync wrote before was never read. Ascopeslist is now folded intoscopewhen noscopeis given, on generate and on import, so an authored scope reaches the authorization server and an oldconfig.yamlimports cleanly.Left open on the issue as design decisions: project-scope skills/commands (root choice, trust gate) and the
.hermes.mdchain.Test plan
pnpm cicheck(12,368 tests)hermesagent-hooks.test.tsandhermesagent-mcp.test.tsfail against the previous implementation (6 failures) and pass with this change🤖 Generated with Claude Code
https://claude.ai/code/session_019yLN6CVqeZ8HCrjRb9o7mK