Skip to main content

@happyvertical/smrt-gnode

Federation library for inter-gnode peer-to-peer discovery and communication.

Status: stubs only -- not implemented. All methods return empty arrays or null.

Installation

pnpm add @happyvertical/smrt-gnode

Intent

Gnodes are federated local knowledge bases. This package will provide the federation protocols needed for P2P discovery and cross-gnode communication. No s-m-r-t models are present -- this is a library-stage package.

Exports

Classes

ExportStatusDescription
FederationStubPeer discovery and exchange. discoverPeers() and exchangePeers() return []
WebFingerProtocolStub.well-known/gnode discovery. discover() returns null
PeerExchangeProtocolStub/api/federation/peers peer list exchange. exchange() returns []

Types

ExportDescription
GnodePeerPeer descriptor: url, name, discoveredAt, lastSeen?
FederationConfigConfig: enabled, discoverability, peers, autodiscovery, peerExchange
WebFingerResponseWebFinger response: subject, links[]

Constants

ExportDescription
versionPackage version string ('0.1.0')

Planned Architecture

  • WebFinger-based peer discovery via GET /.well-known/gnode
  • Peer exchange protocol via GET /api/federation/peers
  • ActivityPub-inspired cross-gnode queries

Dependencies

None. Standalone stub package.