hermes-agent/gateway/relay
Ben Barclay 75a70d98f3
feat(relay): forward a stable instance id at self-provision (Phase 6 Unit α) (#50772)
Add relay_instance_id() (env GATEWAY_RELAY_INSTANCE_ID first, then
gateway.relay_instance_id in config.yaml, mirroring the other relay readers) and
forward it in the /relay/provision body so the connector can bind
gatewayId -> instanceId and route inbound per-instance once Phase 6 delivery
lands.

The value is gateway-asserted but safely scoped: the org/tenant stays
NAS-token-verified at the connector, so a dishonest gateway can only bind its
OWN tenant's instance — same posture as relay_endpoint(). instanceId is only
added to the body when present, so omitting it lets the connector store null
(back-compat: self-hosted / pre-Phase-6 gateways simply have no binding yet).

For a managed (NAS-hosted) agent the id is NAS's AgentInstance.id, stamped into
the container env beside GATEWAY_RELAY_URL.

Tests: reader (env/config/absent), self_provision_relay forwards the id (set +
absent), and the real _post_provision body includes instanceId ONLY when set.

Refs: ~/nous/specs/gateway-gateway plan.md Phase 6 Unit α; decisions.md Q11.
2026-06-22 21:46:59 +10:00
..
__init__.py feat(relay): forward a stable instance id at self-provision (Phase 6 Unit α) (#50772) 2026-06-22 21:46:59 +10:00
adapter.py feat(relay): handle passthrough_forward over the WS (Phase 5 §5.1, gateway half) (#50702) 2026-06-22 20:10:57 +10:00
auth.py feat(relay): connector⇄gateway channel auth + signed-HTTP inbound receiver + enroll CLI (#48147) 2026-06-18 12:01:54 +10:00
descriptor.py feat(relay): derive descriptor from PlatformEntry 2026-06-17 16:37:45 -07:00
transport.py feat(relay): handle passthrough_forward over the WS (Phase 5 §5.1, gateway half) (#50702) 2026-06-22 20:10:57 +10:00
ws_transport.py feat(relay): handle passthrough_forward over the WS (Phase 5 §5.1, gateway half) (#50702) 2026-06-22 20:10:57 +10:00