Updates
This commit is contained in:
@@ -172,4 +172,30 @@ All async methods reject on fatal errors (storage, swarm). Non-fatal issues are
|
||||
|
||||
---
|
||||
|
||||
*Complete API surface for the first production-grade intent routing primitive in the Bare ecosystem.*
|
||||
*Complete API surface for the first production-grade intent routing primitive in the Bare ecosystem.*
|
||||
## P2P and runtime options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `topic` | `string` \| `Buffer` | `null` | Hyperswarm discovery topic. Hex (64 chars) or string (hashed via `hypercore-crypto`). P2P is active when set. |
|
||||
| `keyPair` | `KeyPair` | random | Ed25519 key pair (`hypercore-crypto.keyPair()`). |
|
||||
|
||||
### Runtime flags (test exit)
|
||||
|
||||
| Option | Modules | Default | Description |
|
||||
|--------|---------|---------|-------------|
|
||||
| `enableBackgroundTimers` | oracle, reputation | `false` | Enables periodic cleanup/decay/gossip timers. Keep `false` in unit tests so the process exits. |
|
||||
| `enableGossip` | causal-consensus | `false` | Enables gossip interval + Protomux proposal fan-out when `topic` is also set. |
|
||||
|
||||
### Protomux
|
||||
|
||||
Wire format uses **Protomux v3** (`createChannel` → `addMessage` → `open`) via [`../_shared/p2p-bare.js`](../_shared/p2p-bare.js).
|
||||
|
||||
### Testing
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npx brittle-bare test/test.js
|
||||
```
|
||||
|
||||
Integration (2-node): [`../../real_tests/integration/`](../../real_tests/integration/) — see [DEVELOPMENT.md](../../DEVELOPMENT.md).
|
||||
|
||||
@@ -151,4 +151,9 @@ flowchart TD
|
||||
|
||||
---
|
||||
|
||||
*This architecture was designed to be the foundational routing layer for next-generation intent-centric P2P applications on Bare/Pear.*
|
||||
*This architecture was designed to be the foundational routing layer for next-generation intent-centric P2P applications on Bare/Pear.*
|
||||
### Diagram legend (P2P)
|
||||
|
||||
- **Solid arrows** — implemented Hyperswarm / Protomux paths in `index.js`
|
||||
- **Dashed arrows** — optional hooks (set `topic`, `enableGossip`, or pass external `hyperbee` / `swarm`)
|
||||
- **Library-only** — no swarm required for core API (vector-clock, capabilities core)
|
||||
|
||||
Reference in New Issue
Block a user