toHub method

NodeDescriptor toHub()

The omnyhub descriptor this node advertises at registration.

Implementation

omnyhub.NodeDescriptor toHub() => omnyhub.NodeDescriptor(
  id: omnyhub.NodeId(id.value),
  // Mirrored so `NodeGateway.discover(capability: …)` works on OmnyServer
  // nodes without teaching omnyhub about CapabilityKind.
  capabilities: capabilities.capabilities.map((c) => c.name).toSet(),
  labels: labels,
  agentVersion: platform.agentVersion,
  attributes: {descriptorAttribute: toJson()},
);