This commit is contained in:
Raven Scott
2026-05-20 21:19:52 -04:00
parent 14d0980b4f
commit 31e9728ef8
759 changed files with 54218 additions and 392 deletions
+13 -6
View File
@@ -1,9 +1,16 @@
# State & CRDTs
3 modules. See [`../MODULE_CATEGORIES.md`](../../MODULE_CATEGORIES.md).
**Path:** `modules/state-crdts/` · **Modules:** 10 (3 production, 7 scaffold)
| Module |
|--------|
| [hyper-p2p-reactive-state](hyper-p2p-reactive-state/) |
| [hyper-p2p-crdt-map](hyper-p2p-crdt-map/) |
| [hyper-p2p-conflict-set](hyper-p2p-conflict-set/) |
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#state-crdts).
- [hyper-p2p-conflict-set](./hyper-p2p-conflict-set/) — production
- [hyper-p2p-crdt-grow-only-set](./hyper-p2p-crdt-grow-only-set/) — scaffold
- [hyper-p2p-crdt-lww-register](./hyper-p2p-crdt-lww-register/) — scaffold
- [hyper-p2p-crdt-map](./hyper-p2p-crdt-map/) — production
- [hyper-p2p-crdt-or-map](./hyper-p2p-crdt-or-map/) — scaffold
- [hyper-p2p-crdt-pn-counter](./hyper-p2p-crdt-pn-counter/) — scaffold
- [hyper-p2p-crdt-rga-text](./hyper-p2p-crdt-rga-text/) — scaffold
- [hyper-p2p-crdt-two-phase-set](./hyper-p2p-crdt-two-phase-set/) — scaffold
- [hyper-p2p-crdt-version-vector](./hyper-p2p-crdt-version-vector/) — scaffold
- [hyper-p2p-reactive-state](./hyper-p2p-reactive-state/) — production
@@ -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-crdt-grow-only-set
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-grow-only-set/v1` · **Wave:** 8
Grow-only set 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/state-crdts/hyper-p2p-crdt-grow-only-set/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-grow-only-set",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-grow-only-set/v1",
"class": "HyperP2PCrdtGrowOnlySet",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-grow-only-set API
**Status:** scaffold · **Protocol:** `crdt-grow-only-set/v1`
## Class `HyperP2PCrdtGrowOnlySet`
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-crdt-grow-only-set architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
Grow-only set 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 { HyperP2PCrdtGrowOnlySet } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtGrowOnlySet()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-grow-only-set/v1'
class HyperP2PCrdtGrowOnlySet 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 = { HyperP2PCrdtGrowOnlySet, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-grow-only-set",
"version": "0.0.0-scaffold",
"description": "Grow-only set 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 { HyperP2PCrdtGrowOnlySet, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtGrowOnlySet)
t.is(PROTOCOL, 'crdt-grow-only-set/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtGrowOnlySet()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-grow-only-set/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-crdt-lww-register
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-lww-register/v1` · **Wave:** 8
LWW-register 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/state-crdts/hyper-p2p-crdt-lww-register/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-lww-register",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-lww-register/v1",
"class": "HyperP2PCrdtLwwRegister",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-lww-register API
**Status:** scaffold · **Protocol:** `crdt-lww-register/v1`
## Class `HyperP2PCrdtLwwRegister`
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-crdt-lww-register architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
LWW-register 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 { HyperP2PCrdtLwwRegister } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtLwwRegister()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-lww-register/v1'
class HyperP2PCrdtLwwRegister 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 = { HyperP2PCrdtLwwRegister, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-lww-register",
"version": "0.0.0-scaffold",
"description": "LWW-register 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 { HyperP2PCrdtLwwRegister, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtLwwRegister)
t.is(PROTOCOL, 'crdt-lww-register/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtLwwRegister()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-lww-register/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-crdt-or-map
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-or-map/v1` · **Wave:** 8
OR-map 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/state-crdts/hyper-p2p-crdt-or-map/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-or-map",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-or-map/v1",
"class": "HyperP2PCrdtOrMap",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-or-map API
**Status:** scaffold · **Protocol:** `crdt-or-map/v1`
## Class `HyperP2PCrdtOrMap`
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-crdt-or-map architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
OR-map 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 { HyperP2PCrdtOrMap } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtOrMap()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-or-map/v1'
class HyperP2PCrdtOrMap 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 = { HyperP2PCrdtOrMap, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-or-map",
"version": "0.0.0-scaffold",
"description": "OR-map 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 { HyperP2PCrdtOrMap, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtOrMap)
t.is(PROTOCOL, 'crdt-or-map/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtOrMap()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-or-map/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-crdt-pn-counter
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-pn-counter/v1` · **Wave:** 8
PN-counter 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/state-crdts/hyper-p2p-crdt-pn-counter/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-pn-counter",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-pn-counter/v1",
"class": "HyperP2PCrdtPnCounter",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-pn-counter API
**Status:** scaffold · **Protocol:** `crdt-pn-counter/v1`
## Class `HyperP2PCrdtPnCounter`
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-crdt-pn-counter architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
PN-counter 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 { HyperP2PCrdtPnCounter } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtPnCounter()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-pn-counter/v1'
class HyperP2PCrdtPnCounter 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 = { HyperP2PCrdtPnCounter, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-pn-counter",
"version": "0.0.0-scaffold",
"description": "PN-counter 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 { HyperP2PCrdtPnCounter, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtPnCounter)
t.is(PROTOCOL, 'crdt-pn-counter/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtPnCounter()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-pn-counter/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-crdt-rga-text
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-rga-text/v1` · **Wave:** 8
RGA text 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/state-crdts/hyper-p2p-crdt-rga-text/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-rga-text",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-rga-text/v1",
"class": "HyperP2PCrdtRgaText",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-rga-text API
**Status:** scaffold · **Protocol:** `crdt-rga-text/v1`
## Class `HyperP2PCrdtRgaText`
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-crdt-rga-text architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
RGA text 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 { HyperP2PCrdtRgaText } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtRgaText()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-rga-text/v1'
class HyperP2PCrdtRgaText 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 = { HyperP2PCrdtRgaText, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-rga-text",
"version": "0.0.0-scaffold",
"description": "RGA text 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 { HyperP2PCrdtRgaText, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtRgaText)
t.is(PROTOCOL, 'crdt-rga-text/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtRgaText()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-rga-text/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-crdt-two-phase-set
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-two-phase-set/v1` · **Wave:** 8
Two-phase set 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/state-crdts/hyper-p2p-crdt-two-phase-set/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-two-phase-set",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-two-phase-set/v1",
"class": "HyperP2PCrdtTwoPhaseSet",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-two-phase-set API
**Status:** scaffold · **Protocol:** `crdt-two-phase-set/v1`
## Class `HyperP2PCrdtTwoPhaseSet`
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-crdt-two-phase-set architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
Two-phase set 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 { HyperP2PCrdtTwoPhaseSet } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtTwoPhaseSet()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-two-phase-set/v1'
class HyperP2PCrdtTwoPhaseSet 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 = { HyperP2PCrdtTwoPhaseSet, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-two-phase-set",
"version": "0.0.0-scaffold",
"description": "Two-phase set 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 { HyperP2PCrdtTwoPhaseSet, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtTwoPhaseSet)
t.is(PROTOCOL, 'crdt-two-phase-set/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtTwoPhaseSet()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-two-phase-set/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-crdt-version-vector
**Status:** scaffold (`0.0.0-scaffold`) · **Protocol:** `crdt-version-vector/v1` · **Wave:** 8
Version vector 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/state-crdts/hyper-p2p-crdt-version-vector/`
See [`modules/_shared/MODULE_SYSTEM.md`](../../_shared/MODULE_SYSTEM.md).
@@ -0,0 +1,11 @@
{
"name": "hyper-p2p-crdt-version-vector",
"category": "state-crdts",
"tier": "scaffold",
"protocol": "crdt-version-vector/v1",
"class": "HyperP2PCrdtVersionVector",
"wave": 8,
"holepunch_refs": [],
"composes_with": [],
"status": "scaffold"
}
@@ -0,0 +1,23 @@
# hyper-p2p-crdt-version-vector API
**Status:** scaffold · **Protocol:** `crdt-version-vector/v1`
## Class `HyperP2PCrdtVersionVector`
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-crdt-version-vector architecture
**Tier:** scaffold · **Category:** `state-crdts`
## Role
Version vector 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 { HyperP2PCrdtVersionVector } = require('../index.js')
async function main () {
const m = new HyperP2PCrdtVersionVector()
console.log('[scaffold]', m.getStats())
}
main().catch(console.error)
@@ -0,0 +1,25 @@
require('bare-process/global')
const EventEmitter = require('bare-events')
const PROTOCOL = 'crdt-version-vector/v1'
class HyperP2PCrdtVersionVector 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 = { HyperP2PCrdtVersionVector, PROTOCOL }
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
{
"name": "hyper-p2p-crdt-version-vector",
"version": "0.0.0-scaffold",
"description": "Version vector 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 { HyperP2PCrdtVersionVector, PROTOCOL } = require('../index.js')
test('exports load', (t) => {
t.ok(HyperP2PCrdtVersionVector)
t.is(PROTOCOL, 'crdt-version-vector/v1')
})
test('getStats shape', async (t) => {
const m = new HyperP2PCrdtVersionVector()
const s = m.getStats()
t.is(s.tier, 'scaffold')
t.is(s.protocol, 'crdt-version-vector/v1')
})