Updates
This commit is contained in:
+219
-202
@@ -1,233 +1,250 @@
|
|||||||
# Module categories (52)
|
# Module categories (v2)
|
||||||
|
|
||||||
Physical layout: `modules/<category>/<module-name>/`. See [`module-paths.json`](module-paths.json) for require paths.
|
|
||||||
|
|
||||||
| Directory | Modules |
|
|
||||||
|-----------|--------|
|
|
||||||
| [`network-stack/`](network-stack/README.md) | 10 |
|
|
||||||
| [`core-infrastructure/`](core-infrastructure/README.md) | 5 |
|
|
||||||
| [`messaging-gossip/`](messaging-gossip/README.md) | 3 |
|
|
||||||
| [`routing-paths/`](routing-paths/README.md) | 4 |
|
|
||||||
| [`measurement-rate-control/`](measurement-rate-control/README.md) | 1 |
|
|
||||||
| [`scheduling-queues/`](scheduling-queues/README.md) | 3 |
|
|
||||||
| [`state-crdts/`](state-crdts/README.md) | 3 |
|
|
||||||
| [`time-ordering/`](time-ordering/README.md) | 1 |
|
|
||||||
| [`consensus-coordination/`](consensus-coordination/README.md) | 3 |
|
|
||||||
| [`trust-security/`](trust-security/README.md) | 3 |
|
|
||||||
| [`agents-workflows/`](agents-workflows/README.md) | 3 |
|
|
||||||
| [`indexes-search/`](indexes-search/README.md) | 2 |
|
|
||||||
| [`oracles/`](oracles/README.md) | 1 |
|
|
||||||
| [`experimental/`](experimental/README.md) | 10 |
|
|
||||||
|
|
||||||
All modules are production-ready (Wave 7, v0.3.1+). Exhaustive docs: [`_shared/DOC_STANDARDS.md`](_shared/DOC_STANDARDS.md). Unit tests: [`../real_tests/run-all.sh`](../real_tests/run-all.sh) — **52/52**.
|
|
||||||
|
|
||||||
| Category | Count | Purpose |
|
152 modules in **30** category directories. Tiers: **production** (52) · **scaffold** (100).
|
||||||
|----------|------:|---------|
|
|
||||||
| [Network stack](#network-stack-wave-6) | 10 | Transport, topology, QoS, circuits |
|
|
||||||
| [Core infrastructure](#core-infrastructure) | 5 | Presence, RPC, sessions, capabilities |
|
|
||||||
| [Messaging & gossip](#messaging--gossip) | 3 | Core epidemic fanout, dedup, events |
|
|
||||||
| [Routing & paths](#routing--paths) | 4 | Intent, patterns, relay, registry |
|
|
||||||
| [Measurement & rate control](#measurement--rate-control) | 1 | Local token-bucket (`bucket-rate-limit`; inter-peer credits in network stack) |
|
|
||||||
| [Scheduling & queues](#scheduling--queues) | 3 | Work queue, scheduler, leases |
|
|
||||||
| [State & CRDTs](#state--crdts) | 3 | Reactive state, maps, OR-set |
|
|
||||||
| [Time & ordering](#time--ordering) | 2 | Temporal index (core clocks in infrastructure / experimental) |
|
|
||||||
| [Consensus & coordination](#consensus--coordination) | 3 | Locks, BFT-style consensus, quorum |
|
|
||||||
| [Trust & security](#trust--security) | 3 | Attestations, trust graph, reputation |
|
|
||||||
| [Agents & workflows](#agents--workflows) | 3 | Memory, tasks, DAG workflows |
|
|
||||||
| [Indexes & search](#indexes--search) | 2 | Spatial and semantic indexes |
|
|
||||||
| [Oracles](#oracles) | 1 | Decentralized attestations |
|
|
||||||
| [Experimental (Wave 4)](#experimental-wave-4) | 10 | Novel chaos / emergent primitives |
|
|
||||||
|
|
||||||
---
|
Source of truth: [`MODULE_REGISTRY.yaml`](MODULE_REGISTRY.yaml).
|
||||||
|
|
||||||
## Network stack (Wave 6)
|
| Tier | Meaning |
|
||||||
|
|------|---------|
|
||||||
|
| production | Full implementation, `0.3.x+`, brittle tests |
|
||||||
|
| scaffold | `0.0.0-scaffold`, load smoke, Wave 8+ deepen |
|
||||||
|
|
||||||
Production networking layer on Hyperswarm + Protomux. Composition: [`_shared/WAVE6_NETWORK_STACK.md`](_shared/WAVE6_NETWORK_STACK.md). Demo: [`../examples/p2p-network-stack-demo/`](../examples/p2p-network-stack-demo/).
|
## Agents & workflows (`agents-workflows`) — 3 modules
|
||||||
|
|
||||||
| Module | Role |
|
- 🟢 **hyper-p2p-agent-memory** — `agent-memory/v1` (production)
|
||||||
|--------|------|
|
- 🟢 **hyper-p2p-task-orchestrator** — `task-orchestrator/v1` (production)
|
||||||
| [hyper-p2p-protocol-handshake](network-stack/hyper-p2p-protocol-handshake/) | Pre-channel version and feature negotiation |
|
- 🟢 **hyper-p2p-workflow-graph** — `workflow-graph/v1` (production)
|
||||||
| [hyper-p2p-connection-pool](network-stack/hyper-p2p-connection-pool/) | Warm peer lanes, idle teardown |
|
|
||||||
| [hyper-p2p-overlay-topology](network-stack/hyper-p2p-overlay-topology/) | Explicit neighbor graph, max degree, churn heal |
|
|
||||||
| [hyper-p2p-link-probe](network-stack/hyper-p2p-link-probe/) | Active RTT/jitter matrix |
|
|
||||||
| [hyper-p2p-anycast-selector](network-stack/hyper-p2p-anycast-selector/) | Lowest-latency capability routing |
|
|
||||||
| [hyper-p2p-congestion-signal](network-stack/hyper-p2p-congestion-signal/) | Gossip RTT/loss → send-rate hints |
|
|
||||||
| [hyper-p2p-bandwidth-broker](network-stack/hyper-p2p-bandwidth-broker/) | Inter-peer bandwidth credits |
|
|
||||||
| [hyper-p2p-flow-shaper](network-stack/hyper-p2p-flow-shaper/) | Priority QoS egress queues |
|
|
||||||
| [hyper-p2p-multipath-fanout](network-stack/hyper-p2p-multipath-fanout/) | ECMP striping and reassembly |
|
|
||||||
| [hyper-p2p-circuit-loom](network-stack/hyper-p2p-circuit-loom/) | Multi-hop CREATE/EXTEND/RELAY circuits |
|
|
||||||
|
|
||||||
---
|
## Applications (collaboration) (`applications-collab`) — 4 modules
|
||||||
|
|
||||||
## Core infrastructure
|
- 🟡 **hyper-p2p-collab-room** — `collab-room/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-cursor-presence** — `cursor-presence/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-document-line-lock** — `document-line-lock/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-whiteboard-op** — `whiteboard-op/v1` (scaffold)
|
||||||
|
|
||||||
Foundation primitives most apps compose first.
|
## Applications (economy) (`applications-economy`) — 3 modules
|
||||||
|
|
||||||
| Module | Role |
|
- 🟡 **hyper-p2p-auction-gossip** — `auction-gossip/v1` (scaffold)
|
||||||
|--------|------|
|
- 🟡 **hyper-p2p-credit-ledger** — `credit-ledger/v1` (scaffold)
|
||||||
| [hyper-p2p-presence](core-infrastructure/hyper-p2p-presence/) | Liveness, metadata, signed announcements |
|
- 🟡 **hyper-p2p-marketplace-listing** — `marketplace-listing/v1` (scaffold)
|
||||||
| [hyper-p2p-rpc](core-infrastructure/hyper-p2p-rpc/) | Typed streaming RPC on Protomux |
|
|
||||||
| [hyper-p2p-capabilities](core-infrastructure/hyper-p2p-capabilities/) | Capability tokens and delegation |
|
|
||||||
| [hyper-p2p-session-bridge](core-infrastructure/hyper-p2p-session-bridge/) | SecretStream pairs and handoff |
|
|
||||||
| [hyper-p2p-vector-clock](core-infrastructure/hyper-p2p-vector-clock/) | Causal ordering for events |
|
|
||||||
|
|
||||||
---
|
## Consensus & coordination (`consensus-coordination`) — 5 modules
|
||||||
|
|
||||||
## Messaging & gossip
|
- 🟢 **hyper-p2p-causal-consensus** — `causal-consensus/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-distributed-lock** — `distributed-lock/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-leader-lease** — `leader-lease/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-quorum-pool** — `quorum-pool/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-raft-lite** — `raft-lite/v1` (scaffold)
|
||||||
|
|
||||||
Publish/subscribe, epidemic spread, and deduplication.
|
## Core infrastructure (`core-infrastructure`) — 5 modules
|
||||||
|
|
||||||
| Module | Role |
|
- 🟢 **hyper-p2p-capabilities** — `capabilities/v1` (production)
|
||||||
|--------|------|
|
- 🟢 **hyper-p2p-presence** — `hyper-p2p-presence/v1.1` (production)
|
||||||
| [hyper-p2p-gossip-mesh](messaging-gossip/hyper-p2p-gossip-mesh/) | TTL epidemic gossip |
|
- 🟢 **hyper-p2p-rpc** — `hyper-p2p-rpc/v2` (production)
|
||||||
| [hyper-p2p-dedup-filter](messaging-gossip/hyper-p2p-dedup-filter/) | Cross-peer message deduplication |
|
- 🟢 **hyper-p2p-session-bridge** — `session-bridge/v1` (production)
|
||||||
| [hyper-p2p-distributed-event-bus](messaging-gossip/hyper-p2p-distributed-event-bus/) | Distributed events with vector clocks |
|
- 🟢 **hyper-p2p-vector-clock** — `vector-clock/v1` (production)
|
||||||
|
|
||||||
---
|
## Encoding & wire formats (`encoding-wire`) — 4 modules
|
||||||
|
|
||||||
## Routing & paths
|
- 🟡 **hyper-p2p-compact-codec-bridge** — `compact-codec-bridge/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-message-envelope** — `message-envelope/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-schema-validator** — `schema-validator/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-wire-registry** — `wire-registry/v1` (scaffold)
|
||||||
|
|
||||||
How messages and sessions find peers and hops.
|
## Experimental (Wave 4) (`experimental`) — 10 modules
|
||||||
|
|
||||||
| Module | Role |
|
- 🟢 **hyper-p2p-contradiction-graph** — `contradiction-graph/v1` (production)
|
||||||
|--------|------|
|
- 🟢 **hyper-p2p-entropy-beacon** — `entropy-beacon/v1` (production)
|
||||||
| [hyper-p2p-intent-router](routing-paths/hyper-p2p-intent-router/) | Intent-based routing and discovery |
|
- 🟢 **hyper-p2p-gravity-well** — `gravity-well/v1` (production)
|
||||||
| [hyper-p2p-pattern-router](routing-paths/hyper-p2p-pattern-router/) | Glob/regex pattern routing |
|
- 🟢 **hyper-p2p-mirror-realm** — `mirror-realm/v1` (production)
|
||||||
| [hyper-p2p-relay-tunnel](routing-paths/hyper-p2p-relay-tunnel/) | Rendezvous blind relay |
|
- 🟢 **hyper-p2p-mycelium-pool** — `mycelium-pool/v1` (production)
|
||||||
| [hyper-p2p-merge-registry](routing-paths/hyper-p2p-merge-registry/) | CRDT service registry |
|
- 🟢 **hyper-p2p-paradox-clock** — `paradox-clock/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-pheromone-trail** — `pheromone-trail/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-silence-protocol** — `silence-protocol/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-time-capsule** — `time-capsule/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-whisper-mesh** — `whisper-mesh/v1` (production)
|
||||||
|
|
||||||
*Multi-hop circuits:* [circuit-loom](network-stack/hyper-p2p-circuit-loom/) ([Network stack](#network-stack-wave-6)).
|
## Experimental (Wave 5) (`experimental-wave5`) — 6 modules
|
||||||
|
|
||||||
---
|
- 🟡 **hyper-p2p-entropy-spiral** — `entropy-spiral/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-memetic-spread** — `memetic-spread/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-paradox-merge** — `paradox-merge/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-phase-shift-clock** — `phase-shift-clock/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-tension-field** — `tension-field/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-void-channel** — `void-channel/v1` (scaffold)
|
||||||
|
|
||||||
## Measurement & rate control
|
## Indexes & search (`indexes-search`) — 8 modules
|
||||||
|
|
||||||
Local and gossip-synced throttling (Wave 6 inter-peer credits live under [Network stack](#network-stack-wave-6)).
|
- 🟡 **hyper-p2p-bloom-gossip** — `bloom-gossip/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-fulltext-lite** — `fulltext-lite/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-graph-index** — `graph-index/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-inverted-index** — `inverted-index/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-semantic-vector-index** — `semantic-vector-index/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-similarity-lsh** — `similarity-lsh/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-trie-prefix** — `trie-prefix/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-spatial-index** — `spatial-index/v1` (production)
|
||||||
|
|
||||||
| Module | Role |
|
## Measurement & rate control (`measurement-rate-control`) — 4 modules
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-bucket-rate-limit](measurement-rate-control/hyper-p2p-bucket-rate-limit/) | Per-peer token-bucket limit |
|
|
||||||
|
|
||||||
---
|
- 🟢 **hyper-p2p-bucket-rate-limit** — `bucket-rate-limit/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-histogram-gossip** — `histogram-gossip/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-percentile-sketch** — `percentile-sketch/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-sla-budget** — `sla-budget/v1` (scaffold)
|
||||||
|
|
||||||
## Scheduling & queues
|
## Messaging & gossip (`messaging-gossip`) — 3 modules
|
||||||
|
|
||||||
Work distribution and topic ownership.
|
- 🟢 **hyper-p2p-dedup-filter** — `dedup-filter/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-distributed-event-bus** — `distributed-event-bus/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-gossip-mesh** — `gossip-mesh/v1` (production)
|
||||||
|
|
||||||
| Module | Role |
|
## Messaging pub/sub (`messaging-pubsub`) — 4 modules
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-activity-queue](scheduling-queues/hyper-p2p-activity-queue/) | Distributed queue: enqueue / claim / ack |
|
|
||||||
| [hyper-p2p-peer-scheduler](scheduling-queues/hyper-p2p-peer-scheduler/) | Lease-friendly job scheduler |
|
|
||||||
| [hyper-p2p-topic-lease](scheduling-queues/hyper-p2p-topic-lease/) | Single-writer topic shard lease |
|
|
||||||
|
|
||||||
---
|
- 🟡 **hyper-p2p-qos-topic** — `qos-topic/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-retained-messages** — `retained-messages/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-subscription-lease** — `subscription-lease/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-topic-channel** — `topic-channel/v1` (scaffold)
|
||||||
|
|
||||||
|
## Messaging streams (`messaging-streams`) — 6 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-stream-backpressure** — `stream-backpressure/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stream-chunker** — `stream-chunker/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stream-multiplex** — `stream-multiplex/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stream-resume-token** — `stream-resume-token/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stream-tee** — `stream-tee/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stream-transform** — `stream-transform/v1` (scaffold)
|
||||||
|
|
||||||
|
## Network discovery (`network-discovery`) — 5 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-capability-discovery** — `capability-discovery/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-discovery-health** — `discovery-health/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-peer-bootstrap-store** — `peer-bootstrap-store/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-seeder-registry** — `seeder-registry/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-topic-announcer** — `topic-announcer/v1` (scaffold)
|
||||||
|
|
||||||
|
## Network stack (`network-stack`) — 10 modules
|
||||||
|
|
||||||
|
- 🟢 **hyper-p2p-anycast-selector** — `anycast-selector/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-bandwidth-broker** — `bandwidth-broker/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-circuit-loom** — `circuit-loom/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-congestion-signal** — `congestion-signal/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-connection-pool** — `connection-pool/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-flow-shaper** — `flow-shaper/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-link-probe** — `link-probe/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-multipath-fanout** — `multipath-fanout/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-overlay-topology** — `overlay-topology/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-protocol-handshake** — `protocol-handshake/v1` (production)
|
||||||
|
|
||||||
|
## Network transport (`network-transport`) — 6 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-blind-relay-bridge** — `blind-relay-bridge/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-dht-bootstrap-hint** — `dht-bootstrap-hint/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-noise-session-wrap** — `noise-session-wrap/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-secret-stream-pair** — `secret-stream-pair/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-udx-metrics** — `udx-metrics/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-wakeup-channel** — `wakeup-channel/v1` (scaffold)
|
||||||
|
|
||||||
|
## Observability (`observability`) — 5 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-health-probe** — `health-probe/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-log-gossip** — `log-gossip/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-metrics-aggregator** — `metrics-aggregator/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-stats-exporter** — `stats-exporter/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-trace-span** — `trace-span/v1` (scaffold)
|
||||||
|
|
||||||
|
## Oracles (`oracles`) — 1 modules
|
||||||
|
|
||||||
|
- 🟢 **hyper-p2p-decentralized-oracle** — `decentralized-oracle/v1` (production)
|
||||||
|
|
||||||
|
## Pear / Bare platform (`pear-platform`) — 4 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-bare-bundle-bridge** — `bare-bundle-bridge/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-bare-distributable-hint** — `bare-distributable-hint/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-pear-runtime-session** — `pear-runtime-session/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-pear-update-gossip** — `pear-update-gossip/v1` (scaffold)
|
||||||
|
|
||||||
|
## Routing & paths (`routing-paths`) — 4 modules
|
||||||
|
|
||||||
|
- 🟢 **hyper-p2p-intent-router** — `intent-router/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-merge-registry** — `merge-registry/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-pattern-router** — `pattern-router/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-relay-tunnel** — `relay-tunnel/v1` (production)
|
||||||
|
|
||||||
|
## Routing (advanced) (`routing-advanced`) — 5 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-circuit-breaker** — `circuit-breaker/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-geo-hint-router** — `geo-hint-router/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-load-spread** — `load-spread/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-retry-policy** — `retry-policy/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-sticky-session** — `sticky-session/v1` (scaffold)
|
||||||
|
|
||||||
|
## Scheduling & queues (`scheduling-queues`) — 5 modules
|
||||||
|
|
||||||
|
- 🟢 **hyper-p2p-activity-queue** — `activity-queue/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-cron-gossip** — `cron-gossip/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-deadline-queue** — `deadline-queue/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-peer-scheduler** — `peer-scheduler/v1` (production)
|
||||||
|
- 🟢 **hyper-p2p-topic-lease** — `topic-lease/v1` (production)
|
||||||
|
|
||||||
|
## State & CRDTs (`state-crdts`) — 10 modules
|
||||||
|
|
||||||
|
- 🟢 **hyper-p2p-conflict-set** — `conflict-set/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-crdt-grow-only-set** — `crdt-grow-only-set/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-crdt-lww-register** — `crdt-lww-register/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-crdt-map** — `crdt-map/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-crdt-or-map** — `crdt-or-map/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-crdt-pn-counter** — `crdt-pn-counter/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-crdt-rga-text** — `crdt-rga-text/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-crdt-two-phase-set** — `crdt-two-phase-set/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-crdt-version-vector** — `crdt-version-vector/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-reactive-state** — `reactive-state/v1` (production)
|
||||||
|
|
||||||
|
## Storage (Autobase) (`storage-autobase`) — 5 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-autobase-fork-choice** — `autobase-fork-choice/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-autobase-indexer-bus** — `autobase-indexer-bus/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-autobase-light-writer** — `autobase-light-writer/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-autobase-view-sync** — `autobase-view-sync/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-autobase-writer-lease** — `autobase-writer-lease/v1` (scaffold)
|
||||||
|
|
||||||
|
## Storage (Hyperbee) (`storage-hyperbee`) — 5 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-bee-batch-write** — `bee-batch-write/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-bee-diff-follow** — `bee-diff-follow/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-bee-range-watch** — `bee-range-watch/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-bee-secondary-index** — `bee-secondary-index/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-bee-tombstone-gc** — `bee-tombstone-gc/v1` (scaffold)
|
||||||
|
|
||||||
|
## Storage (Hypercore) (`storage-hypercore`) — 7 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-core-audit-chain** — `core-audit-chain/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-bitfield-scheduler** — `core-bitfield-scheduler/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-fork-picker** — `core-fork-picker/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-merkle-sync** — `core-merkle-sync/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-priority-fetch** — `core-priority-fetch/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-replicator** — `core-replicator/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-core-seed-policy** — `core-seed-policy/v1` (scaffold)
|
||||||
|
|
||||||
|
## Storage (Hyperdrive) (`storage-hyperdrive`) — 6 modules
|
||||||
|
|
||||||
|
- 🟡 **hyper-p2p-drive-entry-catalog** — `drive-entry-catalog/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-drive-gc-sweep** — `drive-gc-sweep/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-drive-mirror-sync** — `drive-mirror-sync/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-drive-mount-bridge** — `drive-mount-bridge/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-drive-version-snapshot** — `drive-version-snapshot/v1` (scaffold)
|
||||||
|
- 🟡 **hyper-p2p-drive-watch-notify** — `drive-watch-notify/v1` (scaffold)
|
||||||
|
|
||||||
## State & CRDTs
|
## Time & ordering (`time-ordering`) — 1 modules
|
||||||
|
|
||||||
Replicated structured state.
|
- 🟢 **hyper-p2p-temporal-index** — `temporal-index/v1` (production)
|
||||||
|
|
||||||
|
## Trust & security (`trust-security`) — 8 modules
|
||||||
|
|
||||||
| Module | Role |
|
- 🟢 **hyper-p2p-attestation-chain** — `attestation-chain/v1` (production)
|
||||||
|--------|------|
|
- 🟡 **hyper-p2p-blind-pair-handoff** — `blind-pair-handoff/v1` (scaffold)
|
||||||
| [hyper-p2p-reactive-state](state-crdts/hyper-p2p-reactive-state/) | Reactive LWW CRDT container |
|
- 🟡 **hyper-p2p-encrypted-topic** — `encrypted-topic/v1` (scaffold)
|
||||||
| [hyper-p2p-crdt-map](state-crdts/hyper-p2p-crdt-map/) | LWW-Map CRDT |
|
- 🟡 **hyper-p2p-key-rotation** — `key-rotation/v1` (scaffold)
|
||||||
| [hyper-p2p-conflict-set](state-crdts/hyper-p2p-conflict-set/) | OR-Set CRDT |
|
- 🟡 **hyper-p2p-multisig-threshold** — `multisig-threshold/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-reputation-system** — `reputation-system/v1` (production)
|
||||||
|
- 🟡 **hyper-p2p-session-rotation** — `session-rotation/v1` (scaffold)
|
||||||
|
- 🟢 **hyper-p2p-trust-graph** — `trust-graph/v1` (production)
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Time & ordering
|
|
||||||
|
|
||||||
Timestamps, ranges, and delayed release.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-temporal-index](time-ordering/hyper-p2p-temporal-index/) | Time-series range index |
|
|
||||||
|
|
||||||
*See also:* [vector-clock](core-infrastructure/hyper-p2p-vector-clock/) ([Core](#core-infrastructure)), [paradox-clock](experimental/hyper-p2p-paradox-clock/) and [time-capsule](experimental/hyper-p2p-time-capsule/) ([Experimental](#experimental-wave-4)).
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Consensus & coordination
|
|
||||||
|
|
||||||
Agreement and mutual exclusion.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-distributed-lock](consensus-coordination/hyper-p2p-distributed-lock/) | Distributed locks with fencing |
|
|
||||||
| [hyper-p2p-causal-consensus](consensus-coordination/hyper-p2p-causal-consensus/) | Causal BFT-style ordering |
|
|
||||||
| [hyper-p2p-quorum-pool](consensus-coordination/hyper-p2p-quorum-pool/) | Propose / vote / resolve |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Trust & security
|
|
||||||
|
|
||||||
Identity, authorization, and peer quality.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-attestation-chain](trust-security/hyper-p2p-attestation-chain/) | Linked signed attestations |
|
|
||||||
| [hyper-p2p-trust-graph](trust-security/hyper-p2p-trust-graph/) | Transitive trust with decay |
|
|
||||||
| [hyper-p2p-reputation-system](trust-security/hyper-p2p-reputation-system/) | Peer reputation scores |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Agents & workflows
|
|
||||||
|
|
||||||
Autonomous agents and DAG execution.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-agent-memory](agents-workflows/hyper-p2p-agent-memory/) | Episodic / semantic memory graph |
|
|
||||||
| [hyper-p2p-task-orchestrator](agents-workflows/hyper-p2p-task-orchestrator/) | Task DAG orchestration |
|
|
||||||
| [hyper-p2p-workflow-graph](agents-workflows/hyper-p2p-workflow-graph/) | Lightweight workflow DAG |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Indexes & search
|
|
||||||
|
|
||||||
Specialized query primitives.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-spatial-index](indexes-search/hyper-spatial-index/) | Geospatial grid / quadtree |
|
|
||||||
| [hyper-p2p-semantic-vector-index](indexes-search/hyper-p2p-semantic-vector-index/) | Vector similarity search |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Oracles
|
|
||||||
|
|
||||||
External truth and signed claims.
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-decentralized-oracle](oracles/hyper-p2p-decentralized-oracle/) | Decentralized oracle attestations |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Experimental (Wave 4)
|
|
||||||
|
|
||||||
Emergent / metaphor primitives — production-tested but optional in serious stacks. Demo: [`../examples/p2p-chaos-mesh-demo/`](../examples/p2p-chaos-mesh-demo/).
|
|
||||||
|
|
||||||
| Module | Role |
|
|
||||||
|--------|------|
|
|
||||||
| [hyper-p2p-pheromone-trail](experimental/hyper-p2p-pheromone-trail/) | Evaporating route scent |
|
|
||||||
| [hyper-p2p-whisper-mesh](experimental/hyper-p2p-whisper-mesh/) | TTL=1 sealed whispers |
|
|
||||||
| [hyper-p2p-silence-protocol](experimental/hyper-p2p-silence-protocol/) | Negative absence gossip |
|
|
||||||
| [hyper-p2p-entropy-beacon](experimental/hyper-p2p-entropy-beacon/) | Collaborative entropy pool |
|
|
||||||
| [hyper-p2p-paradox-clock](experimental/hyper-p2p-paradox-clock/) | Skew-forgiving logical time |
|
|
||||||
| [hyper-p2p-gravity-well](experimental/hyper-p2p-gravity-well/) | Trust-weighted message sinks |
|
|
||||||
| [hyper-p2p-mirror-realm](experimental/hyper-p2p-mirror-realm/) | Split-brain realm reconcile |
|
|
||||||
| [hyper-p2p-time-capsule](experimental/hyper-p2p-time-capsule/) | Quorum/time-locked payloads |
|
|
||||||
| [hyper-p2p-contradiction-graph](experimental/hyper-p2p-contradiction-graph/) | Opposing claims lattice |
|
|
||||||
| [hyper-p2p-mycelium-pool](experimental/hyper-p2p-mycelium-pool/) | Symbiotic bandwidth pool |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Quick pick by use case
|
|
||||||
|
|
||||||
| Build… | Start with |
|
|
||||||
|--------|------------|
|
|
||||||
| Real-time app shell | presence → protocol-handshake → connection-pool → event-bus |
|
|
||||||
| High-throughput mesh | gossip-mesh → dedup-filter → multipath-fanout → flow-shaper |
|
|
||||||
| Private multi-hop delivery | overlay-topology → relay-tunnel → circuit-loom |
|
|
||||||
| Agent platform | agent-memory → intent-router → task-orchestrator → capabilities |
|
|
||||||
| Geo / ML app | spatial-index or semantic-vector-index + reactive-state |
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,61 +1,56 @@
|
|||||||
# Holepunch / Bare / Pear Modules Workspace
|
# Holepunch / Bare / Pear Modules Workspace
|
||||||
|
|
||||||
**52** production P2P modules organized by **category** under this directory.
|
**152** modules (**52 production**, **100 scaffold**) in **30** category directories.
|
||||||
|
|
||||||
## Directory layout
|
## Directory layout
|
||||||
|
|
||||||
```
|
```
|
||||||
modules/
|
modules/
|
||||||
├── _shared/ # p2p-bare.js (internal)
|
├── MODULE_REGISTRY.yaml # source of truth
|
||||||
├── module-paths.json # name → category/path map
|
├── module-paths.json # name → category/path
|
||||||
├── MODULE_CATEGORIES.md # full index by role
|
├── MODULE_CATEGORIES.md # v2 index with tier badges
|
||||||
├── network-stack/ # 10 modules (Wave 6)
|
├── _shared/ # p2p-bare.js, MODULE_SYSTEM.md, HOLEPUNCH_ALIGNMENT.md
|
||||||
├── core-infrastructure/ # 5 modules
|
├── network-stack/ # 10 production
|
||||||
├── messaging-gossip/ # 3 modules
|
├── core-infrastructure/ # 5 production
|
||||||
├── routing-paths/ # 4 modules
|
├── storage-hypercore/ # 7 scaffold (Wave 8)
|
||||||
├── measurement-rate-control/
|
├── storage-hyperbee/ # 6 scaffold
|
||||||
├── scheduling-queues/
|
├── network-transport/ # 6 scaffold
|
||||||
├── state-crdts/
|
├── messaging-streams/ # 6 scaffold
|
||||||
├── time-ordering/
|
├── … # see MODULE_CATEGORIES.md
|
||||||
├── consensus-coordination/
|
└── experimental-wave5/ # 6 scaffold
|
||||||
├── trust-security/
|
|
||||||
├── agents-workflows/
|
|
||||||
├── indexes-search/
|
|
||||||
├── oracles/
|
|
||||||
└── experimental/ # 10 Wave 4 modules
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Each module: `modules/<category>/<name>/` with `index.js`, `test/`, `examples/`, `docs/`, `README.md`.
|
Each module: `modules/<category>/<name>/` with `index.js`, `test/`, `examples/`, `docs/`, `README.md`. Scaffolds add `SCAFFOLD.json` and version `0.0.0-scaffold`.
|
||||||
|
|
||||||
**Require from apps:**
|
## Tiers
|
||||||
|
|
||||||
```js
|
| Tier | Tests |
|
||||||
const { HyperP2PPresence } = require('./modules/core-infrastructure/hyper-p2p-presence')
|
|------|-------|
|
||||||
```
|
| production | `./real_tests/run-all.sh` (default) |
|
||||||
|
| scaffold | `./real_tests/run-all.sh --tier=scaffold` |
|
||||||
|
|
||||||
Or use [`module-paths.json`](module-paths.json).
|
See [`_shared/MODULE_SYSTEM.md`](_shared/MODULE_SYSTEM.md).
|
||||||
|
|
||||||
## Testing (2026-05)
|
## Testing
|
||||||
|
|
||||||
- **Unit tests:** `cd modules/<category>/<module> && npm test`
|
- **Production:** [`../real_tests/run-all.sh`](../real_tests/run-all.sh) — 52 modules
|
||||||
- **All modules:** [`../real_tests/run-all.sh`](../real_tests/run-all.sh) — **52/52 PASS** (module name only; runner resolves category path)
|
- **Scaffold:** [`../real_tests/run-all.sh --tier=scaffold`](../real_tests/run-all.sh)
|
||||||
|
- **All:** `--tier=all` (152, nightly)
|
||||||
- **Categories:** [`MODULE_CATEGORIES.md`](MODULE_CATEGORIES.md)
|
- **Categories:** [`MODULE_CATEGORIES.md`](MODULE_CATEGORIES.md)
|
||||||
- **Integration:** [`../real_tests/run-integration.sh`](../real_tests/run-integration.sh)
|
|
||||||
- **Development:** [`../DEVELOPMENT.md`](../DEVELOPMENT.md)
|
|
||||||
|
|
||||||
## Documentation
|
## Tooling
|
||||||
|
|
||||||
- [`_shared/DOC_STANDARDS.md`](_shared/DOC_STANDARDS.md) — exhaustive doc requirements
|
```bash
|
||||||
- [`_shared/PRODUCTION.md`](_shared/PRODUCTION.md) — production checklist
|
python3 ../scripts/scaffold-module-from-registry.py
|
||||||
- Regenerate: `python3 ../scripts/docs-deepen.py --all`
|
../scripts/check-scaffold.sh
|
||||||
- Quality gate: `../scripts/check-docs-quality.sh`
|
python3 ../scripts/docs-deepen.py --all # production modules
|
||||||
|
```
|
||||||
|
|
||||||
## Composition demos
|
## Composition demos
|
||||||
|
|
||||||
| Demo | Path |
|
| Demo | Path |
|
||||||
|------|------|
|
|------|------|
|
||||||
| Network stack | [`../examples/p2p-network-stack-demo/`](../examples/p2p-network-stack-demo/) |
|
| Network stack | [`../examples/p2p-network-stack-demo/`](../examples/p2p-network-stack-demo/) |
|
||||||
| Core stack | [`../examples/p2p-stack-demo/`](../examples/p2p-stack-demo/) |
|
| Wave 8 stubs | [`../examples/wave8-storage-core/`](../examples/wave8-storage-core/) etc. |
|
||||||
| Production mix | [`../examples/p2p-production-stack-demo/`](../examples/p2p-production-stack-demo/) |
|
|
||||||
|
|
||||||
See [`../examples/README.md`](../examples/README.md).
|
See [`../examples/README.md`](../examples/README.md).
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
# Composition layers
|
||||||
|
|
||||||
|
Modules in this repo **compose** on the Holepunch stack; they do not replace core packages.
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TB
|
||||||
|
subgraph apps [Applications]
|
||||||
|
COLLAB[applications-collab]
|
||||||
|
ECON[applications-economy]
|
||||||
|
AGENTS[agents-workflows]
|
||||||
|
end
|
||||||
|
subgraph p2p [new_modules categories]
|
||||||
|
NET[network-stack / transport / discovery]
|
||||||
|
MSG[messaging-gossip / streams / pubsub]
|
||||||
|
ROUTE[routing-paths / routing-advanced]
|
||||||
|
STATE[state-crdts]
|
||||||
|
STORE[storage-hypercore / hyperbee / hyperdrive / autobase]
|
||||||
|
IDX[indexes-search]
|
||||||
|
TRUST[trust-security]
|
||||||
|
OBS[observability]
|
||||||
|
end
|
||||||
|
subgraph shared [Shared]
|
||||||
|
BARE[p2p-bare.js]
|
||||||
|
end
|
||||||
|
subgraph holepunch [Holepunch — do not reimplement]
|
||||||
|
SW[hyperswarm / hyperdht]
|
||||||
|
CORE[hypercore / corestore]
|
||||||
|
BEE[hyperbee]
|
||||||
|
DRV[hyperdrive]
|
||||||
|
AB[autobase]
|
||||||
|
MUX[protomux]
|
||||||
|
end
|
||||||
|
subgraph runtime [Runtime]
|
||||||
|
PEAR[pear / bare]
|
||||||
|
end
|
||||||
|
apps --> p2p
|
||||||
|
p2p --> shared
|
||||||
|
shared --> holepunch
|
||||||
|
holepunch --> runtime
|
||||||
|
```
|
||||||
|
|
||||||
|
## Layer rules
|
||||||
|
|
||||||
|
1. **Bare / Pear** — process, timers, bundle loading (`pear-platform` scaffolds wrap; do not fork `pear-runtime`).
|
||||||
|
2. **Hyperswarm** — discovery, NAT, single-hop streams. `network-transport` / `network-discovery` add hints and policy only.
|
||||||
|
3. **p2p-bare.js** — topic join, Protomux channel setup, gossip helpers.
|
||||||
|
4. **Category modules** — one protocol or concern per package; register capabilities via `hyper-p2p-capabilities`.
|
||||||
|
5. **Apps** — compose multiple modules (presence + reactive-state + collab-room, etc.).
|
||||||
|
|
||||||
|
## Example stack (collab app)
|
||||||
|
|
||||||
|
```
|
||||||
|
hyper-pear-runtime-session
|
||||||
|
→ hyper-p2p-presence + hyper-p2p-capabilities
|
||||||
|
→ hyper-p2p-gossip-mesh + hyper-p2p-reactive-state
|
||||||
|
→ hyper-p2p-collab-room (scaffold) + hyper-p2p-cursor-presence (scaffold)
|
||||||
|
```
|
||||||
|
|
||||||
|
Storage-heavy apps add `storage-*` modules **on top of** existing Hypercore/Bee/Drive instances passed in via `opts`, not embedded cores.
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# Holepunch alignment
|
||||||
|
|
||||||
|
Reference: [holepunchto_repos](https://github.com/holepunchto) (~616 repos). This table maps **clusters** to our module layer and states **build vs wrap vs do-not-build**.
|
||||||
|
|
||||||
|
| Cluster | Example repos | Our categories | Boundary |
|
||||||
|
|---------|---------------|----------------|----------|
|
||||||
|
| Underlay | `hyperswarm`, `hyperdht`, `dht-rpc`, `udx-native` | `network-stack`, `network-transport`, `network-discovery` | **Wrap/hints only** — discovery, metrics, bootstrap gossip |
|
||||||
|
| Secret path | `hyperswarm-secret-stream`, `noise-handshake` | `network-transport` | **Wrap** — session helpers, not new crypto |
|
||||||
|
| Blind / relay | `blind-relay`, `blind-peer`, `blind-pairing` | `network-transport`, `routing-advanced`, `trust-security` | **Wrap** bridges; no new relay core |
|
||||||
|
| Append-only log | `hypercore`, `corestore`, `hypercore-*` | `storage-hypercore` | **Do not build** core; policy/replication gossip only |
|
||||||
|
| Ordered KV | `hyperbee`, `hyperbee2`, `hyperbee-diff-stream` | `storage-hyperbee` | **Do not build** bee; indexes, watches, batch helpers |
|
||||||
|
| Files | `hyperdrive`, `localdrive`, `mirror-drive` | `storage-hyperdrive` | **Do not build** drive; catalog, mirror, watch modules |
|
||||||
|
| Multi-writer | `autobase`, `autobase-discovery`, `autobee` | `storage-autobase`, `consensus-coordination` | **Do not build** autobase; view sync, leases, indexer bus |
|
||||||
|
| Mux / RPC | `protomux`, `protomux-rpc`, `protomux-wakeup` | `core-infrastructure`, `encoding-wire`, `messaging-streams` | **Wrap** — protocols on existing mux |
|
||||||
|
| Encoding | `compact-encoding`, `b4a`, `hyperschema` | `encoding-wire` | **Wrap** — registry, validation, envelopes |
|
||||||
|
| Trust / keys | `hypercore-crypto`, `hyper-multisig`, `autopass` | `trust-security` | **Wrap** — rotation, multisig, encrypted topics |
|
||||||
|
| Observability | `hypertrace`, `hyper-instrument`, `*-stats` | `observability` | **Wrap** — spans, metrics gossip, health probes |
|
||||||
|
| Platform | `pear`, `pear-runtime`, `bare`, `bare-bundle` | `pear-platform` | **Wrap** — session bridge, bundle hints |
|
||||||
|
| App patterns | `hyperdb`, `hyperdispatch`, `hyperconf` | `applications-collab`, `indexes-search` | **Build** app-level semantics on p2p modules |
|
||||||
|
| CRDT / state | (ecosystem) | `state-crdts` | **Build** CRDT protocols; sync via gossip mesh |
|
||||||
|
| Gossip / messaging | (ecosystem) | `messaging-gossip`, `messaging-pubsub` | **Build** topic channels, leases, retained msgs |
|
||||||
|
|
||||||
|
## Top repos — quick reference
|
||||||
|
|
||||||
|
| Repo | Action in new_modules |
|
||||||
|
|------|------------------------|
|
||||||
|
| `hyperswarm` | Use via `p2p-bare.js`; optional `network-discovery` hints |
|
||||||
|
| `hypercore` | Pass-in only; `storage-hypercore` adds policy |
|
||||||
|
| `hyperbee` | Pass-in only; `storage-hyperbee` adds indexes/watch |
|
||||||
|
| `hyperdrive` | Pass-in only; `storage-hyperdrive` adds mirror/catalog |
|
||||||
|
| `autobase` | Pass-in only; `storage-autobase` adds view/lease helpers |
|
||||||
|
| `protomux` | Required peer dep; extend in module protocols |
|
||||||
|
| `compact-encoding` | Use directly; `encoding-wire` adds registry |
|
||||||
|
| `pear` / `bare` | `pear-platform` bridges only |
|
||||||
|
| `blind-relay` | Bridge module, not replacement |
|
||||||
|
| `activity-queue` (npm) | **Not** our `hyper-p2p-activity-queue` — different package |
|
||||||
|
|
||||||
|
## Registry fields
|
||||||
|
|
||||||
|
Each scaffold/production entry may list `holepunch_refs: [repo, ...]` for inspiration and `composes_with: [module, ...]` for intended composition. CI `check-scaffold.sh` ensures scaffolds declare protocol ≠ `unknown/v1`.
|
||||||
|
|
||||||
|
## When adding a module
|
||||||
|
|
||||||
|
1. Add entry to `MODULE_REGISTRY.yaml` (`tier`, `category`, `holepunch_refs`).
|
||||||
|
2. If scaffold: run `python3 scripts/scaffold-module-from-registry.py --only <name>`.
|
||||||
|
3. Deepen in a Wave 8 pass; promote `tier` to `production` only after tests + version bump.
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# Module system (152 modules)
|
||||||
|
|
||||||
|
This workspace organizes **152** Bare/Hyperswarm modules in **30** category directories. The registry [`../MODULE_REGISTRY.yaml`](../MODULE_REGISTRY.yaml) is the only place to add module #153+.
|
||||||
|
|
||||||
|
## Tiers
|
||||||
|
|
||||||
|
| Tier | Version | Tests | Status |
|
||||||
|
|------|---------|-------|--------|
|
||||||
|
| **production** | `0.3.x+` | ≥3 brittle unit tests; integration optional | `implemented` |
|
||||||
|
| **scaffold** | `0.0.0-scaffold` | 2 load/smoke tests (`exports`, `getStats`) | `scaffold` |
|
||||||
|
| **deprecated** | — | reserved for renames / upstream collisions | — |
|
||||||
|
|
||||||
|
Default CI runs **production only** (52 modules). Scaffold smokes run with `--tier=scaffold`. Full matrix: `--tier=all` (nightly).
|
||||||
|
|
||||||
|
## Naming
|
||||||
|
|
||||||
|
- `hyper-p2p-<slug>` — wire/gossip/routing modules (Protomux protocols)
|
||||||
|
- `hyper-<slug>` — storage/index/platform adapters (e.g. `hyper-spatial-index`, `hyper-bare-bundle-bridge`)
|
||||||
|
|
||||||
|
## Paths
|
||||||
|
|
||||||
|
```
|
||||||
|
modules/<category-slug>/<module-name>/
|
||||||
|
```
|
||||||
|
|
||||||
|
Resolve paths via [`module-paths.json`](../module-paths.json).
|
||||||
|
|
||||||
|
## Waves and passes
|
||||||
|
|
||||||
|
| Wave | Scope |
|
||||||
|
|------|--------|
|
||||||
|
| 4–7 | 52 production modules (network, CRDTs, agents, experimental, …) |
|
||||||
|
| 8 | 100 scaffolds — registry + file tree + docs stubs |
|
||||||
|
| 8a–8g | Deepen scaffolds → production **by category** (see below) |
|
||||||
|
| 9 | Integration smokes per new category (2-node) |
|
||||||
|
|
||||||
|
### Wave 8 deepen schedule (after scaffold)
|
||||||
|
|
||||||
|
| Pass | Categories | Target |
|
||||||
|
|------|------------|--------|
|
||||||
|
| 8a | `storage-hypercore`, `storage-hyperbee` | production |
|
||||||
|
| 8b | `network-transport`, `network-discovery` | production |
|
||||||
|
| 8c | `messaging-streams`, `messaging-pubsub` | production |
|
||||||
|
| 8d | `encoding-wire`, `observability` | production |
|
||||||
|
| 8e | extensions + `routing-advanced` | production |
|
||||||
|
| 8f | `pear-platform`, `applications-*` | production |
|
||||||
|
| 8g | `experimental-wave5` | production or stay experimental |
|
||||||
|
|
||||||
|
Workflow per pass: **implement → docs → test last** (same as Wave 7).
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Do **not** re-implement `hyperswarm`, `hypercore`, `hyperbee`, `hyperdrive`, or `autobase` cores. Modules add Protomux protocols, CRDTs, policy, and app semantics on top. See [`HOLEPUNCH_ALIGNMENT.md`](HOLEPUNCH_ALIGNMENT.md).
|
||||||
|
|
||||||
|
## Tooling
|
||||||
|
|
||||||
|
| Script | Purpose |
|
||||||
|
|--------|---------|
|
||||||
|
| `scripts/generate-module-registry.py` | Rebuild registry from layout + scaffold list |
|
||||||
|
| `scripts/scaffold-module-from-registry.py` | Create/update scaffold trees |
|
||||||
|
| `scripts/check-scaffold.sh` | Scaffold tier gates |
|
||||||
|
| `real_tests/run-all.sh --tier=production\|scaffold\|all` | Test matrix |
|
||||||
|
|
||||||
|
## Shared runtime
|
||||||
|
|
||||||
|
All modules use `require('../../_shared/p2p-bare.js')` from category directories (two levels up to `_shared`).
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
# Agents & workflows
|
# Agents & workflows
|
||||||
|
|
||||||
3 modules. See [`../MODULE_CATEGORIES.md`](../../MODULE_CATEGORIES.md).
|
**Path:** `modules/agents-workflows/` · **Modules:** 3 (3 production, 0 scaffold)
|
||||||
|
|
||||||
| Module |
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#agents-workflows).
|
||||||
|--------|
|
|
||||||
| [hyper-p2p-agent-memory](hyper-p2p-agent-memory/) |
|
- [hyper-p2p-agent-memory](./hyper-p2p-agent-memory/) — production
|
||||||
| [hyper-p2p-task-orchestrator](hyper-p2p-task-orchestrator/) |
|
- [hyper-p2p-task-orchestrator](./hyper-p2p-task-orchestrator/) — production
|
||||||
| [hyper-p2p-workflow-graph](hyper-p2p-workflow-graph/) |
|
- [hyper-p2p-workflow-graph](./hyper-p2p-workflow-graph/) — production
|
||||||
|
|||||||
+27
-2
@@ -16,7 +16,7 @@
|
|||||||
"bare-path": "^3.0.0",
|
"bare-path": "^3.0.0",
|
||||||
"bare-process": "^4.4.0",
|
"bare-process": "^4.4.0",
|
||||||
"bare-timers": "^2.0.0",
|
"bare-timers": "^2.0.0",
|
||||||
"hyper-p2p-vector-clock": "file:../hyper-p2p-vector-clock",
|
"hyper-p2p-vector-clock": "file:../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"hypercore-crypto": "^3.0.0"
|
"hypercore-crypto": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,8 +32,33 @@
|
|||||||
"protomux": "^3.0.0"
|
"protomux": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"../../core-infrastructure/hyper-p2p-vector-clock": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"bare-crypto": "^1.9.0",
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"compact-encoding": "^2.0.0",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"brittle": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"bare": ">=1.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bare": ">=1.0.0",
|
||||||
|
"hyperbee": "^2.0.0",
|
||||||
|
"hyperswarm": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"../hyper-p2p-vector-clock": {
|
"../hyper-p2p-vector-clock": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"extraneous": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"b4a": "^1.6.7",
|
"b4a": "^1.6.7",
|
||||||
@@ -1292,7 +1317,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hyper-p2p-vector-clock": {
|
"node_modules/hyper-p2p-vector-clock": {
|
||||||
"resolved": "../hyper-p2p-vector-clock",
|
"resolved": "../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/hyperbee": {
|
"node_modules/hyperbee": {
|
||||||
|
|||||||
+47
-5
@@ -16,7 +16,7 @@
|
|||||||
"bare-path": "^3.0.0",
|
"bare-path": "^3.0.0",
|
||||||
"bare-process": "^4.4.0",
|
"bare-process": "^4.4.0",
|
||||||
"bare-timers": "^2.0.0",
|
"bare-timers": "^2.0.0",
|
||||||
"hyper-p2p-vector-clock": "file:../hyper-p2p-vector-clock",
|
"hyper-p2p-vector-clock": "file:../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"hypercore-crypto": "^3.0.0",
|
"hypercore-crypto": "^3.0.0",
|
||||||
"protomux": "^3.0.0"
|
"protomux": "^3.0.0"
|
||||||
},
|
},
|
||||||
@@ -28,12 +28,12 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"bare": ">=1.0.0",
|
"bare": ">=1.0.0",
|
||||||
"hyper-p2p-capabilities": "file:../hyper-p2p-capabilities",
|
"hyper-p2p-capabilities": "file:../../core-infrastructure/hyper-p2p-capabilities",
|
||||||
"hyperbee": "^2.0.0",
|
"hyperbee": "^2.0.0",
|
||||||
"hyperswarm": "^4.0.0"
|
"hyperswarm": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../hyper-p2p-capabilities": {
|
"../../core-infrastructure/hyper-p2p-capabilities": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"peer": true,
|
"peer": true,
|
||||||
@@ -50,8 +50,50 @@
|
|||||||
"brittle": "^3.0.0"
|
"brittle": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"../../core-infrastructure/hyper-p2p-vector-clock": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"bare-crypto": "^1.9.0",
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"compact-encoding": "^2.0.0",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"brittle": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"bare": ">=1.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bare": ">=1.0.0",
|
||||||
|
"hyperbee": "^2.0.0",
|
||||||
|
"hyperswarm": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"../hyper-p2p-capabilities": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"extraneous": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"bare-crypto": "^1.9.0",
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"hyperbee": "^2.0.0",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"hyperswarm": "^4.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"brittle": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"../hyper-p2p-vector-clock": {
|
"../hyper-p2p-vector-clock": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"extraneous": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"b4a": "^1.6.7",
|
"b4a": "^1.6.7",
|
||||||
@@ -1310,11 +1352,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hyper-p2p-capabilities": {
|
"node_modules/hyper-p2p-capabilities": {
|
||||||
"resolved": "../hyper-p2p-capabilities",
|
"resolved": "../../core-infrastructure/hyper-p2p-capabilities",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/hyper-p2p-vector-clock": {
|
"node_modules/hyper-p2p-vector-clock": {
|
||||||
"resolved": "../hyper-p2p-vector-clock",
|
"resolved": "../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/hyperbee": {
|
"node_modules/hyperbee": {
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Applications (collaboration)
|
||||||
|
|
||||||
|
**Path:** `modules/applications-collab/` · **Modules:** 4 (0 production, 4 scaffold)
|
||||||
|
|
||||||
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#applications-collab).
|
||||||
|
|
||||||
|
- [hyper-p2p-collab-room](./hyper-p2p-collab-room/) — scaffold
|
||||||
|
- [hyper-p2p-cursor-presence](./hyper-p2p-cursor-presence/) — scaffold
|
||||||
|
- [hyper-p2p-document-line-lock](./hyper-p2p-document-line-lock/) — scaffold
|
||||||
|
- [hyper-p2p-whiteboard-op](./hyper-p2p-whiteboard-op/) — scaffold
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-collab-room
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `collab-room/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Collaboration room primitive.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-collab/hyper-p2p-collab-room/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-collab-room",
|
||||||
|
"category": "applications-collab",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "collab-room/v1",
|
||||||
|
"class": "HyperP2PCollabRoom",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-collab-room API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `collab-room/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PCollabRoom`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-collab-room architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-collab`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Collaboration room primitive.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PCollabRoom } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PCollabRoom()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'collab-room/v1'
|
||||||
|
|
||||||
|
class HyperP2PCollabRoom extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PCollabRoom, PROTOCOL }
|
||||||
+1790
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-collab-room",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Collaboration room primitive.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PCollabRoom, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PCollabRoom)
|
||||||
|
t.is(PROTOCOL, 'collab-room/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PCollabRoom()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'collab-room/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-cursor-presence
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `cursor-presence/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Collaborative cursor presence.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-collab/hyper-p2p-cursor-presence/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-cursor-presence",
|
||||||
|
"category": "applications-collab",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "cursor-presence/v1",
|
||||||
|
"class": "HyperP2PCursorPresence",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-cursor-presence API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `cursor-presence/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PCursorPresence`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-cursor-presence architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-collab`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Collaborative cursor presence.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PCursorPresence } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PCursorPresence()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'cursor-presence/v1'
|
||||||
|
|
||||||
|
class HyperP2PCursorPresence extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PCursorPresence, PROTOCOL }
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-cursor-presence",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Collaborative cursor presence.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PCursorPresence, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PCursorPresence)
|
||||||
|
t.is(PROTOCOL, 'cursor-presence/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PCursorPresence()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'cursor-presence/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-document-line-lock
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `document-line-lock/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Per-line document locks.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-collab/hyper-p2p-document-line-lock/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-document-line-lock",
|
||||||
|
"category": "applications-collab",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "document-line-lock/v1",
|
||||||
|
"class": "HyperP2PDocumentLineLock",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-document-line-lock API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `document-line-lock/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PDocumentLineLock`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-document-line-lock architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-collab`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Per-line document locks.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PDocumentLineLock } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PDocumentLineLock()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'document-line-lock/v1'
|
||||||
|
|
||||||
|
class HyperP2PDocumentLineLock extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PDocumentLineLock, PROTOCOL }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-document-line-lock",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Per-line document locks.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PDocumentLineLock, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PDocumentLineLock)
|
||||||
|
t.is(PROTOCOL, 'document-line-lock/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PDocumentLineLock()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'document-line-lock/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-whiteboard-op
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `whiteboard-op/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Whiteboard operation CRDT.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-collab/hyper-p2p-whiteboard-op/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-whiteboard-op",
|
||||||
|
"category": "applications-collab",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "whiteboard-op/v1",
|
||||||
|
"class": "HyperP2PWhiteboardOp",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-whiteboard-op API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `whiteboard-op/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PWhiteboardOp`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-whiteboard-op architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-collab`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Whiteboard operation CRDT.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PWhiteboardOp } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PWhiteboardOp()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'whiteboard-op/v1'
|
||||||
|
|
||||||
|
class HyperP2PWhiteboardOp extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PWhiteboardOp, PROTOCOL }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-whiteboard-op",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Whiteboard operation CRDT.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PWhiteboardOp, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PWhiteboardOp)
|
||||||
|
t.is(PROTOCOL, 'whiteboard-op/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PWhiteboardOp()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'whiteboard-op/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Applications (economy)
|
||||||
|
|
||||||
|
**Path:** `modules/applications-economy/` · **Modules:** 3 (0 production, 3 scaffold)
|
||||||
|
|
||||||
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#applications-economy).
|
||||||
|
|
||||||
|
- [hyper-p2p-auction-gossip](./hyper-p2p-auction-gossip/) — scaffold
|
||||||
|
- [hyper-p2p-credit-ledger](./hyper-p2p-credit-ledger/) — scaffold
|
||||||
|
- [hyper-p2p-marketplace-listing](./hyper-p2p-marketplace-listing/) — scaffold
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-auction-gossip
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `auction-gossip/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Auction gossip rounds.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-economy/hyper-p2p-auction-gossip/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-auction-gossip",
|
||||||
|
"category": "applications-economy",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "auction-gossip/v1",
|
||||||
|
"class": "HyperP2PAuctionGossip",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-auction-gossip API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `auction-gossip/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PAuctionGossip`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-auction-gossip architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-economy`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Auction gossip rounds.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PAuctionGossip } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PAuctionGossip()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'auction-gossip/v1'
|
||||||
|
|
||||||
|
class HyperP2PAuctionGossip extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PAuctionGossip, PROTOCOL }
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-auction-gossip",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Auction gossip rounds.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PAuctionGossip, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PAuctionGossip)
|
||||||
|
t.is(PROTOCOL, 'auction-gossip/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PAuctionGossip()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'auction-gossip/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-credit-ledger
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `credit-ledger/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Credit ledger gossip.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-economy/hyper-p2p-credit-ledger/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-credit-ledger",
|
||||||
|
"category": "applications-economy",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "credit-ledger/v1",
|
||||||
|
"class": "HyperP2PCreditLedger",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-credit-ledger API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `credit-ledger/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PCreditLedger`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-credit-ledger architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-economy`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Credit ledger gossip.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PCreditLedger } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PCreditLedger()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'credit-ledger/v1'
|
||||||
|
|
||||||
|
class HyperP2PCreditLedger extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PCreditLedger, PROTOCOL }
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-credit-ledger",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Credit ledger gossip.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PCreditLedger, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PCreditLedger)
|
||||||
|
t.is(PROTOCOL, 'credit-ledger/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PCreditLedger()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'credit-ledger/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-marketplace-listing
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `marketplace-listing/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Marketplace listing registry.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/applications-economy/hyper-p2p-marketplace-listing/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-marketplace-listing",
|
||||||
|
"category": "applications-economy",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "marketplace-listing/v1",
|
||||||
|
"class": "HyperP2PMarketplaceListing",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-marketplace-listing API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `marketplace-listing/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PMarketplaceListing`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-marketplace-listing architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `applications-economy`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Marketplace listing registry.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PMarketplaceListing } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PMarketplaceListing()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'marketplace-listing/v1'
|
||||||
|
|
||||||
|
class HyperP2PMarketplaceListing extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PMarketplaceListing, PROTOCOL }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-marketplace-listing",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Marketplace listing registry.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PMarketplaceListing, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PMarketplaceListing)
|
||||||
|
t.is(PROTOCOL, 'marketplace-listing/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PMarketplaceListing()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'marketplace-listing/v1')
|
||||||
|
})
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
# Consensus & coordination
|
# Consensus & coordination
|
||||||
|
|
||||||
3 modules. See [`../MODULE_CATEGORIES.md`](../../MODULE_CATEGORIES.md).
|
**Path:** `modules/consensus-coordination/` · **Modules:** 5 (3 production, 2 scaffold)
|
||||||
|
|
||||||
| Module |
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#consensus-coordination).
|
||||||
|--------|
|
|
||||||
| [hyper-p2p-distributed-lock](hyper-p2p-distributed-lock/) |
|
- [hyper-p2p-causal-consensus](./hyper-p2p-causal-consensus/) — production
|
||||||
| [hyper-p2p-causal-consensus](hyper-p2p-causal-consensus/) |
|
- [hyper-p2p-distributed-lock](./hyper-p2p-distributed-lock/) — production
|
||||||
| [hyper-p2p-quorum-pool](hyper-p2p-quorum-pool/) |
|
- [hyper-p2p-leader-lease](./hyper-p2p-leader-lease/) — scaffold
|
||||||
|
- [hyper-p2p-quorum-pool](./hyper-p2p-quorum-pool/) — production
|
||||||
|
- [hyper-p2p-raft-lite](./hyper-p2p-raft-lite/) — scaffold
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"bare-events": "^2.8.0",
|
"bare-events": "^2.8.0",
|
||||||
"bare-process": "^4.4.0",
|
"bare-process": "^4.4.0",
|
||||||
"bare-timers": "^2.0.0",
|
"bare-timers": "^2.0.0",
|
||||||
"hyper-p2p-vector-clock": "file:../hyper-p2p-vector-clock",
|
"hyper-p2p-vector-clock": "file:../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"hypercore-crypto": "^3.0.0"
|
"hypercore-crypto": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -30,8 +30,33 @@
|
|||||||
"protomux": "^3.0.0"
|
"protomux": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"../../core-infrastructure/hyper-p2p-vector-clock": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"bare-crypto": "^1.9.0",
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"compact-encoding": "^2.0.0",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"brittle": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"bare": ">=1.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bare": ">=1.0.0",
|
||||||
|
"hyperbee": "^2.0.0",
|
||||||
|
"hyperswarm": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"../hyper-p2p-vector-clock": {
|
"../hyper-p2p-vector-clock": {
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"extraneous": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"b4a": "^1.6.7",
|
"b4a": "^1.6.7",
|
||||||
@@ -1290,7 +1315,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hyper-p2p-vector-clock": {
|
"node_modules/hyper-p2p-vector-clock": {
|
||||||
"resolved": "../hyper-p2p-vector-clock",
|
"resolved": "../../core-infrastructure/hyper-p2p-vector-clock",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
"node_modules/hyperbee": {
|
"node_modules/hyperbee": {
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-leader-lease
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `leader-lease/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Leader lease primitive.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/consensus-coordination/hyper-p2p-leader-lease/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-leader-lease",
|
||||||
|
"category": "consensus-coordination",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "leader-lease/v1",
|
||||||
|
"class": "HyperP2PLeaderLease",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-leader-lease API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `leader-lease/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PLeaderLease`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-leader-lease architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `consensus-coordination`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Leader lease primitive.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PLeaderLease } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PLeaderLease()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'leader-lease/v1'
|
||||||
|
|
||||||
|
class HyperP2PLeaderLease extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PLeaderLease, PROTOCOL }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-leader-lease",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Leader lease primitive.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PLeaderLease, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PLeaderLease)
|
||||||
|
t.is(PROTOCOL, 'leader-lease/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PLeaderLease()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'leader-lease/v1')
|
||||||
|
})
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [0.0.0-scaffold] — Wave 8
|
||||||
|
|
||||||
|
- Registry scaffold: file tree, load smoke tests, docs stubs
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# hyper-p2p-raft-lite
|
||||||
|
|
||||||
|
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `raft-lite/v1` · **Wave:** 8
|
||||||
|
|
||||||
|
Raft-lite leader election.
|
||||||
|
|
||||||
|
## Holepunch references (inspiration only)
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
> This module composes on Hyperswarm/Hypercore — it does **not** re-implement upstream packages.
|
||||||
|
|
||||||
|
## Composes with
|
||||||
|
|
||||||
|
- (none yet)
|
||||||
|
|
||||||
|
## Planned API
|
||||||
|
|
||||||
|
- `constructor(opts)` — topic, optional keyPair
|
||||||
|
- `getStats()` — scaffold counters
|
||||||
|
- `ready()` — no-op until implemented
|
||||||
|
- Domain methods — throw `not implemented: scaffold` until Wave 8+ pass
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
|
||||||
|
`modules/consensus-coordination/hyper-p2p-raft-lite/`
|
||||||
|
|
||||||
|
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-raft-lite",
|
||||||
|
"category": "consensus-coordination",
|
||||||
|
"tier": "scaffold",
|
||||||
|
"protocol": "raft-lite/v1",
|
||||||
|
"class": "HyperP2PRaftLite",
|
||||||
|
"wave": 8,
|
||||||
|
"holepunch_refs": [],
|
||||||
|
"composes_with": [],
|
||||||
|
"status": "scaffold"
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# hyper-p2p-raft-lite API
|
||||||
|
|
||||||
|
**Status:** scaffold · **Protocol:** `raft-lite/v1`
|
||||||
|
|
||||||
|
## Class `HyperP2PRaftLite`
|
||||||
|
|
||||||
|
Scaffold stub — methods throw `not implemented: scaffold` until promoted to production tier.
|
||||||
|
|
||||||
|
### `constructor(opts?)`
|
||||||
|
|
||||||
|
### `getStats()`
|
||||||
|
|
||||||
|
Returns `{ created, errors, protocol, tier: 'scaffold' }`.
|
||||||
|
|
||||||
|
### `ready()`
|
||||||
|
|
||||||
|
Resolves immediately (no-op).
|
||||||
|
|
||||||
|
## Wire (planned)
|
||||||
|
|
||||||
|
| Message | Direction | Notes |
|
||||||
|
|---------|-----------|-------|
|
||||||
|
| TBD | gossip | Defined in implementation pass |
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# hyper-p2p-raft-lite architecture
|
||||||
|
|
||||||
|
**Tier:** scaffold · **Category:** `consensus-coordination`
|
||||||
|
|
||||||
|
## Role
|
||||||
|
|
||||||
|
Raft-lite leader election.
|
||||||
|
|
||||||
|
## Composition
|
||||||
|
|
||||||
|
Uses `../../_shared/p2p-bare.js` for Hyperswarm + Protomux when implemented. Does **not** duplicate Holepunch core storage/transport.
|
||||||
|
|
||||||
|
## Holepunch boundary
|
||||||
|
|
||||||
|
Inspiration: n/a
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const { HyperP2PRaftLite } = require('../index.js')
|
||||||
|
|
||||||
|
async function main () {
|
||||||
|
const m = new HyperP2PRaftLite()
|
||||||
|
console.log('[scaffold]', m.getStats())
|
||||||
|
}
|
||||||
|
main().catch(console.error)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
require('bare-process/global')
|
||||||
|
const EventEmitter = require('bare-events')
|
||||||
|
|
||||||
|
const PROTOCOL = 'raft-lite/v1'
|
||||||
|
|
||||||
|
class HyperP2PRaftLite extends EventEmitter {
|
||||||
|
constructor (opts = {}) {
|
||||||
|
super()
|
||||||
|
this.topic = opts.topic || null
|
||||||
|
this._stats = { created: 0, errors: 0 }
|
||||||
|
}
|
||||||
|
|
||||||
|
getStats () {
|
||||||
|
return { ...this._stats, protocol: PROTOCOL, tier: 'scaffold' }
|
||||||
|
}
|
||||||
|
|
||||||
|
async ready () { return true }
|
||||||
|
|
||||||
|
_notImplemented (method) {
|
||||||
|
this._stats.errors++
|
||||||
|
throw new Error(`not implemented: scaffold (${method})`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { HyperP2PRaftLite, PROTOCOL }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "hyper-p2p-raft-lite",
|
||||||
|
"version": "0.0.0-scaffold",
|
||||||
|
"description": "Raft-lite leader election.",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "commonjs",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"scripts": { "test": "brittle-bare test/test.js" },
|
||||||
|
"dependencies": {
|
||||||
|
"bare-events": "^2.8.0",
|
||||||
|
"bare-process": "^4.4.0",
|
||||||
|
"bare-timers": "^2.0.0",
|
||||||
|
"b4a": "^1.6.7",
|
||||||
|
"hypercore-crypto": "^3.0.0",
|
||||||
|
"protomux": "^3.0.0",
|
||||||
|
"compact-encoding": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": { "hyperswarm": "^4.0.0", "bare": ">=1.0.0" },
|
||||||
|
"devDependencies": { "brittle": "^3.0.0" },
|
||||||
|
"imports": {
|
||||||
|
"process": { "bare": "bare-process", "default": "process" },
|
||||||
|
"events": { "bare": "bare-events", "default": "events" },
|
||||||
|
"timers": { "bare": "bare-timers", "default": "timers" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
const test = require('brittle')
|
||||||
|
const { HyperP2PRaftLite, PROTOCOL } = require('../index.js')
|
||||||
|
|
||||||
|
test('exports load', (t) => {
|
||||||
|
t.ok(HyperP2PRaftLite)
|
||||||
|
t.is(PROTOCOL, 'raft-lite/v1')
|
||||||
|
})
|
||||||
|
|
||||||
|
test('getStats shape', async (t) => {
|
||||||
|
const m = new HyperP2PRaftLite()
|
||||||
|
const s = m.getStats()
|
||||||
|
t.is(s.tier, 'scaffold')
|
||||||
|
t.is(s.protocol, 'raft-lite/v1')
|
||||||
|
})
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# Core infrastructure
|
# Core infrastructure
|
||||||
|
|
||||||
5 modules. See [`../MODULE_CATEGORIES.md`](../../MODULE_CATEGORIES.md).
|
**Path:** `modules/core-infrastructure/` · **Modules:** 5 (5 production, 0 scaffold)
|
||||||
|
|
||||||
| Module |
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#core-infrastructure).
|
||||||
|--------|
|
|
||||||
| [hyper-p2p-presence](hyper-p2p-presence/) |
|
- [hyper-p2p-capabilities](./hyper-p2p-capabilities/) — production
|
||||||
| [hyper-p2p-rpc](hyper-p2p-rpc/) |
|
- [hyper-p2p-presence](./hyper-p2p-presence/) — production
|
||||||
| [hyper-p2p-capabilities](hyper-p2p-capabilities/) |
|
- [hyper-p2p-rpc](./hyper-p2p-rpc/) — production
|
||||||
| [hyper-p2p-session-bridge](hyper-p2p-session-bridge/) |
|
- [hyper-p2p-session-bridge](./hyper-p2p-session-bridge/) — production
|
||||||
| [hyper-p2p-vector-clock](hyper-p2p-vector-clock/) |
|
- [hyper-p2p-vector-clock](./hyper-p2p-vector-clock/) — production
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Encoding & wire formats
|
||||||
|
|
||||||
|
**Path:** `modules/encoding-wire/` · **Modules:** 4 (0 production, 4 scaffold)
|
||||||
|
|
||||||
|
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#encoding-wire).
|
||||||
|
|
||||||
|
- [hyper-p2p-compact-codec-bridge](./hyper-p2p-compact-codec-bridge/) — scaffold
|
||||||
|
- [hyper-p2p-message-envelope](./hyper-p2p-message-envelope/) — scaffold
|
||||||
|
- [hyper-p2p-schema-validator](./hyper-p2p-schema-validator/) — scaffold
|
||||||
|
- [hyper-p2p-wire-registry](./hyper-p2p-wire-registry/) — scaffold
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user