Commit Graph

3 Commits

Author SHA1 Message Date
Hongming Wang
b6d67520cf feat: dual-mode for upstream register_platform (post-#17751) + legacy register_platform_adapter
Same migration shape as Molecule-AI/hermes-channel-molecule@754d162.

NousResearch/hermes-agent#17751 (merged 2026-04-30) shipped a
comprehensive pluggable-platform system with:
- ctx.register_platform(name, label, adapter_factory, check_fn, ...)
- Open Platform enum (Platform('molecule-a2a') via _missing_())

Pre-#17751 forks (incl. the patched hermes-agent baked into
template-hermes' Dockerfile today) expose ctx.register_platform_adapter
+ closed Platform + PluginPlatformIdentifier instead. Detect at runtime
in both register() and the adapter's super().__init__ identity arg so
the same wheel installs cleanly on both shapes.

template-hermes can now drop its hermes-agent fork install and use
upstream main once the in-container tests pass on stock hermes-agent.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 07:50:18 -07:00
a6e3c32f08 test: extend E2E + add real-subprocess validation
scripts/e2e_validate.py — extended with the SessionSource
to_dict/from_dict round-trip check, which proved out commit #4 of the
upstream patch series (plugin-platform-safe deserialization). 8/8
checkpoints pass.

scripts/e2e_real_hermes_subprocess.py — NEW. Spawns a real
`hermes gateway run` subprocess against a tmp HERMES_HOME with the
plugin platform enabled, polls until /a2a/health responds, then POSTs
into /a2a/inbound and asserts a 200 ack. This is the closest reproduction
of production-shape boot we can do without provisioning a workspace +
holding LLM provider creds + having a peer agent online.

The subprocess test caught a real integration bug — self.adapters dict
keyed by mixed types (Platform enum for built-ins, string for plugins)
crashed downstream consumers doing .value. Fix landed upstream:
NousResearch/hermes-agent#18775 commit ece9e34e.
2026-05-02 03:17:57 -07:00
8c4f2b7569 Initial: hermes-platform-molecule-a2a v0.1.0
Hermes-agent platform adapter that delivers Molecule A2A peer-agent
messages to a running hermes daemon over HTTP, and POSTs agent replies
back to the molecule-runtime callback URL.

Closes the MCP-style push parity gap for hermes workspaces:
- Single long-lived adapter session (no subprocess per message)
- MessageEvent(internal=True) bypasses per-platform user allowlist
  for trusted A2A peer messages
- Optional shared-secret HMAC enforcement
- Per-chat callback URL learned from inbound payload

Requires hermes-agent ≥ the upstream PR
NousResearch/hermes-agent#18775 (PluginContext.register_platform_adapter
+ GatewayConfig plugin_platforms wiring + PluginPlatformIdentifier
helper + resolve_platform_id deserialization).
2026-05-02 03:06:56 -07:00