Add Supercomputer category: 12 P2P resource-sharing modules (164 total)

Introduce a new production category for distributed system resource pooling
over Hyperswarm — CPU, RAM, GPU, bandwidth, disk, jobs, cache, and egress.

New modules (supercomputer/):
- hyper-p2p-capacity-registry — gossip CPU/RAM/GPU/disk/bandwidth ads
- hyper-p2p-cpu-share — CPU millisecond credit pool
- hyper-p2p-ram-pool — RAM byte lend/claim/release
- hyper-p2p-gpu-slot — GPU slot register/reserve
- hyper-p2p-bandwidth-share — shared up/down Mbps
- hyper-p2p-disk-stripe — striped block shards
- hyper-p2p-job-dispatcher — submit/claim/complete jobs
- hyper-p2p-thermal-guard — load/temperature throttle signals
- hyper-p2p-cache-farm — distributed LRU cache
- hyper-p2p-net-gateway — peer internet egress routing
- hyper-p2p-cluster-affinity — hardware tag placement scoring
- hyper-p2p-work-stealer — shard queues + work stealing

Each package: index.js, tests, README, api/architecture docs, examples/basic.js.
Shared layering guide: _shared/SUPERCOMPUTER_LAYERS.md.
Registry, module-paths, MODULE_CATEGORIES, and workspace README updated to 164.

Parent workspace also adds docs/supercomputer hub and demo-supercomputer-mesh
(outside this repo).

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 00:38:53 -04:00
co-authored by Cursor
parent 70119888cd
commit 693385bd7c
114 changed files with 24378 additions and 6 deletions
@@ -0,0 +1,36 @@
# API: hyper-p2p-net-gateway
**Protocol:** `net-gateway/v1` · **Export:** `HyperP2PNetGateway`
## Overview
Peer internet egress gateway registration and routing.
## Constructor
```js
const mod = new HyperP2PNetGateway(opts)
```
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `topic` | Buffer \| string \| null | `null` | Hyperswarm topic |
| `keyPair` | KeyPair | random | Discovery identity |
## Methods
See [`index.js`](../index.js) for the full method list. All modules implement `getStats()`, `async ready()`, and `async close()`.
## getStats()
Returns `{ ...stats, protocol: 'net-gateway/v1' }` plus module-specific counters.
## P2P
When `topic` is set, `ready()` joins Hyperswarm and opens Protomux `net-gateway/v1`.
## Testing
```bash
npm install && npm test
```
@@ -0,0 +1,14 @@
# Architecture: hyper-p2p-net-gateway
**Category:** Supercomputer · **Protocol:** `net-gateway/v1`
```mermaid
flowchart LR
App[Application] --> Mod[HyperP2PNetGateway]
Mod --> Mux[Protomux net-gateway/v1]
Mux --> Swarm[Hyperswarm]
```
## Composition
See [`../../_shared/SUPERCOMPUTER_LAYERS.md`](../../_shared/SUPERCOMPUTER_LAYERS.md) and [`../README.md`](../README.md).