yakmesh 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +6 -0
- package/announcements/discord-v1.3.1.md +55 -0
- package/content/api.js +348 -0
- package/content/index.js +19 -0
- package/content/store.js +683 -0
- package/deploy-packages/README.md +114 -0
- package/deploy-packages/build-packages.ps1 +205 -0
- package/deploy-packages/yakmesh-full/README.md +122 -0
- package/deploy-packages/yakmesh-full/config/Caddyfile +61 -0
- package/deploy-packages/yakmesh-full/config/php.ini +55 -0
- package/deploy-packages/yakmesh-full/config/yakmesh.config.js +100 -0
- package/deploy-packages/yakmesh-full/start.ps1 +193 -0
- package/deploy-packages/yakmesh-full/stop.ps1 +35 -0
- package/deploy-packages/yakmesh-minimal/README.md +69 -0
- package/deploy-packages/yakmesh-minimal/config/Caddyfile +46 -0
- package/deploy-packages/yakmesh-minimal/config/yakmesh.config.js +79 -0
- package/deploy-packages/yakmesh-minimal/start.ps1 +165 -0
- package/deploy-packages/yakmesh-minimal/stop.ps1 +29 -0
- package/discord.md +13 -58
- package/gossip/protocol.js +13 -2
- package/mesh/annex.js +743 -0
- package/mesh/beacon-broadcast.js +4 -5
- package/mesh/echo-ranging.js +3 -4
- package/mesh/phantom-routing.js +3 -4
- package/mesh/pulse-sync.js +3 -4
- package/mesh/temporal-encoder.js +3 -3
- package/package.json +1 -1
- package/server/index.js +64 -3
- package/yakmesh.config.js +8 -0
package/mesh/beacon-broadcast.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Yakmesh Beacon - Broadcast Emergency Alert Channel Over Network
|
|
3
3
|
*
|
|
4
4
|
* Priority message propagation with guaranteed delivery:
|
|
5
5
|
* - Flood-based protocol with intelligent deduplication
|
|
@@ -8,14 +8,13 @@
|
|
|
8
8
|
* - Emergency priority levels with preemption
|
|
9
9
|
*
|
|
10
10
|
* Key Innovation: "When the message MUST get through"
|
|
11
|
-
* - Combines
|
|
11
|
+
* - Combines temporal encoding with pulse heartbeats
|
|
12
12
|
* - Cryptographic receipts prove delivery chain
|
|
13
13
|
* - Multi-path redundancy ensures survivability
|
|
14
14
|
*
|
|
15
15
|
* @module mesh/beacon-broadcast
|
|
16
16
|
* @license MIT
|
|
17
|
-
* @copyright 2026 YAKMESH Contributors
|
|
18
|
-
* @trademark BEACON™ is a trademark of YAKMESH
|
|
17
|
+
* @copyright 2026 YAKMESH™ Contributors
|
|
19
18
|
*/
|
|
20
19
|
|
|
21
20
|
import { randomBytes, createHash } from 'crypto';
|
|
@@ -652,4 +651,4 @@ export {
|
|
|
652
651
|
ReceiptCollector,
|
|
653
652
|
PriorityMessageQueue,
|
|
654
653
|
BeaconBroadcast,
|
|
655
|
-
};
|
|
654
|
+
};
|
package/mesh/echo-ranging.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Yakmesh Echo - Encrypted Coordinate Heuristic Oracle
|
|
3
3
|
*
|
|
4
4
|
* A novel topology discovery and latency mapping system that:
|
|
5
5
|
* - Maps mesh topology WITHOUT exposing node positions
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module mesh/echo-ranging
|
|
16
16
|
* @license MIT
|
|
17
|
-
* @copyright 2026 YAKMESH Contributors
|
|
18
|
-
* @trademark ECHO™ is a trademark of YAKMESH
|
|
17
|
+
* @copyright 2026 YAKMESH™ Contributors
|
|
19
18
|
*/
|
|
20
19
|
|
|
21
20
|
import { randomBytes, createHash, createCipheriv, createDecipheriv } from 'crypto';
|
|
@@ -609,4 +608,4 @@ export {
|
|
|
609
608
|
VirtualCoordinates,
|
|
610
609
|
LatencyTracker,
|
|
611
610
|
EchoRanging,
|
|
612
|
-
};
|
|
611
|
+
};
|
package/mesh/phantom-routing.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Yakmesh Phantom Routing - Post-quantum Hidden Anonymous Network Transmission Over Mesh
|
|
3
3
|
*
|
|
4
4
|
* The first post-quantum secure onion routing implementation featuring:
|
|
5
5
|
* - ML-DSA-65 signatures at every routing layer
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module mesh/phantom-routing
|
|
16
16
|
* @license MIT
|
|
17
|
-
* @copyright 2026 YAKMESH Contributors
|
|
18
|
-
* @trademark PHANTOM™ is a trademark of YAKMESH
|
|
17
|
+
* @copyright 2026 YAKMESH™ Contributors
|
|
19
18
|
*/
|
|
20
19
|
|
|
21
20
|
import { randomBytes, createCipheriv, createDecipheriv, createHash } from 'crypto';
|
|
@@ -697,4 +696,4 @@ export {
|
|
|
697
696
|
PhantomCircuit,
|
|
698
697
|
PhantomRelay,
|
|
699
698
|
PhantomRouter,
|
|
700
|
-
};
|
|
699
|
+
};
|
package/mesh/pulse-sync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Yakmesh Pulse - Precision Universal Latency Sync Engine
|
|
3
3
|
*
|
|
4
4
|
* The heartbeat of the mesh network that provides:
|
|
5
5
|
* - Distributed liveness detection with temporal proofs
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module mesh/pulse-sync
|
|
16
16
|
* @license MIT
|
|
17
|
-
* @copyright 2026 YAKMESH Contributors
|
|
18
|
-
* @trademark PULSE™ is a trademark of YAKMESH
|
|
17
|
+
* @copyright 2026 YAKMESH™ Contributors
|
|
19
18
|
*/
|
|
20
19
|
|
|
21
20
|
import { randomBytes, createHash } from 'crypto';
|
|
@@ -615,4 +614,4 @@ export {
|
|
|
615
614
|
MeshHealthMonitor,
|
|
616
615
|
PulseLeaderElection,
|
|
617
616
|
PulseSync,
|
|
618
|
-
};
|
|
617
|
+
};
|
package/mesh/temporal-encoder.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Yakmesh Temporal Mesh Encoding (TME)
|
|
3
3
|
*
|
|
4
|
-
* A novel approach to packet resilience that exploits
|
|
4
|
+
* A novel approach to packet resilience that exploits Yakmesh's unique capabilities:
|
|
5
5
|
* - Atomic time synchronization (configurable precision from NTP to PCIe atomic clock levels)
|
|
6
6
|
* - Post-quantum ML-DSA-65 signatures for cryptographic time binding
|
|
7
7
|
* - Mesh topology awareness for intelligent path diversity
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @module mesh/temporal-encoder
|
|
19
19
|
* @license MIT
|
|
20
|
-
* @copyright 2026 YAKMESH Contributors
|
|
20
|
+
* @copyright 2026 YAKMESH™ Contributors
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { randomBytes, createHash } from 'crypto';
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -19,6 +19,12 @@ import { MeshNetwork } from '../mesh/network.js';
|
|
|
19
19
|
import { ReplicationEngine } from '../database/replication.js';
|
|
20
20
|
import { GossipProtocol } from '../gossip/protocol.js';
|
|
21
21
|
|
|
22
|
+
// Content store for public delivery
|
|
23
|
+
import { ContentStore, createContentAPI } from '../content/index.js';
|
|
24
|
+
|
|
25
|
+
// Annex - Autonomous Network Negotiated Encrypted eXchange
|
|
26
|
+
import { Annex } from '../mesh/annex.js';
|
|
27
|
+
|
|
22
28
|
// Oracle system imports
|
|
23
29
|
import {
|
|
24
30
|
getOracle,
|
|
@@ -115,6 +121,12 @@ export class YakmeshNode {
|
|
|
115
121
|
this.codeProof = null;
|
|
116
122
|
this.consensus = null;
|
|
117
123
|
|
|
124
|
+
// Content store for public delivery
|
|
125
|
+
this.contentStore = null;
|
|
126
|
+
|
|
127
|
+
// Annex - encrypted point-to-point messaging
|
|
128
|
+
this.annex = null;
|
|
129
|
+
|
|
118
130
|
// Time source detector
|
|
119
131
|
this.timeSource = null;
|
|
120
132
|
|
|
@@ -206,12 +218,40 @@ export class YakmeshNode {
|
|
|
206
218
|
if (topic === 'network_handshake') {
|
|
207
219
|
this._handleNetworkHandshake(data, origin);
|
|
208
220
|
}
|
|
221
|
+
|
|
222
|
+
// Handle content gossip (for public content delivery)
|
|
223
|
+
if (topic === 'content') {
|
|
224
|
+
if (this.contentStore) {
|
|
225
|
+
this.contentStore._handleContentGossip(data, origin);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
// Handle Annex (encrypted direct messages) - separate from gossip
|
|
231
|
+
this.mesh.on('annex', (data, origin) => {
|
|
232
|
+
if (this.annex) {
|
|
233
|
+
this.annex._handleAnnexMessage(data.annex || data, origin);
|
|
234
|
+
}
|
|
209
235
|
});
|
|
210
236
|
|
|
211
|
-
// 5.
|
|
237
|
+
// 5. Initialize content store for public delivery
|
|
238
|
+
this.contentStore = new ContentStore({
|
|
239
|
+
dataDir: this.config.database?.contentPath || './data/content',
|
|
240
|
+
quorumSize: 2,
|
|
241
|
+
});
|
|
242
|
+
await this.contentStore.init(this);
|
|
243
|
+
|
|
244
|
+
// 5b. Initialize Annex for encrypted point-to-point messaging
|
|
245
|
+
this.annex = new Annex({
|
|
246
|
+
identity: this.identity,
|
|
247
|
+
mesh: this.mesh,
|
|
248
|
+
});
|
|
249
|
+
console.log('✓ Annex channel initialized (encrypted P2P messaging)');
|
|
250
|
+
|
|
251
|
+
// 6. Start HTTP server
|
|
212
252
|
await this._startHttpServer();
|
|
213
253
|
|
|
214
|
-
//
|
|
254
|
+
// 7. Connect to bootstrap nodes
|
|
215
255
|
await this._connectToBootstrap();
|
|
216
256
|
|
|
217
257
|
// 7. Initialize PeerQuanta integration (if enabled)
|
|
@@ -222,13 +262,21 @@ export class YakmeshNode {
|
|
|
222
262
|
console.log('\n✓ Yakmesh Node is running!\n');
|
|
223
263
|
console.log(` Node ID: ${this.identity.identity.nodeId}`);
|
|
224
264
|
console.log(` HTTP: http://localhost:${this.config.network.httpPort}`);
|
|
265
|
+
console.log(` Content: http://localhost:${this.config.network.httpPort}/content`);
|
|
225
266
|
console.log(` Dashboard: http://localhost:${this.config.network.httpPort}/dashboard`);
|
|
226
267
|
console.log(` WebSocket: ws://localhost:${this.config.network.wsPort}`);
|
|
227
268
|
console.log(` Algorithm: ML-DSA-65 (Post-Quantum)`);
|
|
228
269
|
console.log(` Oracle: ✓ ${this.oracle.selfHash.slice(0, 16)}...`);
|
|
229
270
|
console.log(` Network: ${this.genesisNetwork.networkName} (${this.genesisNetwork.networkId})`);
|
|
271
|
+
if (this.contentStore) {
|
|
272
|
+
const stats = this.contentStore.getStats();
|
|
273
|
+
console.log(` Content: ${stats.totalObjects} objects (${stats.verified} verified)`);
|
|
274
|
+
}
|
|
275
|
+
if (this.annex) {
|
|
276
|
+
console.log(` Annex: ✓ Encrypted P2P ready`);
|
|
277
|
+
}
|
|
230
278
|
if (this.adapter) {
|
|
231
|
-
console.log(` Adapter:
|
|
279
|
+
console.log(` Adapter: ✓ Enabled`);
|
|
232
280
|
}
|
|
233
281
|
console.log('');
|
|
234
282
|
|
|
@@ -241,6 +289,7 @@ export class YakmeshNode {
|
|
|
241
289
|
this.adapter?.stopSync();
|
|
242
290
|
this.timeSource?.stop(); // Stop time source monitoring
|
|
243
291
|
this.consensus?.stop(); // Stop consensus engine
|
|
292
|
+
this.annex = null; // Clear annex channels
|
|
244
293
|
this.gossip?.stop();
|
|
245
294
|
this.replication?.stopSync();
|
|
246
295
|
await this.mesh?.stop();
|
|
@@ -491,6 +540,18 @@ export class YakmeshNode {
|
|
|
491
540
|
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
|
492
541
|
};
|
|
493
542
|
|
|
543
|
+
// =========================================
|
|
544
|
+
// PUBLIC CONTENT API (No Auth for reads)
|
|
545
|
+
// =========================================
|
|
546
|
+
|
|
547
|
+
// Mount content API at /content
|
|
548
|
+
const contentAPI = createContentAPI(this.contentStore, {
|
|
549
|
+
writeLimiter,
|
|
550
|
+
readLimiter: generalLimiter,
|
|
551
|
+
validateString,
|
|
552
|
+
});
|
|
553
|
+
app.use('/content', contentAPI);
|
|
554
|
+
|
|
494
555
|
// Serve dashboard
|
|
495
556
|
app.get('/dashboard', (req, res) => {
|
|
496
557
|
res.sendFile('dashboard/index.html', { root: import.meta.dirname + '/..' });
|