DC-140: network provider abstraction (src/network/) + tailscale provider + registry + tests

This commit is contained in:
Hermes committed 2026-10-03 21:16:20 -07:00
1 parent 420fa2ba2a
commit 7ef3914730
7 files changed
+1308

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
/**
* src/network entry point (DC-140).
*
* Registers the built-in providers with the registry on first require.
* The WireGuard provider (DC-149) registers itself here when it lands.
*
* Usage (feature modules — the ONLY sanctioned import):
* const { registry } = require('../network');
* const provider = registry.getActiveProvider(); // throws if unset
* if (registry.getCapabilities().invites) { ... }
*/
'use strict';
const registry = require('./registry');
const { createTailscaleProvider } = require('./providers/tailscale');
registry.registerProvider('tailscale', createTailscaleProvider);
module.exports = {
registry,
errors: require('./errors'),
CONTRACT_METHODS: require('./provider').CONTRACT_METHODS,
};