Skip to content

Honcho memory provider: support runtime peer alias/prefix mapping for multi-user gateways #27314

@dionysoslin615

Description

@dionysoslin615

Feature description

For multi-user gateway platforms, it is useful for the Honcho memory provider to map platform runtime user IDs to stable Honcho peer IDs. Known users may need aliases to preserve an existing peer, while unknown users should be scoped into predictable peer IDs with a platform prefix.

Motivation

A single gateway profile may serve multiple platform users. Pinning all traffic to one static peerName mixes users. But simply using raw platform IDs can break continuity for a known owner/user who already has a stable Honcho peer.

Proposed solution

Add optional config fields such as:

{
  "hosts": {
    "hermes.example": {
      "pinPeerName": false,
      "userPeerAliases": {
        "<platform-user-id>": "stable-peer-id"
      },
      "runtimePeerPrefix": "dingtalk_"
    }
  }
}

Resolution behavior:

  1. If the runtime platform user ID matches userPeerAliases, use the mapped peer ID.
  2. Otherwise use runtimePeerPrefix + runtime_user_id, sanitized as a Honcho peer ID.
  3. Fall back to existing peerName behavior when no runtime user is available.

Local workaround tested

A local patch added user_peer_aliases and runtime_peer_prefix to the Honcho config and used them in session peer resolution. Tests were added for host-block config parsing, known-user alias mapping, and unknown-user prefix mapping.

Environment

  • Hermes checkout commit: 9f182bd7b
  • OS: Ubuntu 24.04 / Linux
  • Plugin: Honcho memory provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstool/memoryMemory tool and memory providerstype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions