aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/app.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-09 05:20:43 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-09 05:20:43 +0200
commit95e045272243043ed9a207115f7737a0e3eb1ccc (patch)
treec6255c770fc64bb7505400d7c14a8a418b0fc747 /packages/meshbay-hub/src/meshbay_hub/app.py
parentdeee67755991994742ef144400857dd5f6b8aafa (diff)
downloadmeshbay-95e045272243043ed9a207115f7737a0e3eb1ccc.tar.gz
feat(hub): add MHP federation + Mesh Relay registration — 5.2 + 5.3
Federation (MHP 0.1): /mhp/info, /mhp/directory (GET=export, POST=receive), /mhp/revoke (propagation), /mhp/peers (admin registration). Peer auth: JWT EdDSA signed by requesting hub's key. Explicit peer allowlist — no auto-discovery. Relay (5.3): /v1/relays (GET=list), /v1/relays/register (relay keepalive), /v1/relays/approve (admin pre-approval). Relays pre-approved by admin, then self-register with signed endpoint. Nodes query when hole punch fails. 59/59 tests. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/app.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/app.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/app.py b/packages/meshbay-hub/src/meshbay_hub/app.py
index 5b01e80..dcb255b 100644
--- a/packages/meshbay-hub/src/meshbay_hub/app.py
+++ b/packages/meshbay-hub/src/meshbay_hub/app.py
@@ -26,6 +26,8 @@ from meshbay_hub.api.nodes import router as nodes_router
from meshbay_hub.api.groups import router as groups_router
from meshbay_hub.api.revocation import router as revocation_router
from meshbay_hub.api.moderation import router as moderation_router
+from meshbay_hub.api.federation import router as federation_router
+from meshbay_hub.api.relay import router as relay_router
from meshbay_hub.api.webapp import router as webapp_router
from meshbay_hub.api.middleware import limiter
@@ -69,6 +71,8 @@ def create_app(cfg: HubConfig | None = None) -> FastAPI:
app.include_router(groups_router)
app.include_router(revocation_router)
app.include_router(moderation_router)
+ app.include_router(federation_router)
+ app.include_router(relay_router)
app.include_router(webapp_router)
return app