@ruvector/edge-net 0.4.6 → 0.5.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/package.json +13 -2
- package/plugins/cli.js +395 -0
- package/plugins/implementations/compression.js +132 -0
- package/plugins/implementations/e2e-encryption.js +160 -0
- package/plugins/implementations/federated-learning.js +249 -0
- package/plugins/implementations/reputation-staking.js +243 -0
- package/plugins/implementations/swarm-intelligence.js +386 -0
- package/plugins/index.js +90 -0
- package/plugins/plugin-loader.js +440 -0
- package/plugins/plugin-manifest.js +702 -0
- package/plugins/plugin-sdk.js +496 -0
- package/tests/plugin-system-test.js +382 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edge-Net Plugin Manifest & Catalog System
|
|
3
|
+
*
|
|
4
|
+
* Secure, fast, private plugin architecture for optional features.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Cryptographic verification (Ed25519 signatures)
|
|
8
|
+
* - Lazy loading (load on demand)
|
|
9
|
+
* - Sandboxed execution (WASM isolation)
|
|
10
|
+
* - Zero telemetry (local-first)
|
|
11
|
+
* - Capability-based permissions
|
|
12
|
+
*
|
|
13
|
+
* @module @ruvector/edge-net/plugins
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// ============================================
|
|
17
|
+
// PLUGIN CATEGORIES
|
|
18
|
+
// ============================================
|
|
19
|
+
|
|
20
|
+
export const PluginCategory = {
|
|
21
|
+
CORE: 'core', // Essential functionality
|
|
22
|
+
NETWORK: 'network', // Network topology & routing
|
|
23
|
+
CRYPTO: 'crypto', // Cryptographic features
|
|
24
|
+
PRIVACY: 'privacy', // Privacy-enhancing tech
|
|
25
|
+
AI: 'ai', // AI/ML capabilities
|
|
26
|
+
ECONOMIC: 'economic', // Incentive mechanisms
|
|
27
|
+
STORAGE: 'storage', // Data persistence
|
|
28
|
+
EXOTIC: 'exotic', // Experimental features
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const PluginTier = {
|
|
32
|
+
STABLE: 'stable', // Production-ready
|
|
33
|
+
BETA: 'beta', // Testing phase
|
|
34
|
+
EXPERIMENTAL: 'experimental', // Use at your own risk
|
|
35
|
+
RESEARCH: 'research', // Academic/research only
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// ============================================
|
|
39
|
+
// CAPABILITY PERMISSIONS
|
|
40
|
+
// ============================================
|
|
41
|
+
|
|
42
|
+
export const Capability = {
|
|
43
|
+
// Network
|
|
44
|
+
NETWORK_CONNECT: 'network:connect',
|
|
45
|
+
NETWORK_LISTEN: 'network:listen',
|
|
46
|
+
NETWORK_RELAY: 'network:relay',
|
|
47
|
+
|
|
48
|
+
// Crypto
|
|
49
|
+
CRYPTO_SIGN: 'crypto:sign',
|
|
50
|
+
CRYPTO_ENCRYPT: 'crypto:encrypt',
|
|
51
|
+
CRYPTO_KEYGEN: 'crypto:keygen',
|
|
52
|
+
|
|
53
|
+
// Storage
|
|
54
|
+
STORAGE_READ: 'storage:read',
|
|
55
|
+
STORAGE_WRITE: 'storage:write',
|
|
56
|
+
STORAGE_DELETE: 'storage:delete',
|
|
57
|
+
|
|
58
|
+
// Compute
|
|
59
|
+
COMPUTE_CPU: 'compute:cpu',
|
|
60
|
+
COMPUTE_GPU: 'compute:gpu',
|
|
61
|
+
COMPUTE_WASM: 'compute:wasm',
|
|
62
|
+
|
|
63
|
+
// System
|
|
64
|
+
SYSTEM_ENV: 'system:env',
|
|
65
|
+
SYSTEM_FS: 'system:fs',
|
|
66
|
+
SYSTEM_EXEC: 'system:exec',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// ============================================
|
|
70
|
+
// PLUGIN MANIFEST SCHEMA
|
|
71
|
+
// ============================================
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Plugin manifest schema
|
|
75
|
+
* @typedef {Object} PluginManifest
|
|
76
|
+
*/
|
|
77
|
+
export const PluginManifestSchema = {
|
|
78
|
+
// Required fields
|
|
79
|
+
id: 'string', // Unique identifier (e.g., "privacy.zk-proofs")
|
|
80
|
+
name: 'string', // Human-readable name
|
|
81
|
+
version: 'string', // Semver version
|
|
82
|
+
description: 'string', // Brief description
|
|
83
|
+
|
|
84
|
+
// Classification
|
|
85
|
+
category: 'PluginCategory',
|
|
86
|
+
tier: 'PluginTier',
|
|
87
|
+
|
|
88
|
+
// Security
|
|
89
|
+
author: 'string',
|
|
90
|
+
signature: 'string', // Ed25519 signature of manifest
|
|
91
|
+
checksum: 'string', // SHA-256 of plugin code
|
|
92
|
+
capabilities: 'Capability[]', // Required permissions
|
|
93
|
+
|
|
94
|
+
// Dependencies
|
|
95
|
+
dependencies: 'string[]', // Other plugin IDs
|
|
96
|
+
peerDependencies: 'string[]',
|
|
97
|
+
conflicts: 'string[]', // Incompatible plugins
|
|
98
|
+
|
|
99
|
+
// Loading
|
|
100
|
+
entryPoint: 'string', // Main module path
|
|
101
|
+
lazyLoad: 'boolean', // Load on first use
|
|
102
|
+
singleton: 'boolean', // Single instance only
|
|
103
|
+
|
|
104
|
+
// Configuration
|
|
105
|
+
configSchema: 'object', // JSON Schema for config
|
|
106
|
+
defaultConfig: 'object',
|
|
107
|
+
|
|
108
|
+
// Metadata
|
|
109
|
+
repository: 'string',
|
|
110
|
+
documentation: 'string',
|
|
111
|
+
license: 'string',
|
|
112
|
+
tags: 'string[]',
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// ============================================
|
|
116
|
+
// OFFICIAL PLUGIN CATALOG
|
|
117
|
+
// ============================================
|
|
118
|
+
|
|
119
|
+
export const PLUGIN_CATALOG = {
|
|
120
|
+
// ========================================
|
|
121
|
+
// TIER 1: PRACTICAL / STABLE
|
|
122
|
+
// ========================================
|
|
123
|
+
|
|
124
|
+
'core.webrtc-enhanced': {
|
|
125
|
+
id: 'core.webrtc-enhanced',
|
|
126
|
+
name: 'Enhanced WebRTC',
|
|
127
|
+
version: '1.0.0',
|
|
128
|
+
description: 'Optimized WebRTC with adaptive bitrate, simulcast, and ICE restart',
|
|
129
|
+
category: PluginCategory.CORE,
|
|
130
|
+
tier: PluginTier.STABLE,
|
|
131
|
+
capabilities: [Capability.NETWORK_CONNECT, Capability.NETWORK_RELAY],
|
|
132
|
+
lazyLoad: false,
|
|
133
|
+
configSchema: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: {
|
|
136
|
+
enableSimulcast: { type: 'boolean', default: true },
|
|
137
|
+
adaptiveBitrate: { type: 'boolean', default: true },
|
|
138
|
+
iceRestartThreshold: { type: 'number', default: 3 },
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
tags: ['networking', 'p2p', 'video'],
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
'core.compression': {
|
|
145
|
+
id: 'core.compression',
|
|
146
|
+
name: 'Data Compression',
|
|
147
|
+
version: '1.0.0',
|
|
148
|
+
description: 'LZ4/Zstd compression for network payloads and storage',
|
|
149
|
+
category: PluginCategory.CORE,
|
|
150
|
+
tier: PluginTier.STABLE,
|
|
151
|
+
capabilities: [Capability.COMPUTE_WASM],
|
|
152
|
+
lazyLoad: true,
|
|
153
|
+
configSchema: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {
|
|
156
|
+
algorithm: { type: 'string', enum: ['lz4', 'zstd', 'brotli'], default: 'lz4' },
|
|
157
|
+
level: { type: 'number', minimum: 1, maximum: 22, default: 3 },
|
|
158
|
+
threshold: { type: 'number', default: 1024 }, // Min bytes to compress
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
tags: ['performance', 'compression'],
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
'network.multi-transport': {
|
|
165
|
+
id: 'network.multi-transport',
|
|
166
|
+
name: 'Multi-Transport Layer',
|
|
167
|
+
version: '1.0.0',
|
|
168
|
+
description: 'WebSocket, WebRTC, HTTP/3 QUIC transport with automatic failover',
|
|
169
|
+
category: PluginCategory.NETWORK,
|
|
170
|
+
tier: PluginTier.STABLE,
|
|
171
|
+
capabilities: [Capability.NETWORK_CONNECT, Capability.NETWORK_LISTEN],
|
|
172
|
+
lazyLoad: false,
|
|
173
|
+
configSchema: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: {
|
|
176
|
+
preferredTransport: { type: 'string', enum: ['webrtc', 'websocket', 'quic'], default: 'webrtc' },
|
|
177
|
+
fallbackOrder: { type: 'array', default: ['webrtc', 'websocket', 'quic'] },
|
|
178
|
+
timeoutMs: { type: 'number', default: 5000 },
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
tags: ['networking', 'reliability', 'transport'],
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
'storage.indexed-db': {
|
|
185
|
+
id: 'storage.indexed-db',
|
|
186
|
+
name: 'IndexedDB Persistence',
|
|
187
|
+
version: '1.0.0',
|
|
188
|
+
description: 'Browser-native storage with encryption at rest',
|
|
189
|
+
category: PluginCategory.STORAGE,
|
|
190
|
+
tier: PluginTier.STABLE,
|
|
191
|
+
capabilities: [Capability.STORAGE_READ, Capability.STORAGE_WRITE, Capability.CRYPTO_ENCRYPT],
|
|
192
|
+
lazyLoad: true,
|
|
193
|
+
configSchema: {
|
|
194
|
+
type: 'object',
|
|
195
|
+
properties: {
|
|
196
|
+
dbName: { type: 'string', default: 'edge-net' },
|
|
197
|
+
encryptionKey: { type: 'string' }, // Optional, derived from PiKey if not set
|
|
198
|
+
maxSizeMB: { type: 'number', default: 100 },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
tags: ['storage', 'persistence', 'encryption'],
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
// ========================================
|
|
205
|
+
// TIER 2: PRIVACY / BETA
|
|
206
|
+
// ========================================
|
|
207
|
+
|
|
208
|
+
'privacy.e2e-encryption': {
|
|
209
|
+
id: 'privacy.e2e-encryption',
|
|
210
|
+
name: 'End-to-End Encryption',
|
|
211
|
+
version: '1.0.0',
|
|
212
|
+
description: 'X25519 key exchange + ChaCha20-Poly1305 encryption for all messages',
|
|
213
|
+
category: PluginCategory.PRIVACY,
|
|
214
|
+
tier: PluginTier.STABLE,
|
|
215
|
+
capabilities: [Capability.CRYPTO_ENCRYPT, Capability.CRYPTO_KEYGEN],
|
|
216
|
+
lazyLoad: false,
|
|
217
|
+
configSchema: {
|
|
218
|
+
type: 'object',
|
|
219
|
+
properties: {
|
|
220
|
+
keyRotationInterval: { type: 'number', default: 3600000 }, // 1 hour
|
|
221
|
+
forwardSecrecy: { type: 'boolean', default: true },
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
tags: ['privacy', 'encryption', 'security'],
|
|
225
|
+
},
|
|
226
|
+
|
|
227
|
+
'privacy.onion-routing': {
|
|
228
|
+
id: 'privacy.onion-routing',
|
|
229
|
+
name: 'Onion Routing',
|
|
230
|
+
version: '0.9.0',
|
|
231
|
+
description: 'Tor-style multi-hop routing for anonymity',
|
|
232
|
+
category: PluginCategory.PRIVACY,
|
|
233
|
+
tier: PluginTier.BETA,
|
|
234
|
+
capabilities: [Capability.NETWORK_RELAY, Capability.CRYPTO_ENCRYPT],
|
|
235
|
+
dependencies: ['privacy.e2e-encryption'],
|
|
236
|
+
lazyLoad: true,
|
|
237
|
+
configSchema: {
|
|
238
|
+
type: 'object',
|
|
239
|
+
properties: {
|
|
240
|
+
hopCount: { type: 'number', minimum: 2, maximum: 7, default: 3 },
|
|
241
|
+
circuitLifetime: { type: 'number', default: 600000 }, // 10 minutes
|
|
242
|
+
guardNodes: { type: 'array', default: [] }, // Trusted entry nodes
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
tags: ['privacy', 'anonymity', 'tor'],
|
|
246
|
+
},
|
|
247
|
+
|
|
248
|
+
'privacy.mixnet': {
|
|
249
|
+
id: 'privacy.mixnet',
|
|
250
|
+
name: 'Mixnet Shuffling',
|
|
251
|
+
version: '0.8.0',
|
|
252
|
+
description: 'Traffic analysis resistance via message batching and shuffling',
|
|
253
|
+
category: PluginCategory.PRIVACY,
|
|
254
|
+
tier: PluginTier.BETA,
|
|
255
|
+
capabilities: [Capability.NETWORK_RELAY, Capability.CRYPTO_ENCRYPT],
|
|
256
|
+
lazyLoad: true,
|
|
257
|
+
configSchema: {
|
|
258
|
+
type: 'object',
|
|
259
|
+
properties: {
|
|
260
|
+
batchSize: { type: 'number', default: 10 },
|
|
261
|
+
batchTimeoutMs: { type: 'number', default: 1000 },
|
|
262
|
+
dummyTraffic: { type: 'boolean', default: true },
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
tags: ['privacy', 'anonymity', 'traffic-analysis'],
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
// ========================================
|
|
269
|
+
// TIER 3: CRYPTO / EXPERIMENTAL
|
|
270
|
+
// ========================================
|
|
271
|
+
|
|
272
|
+
'crypto.zk-proofs': {
|
|
273
|
+
id: 'crypto.zk-proofs',
|
|
274
|
+
name: 'Zero-Knowledge Proofs',
|
|
275
|
+
version: '0.5.0',
|
|
276
|
+
description: 'ZK-SNARKs for verifiable computation without revealing inputs',
|
|
277
|
+
category: PluginCategory.CRYPTO,
|
|
278
|
+
tier: PluginTier.EXPERIMENTAL,
|
|
279
|
+
capabilities: [Capability.COMPUTE_WASM, Capability.CRYPTO_SIGN],
|
|
280
|
+
lazyLoad: true,
|
|
281
|
+
configSchema: {
|
|
282
|
+
type: 'object',
|
|
283
|
+
properties: {
|
|
284
|
+
provingSystem: { type: 'string', enum: ['groth16', 'plonk', 'stark'], default: 'groth16' },
|
|
285
|
+
trustedSetup: { type: 'string' }, // Path to trusted setup params
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
tags: ['crypto', 'zk', 'verification'],
|
|
289
|
+
},
|
|
290
|
+
|
|
291
|
+
'crypto.homomorphic': {
|
|
292
|
+
id: 'crypto.homomorphic',
|
|
293
|
+
name: 'Homomorphic Encryption',
|
|
294
|
+
version: '0.3.0',
|
|
295
|
+
description: 'TFHE/BFV schemes for computing on encrypted data',
|
|
296
|
+
category: PluginCategory.CRYPTO,
|
|
297
|
+
tier: PluginTier.RESEARCH,
|
|
298
|
+
capabilities: [Capability.COMPUTE_WASM, Capability.CRYPTO_ENCRYPT],
|
|
299
|
+
lazyLoad: true,
|
|
300
|
+
configSchema: {
|
|
301
|
+
type: 'object',
|
|
302
|
+
properties: {
|
|
303
|
+
scheme: { type: 'string', enum: ['tfhe', 'bfv', 'ckks'], default: 'tfhe' },
|
|
304
|
+
securityLevel: { type: 'number', enum: [128, 192, 256], default: 128 },
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
tags: ['crypto', 'fhe', 'privacy'],
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
'crypto.mpc': {
|
|
311
|
+
id: 'crypto.mpc',
|
|
312
|
+
name: 'Multi-Party Computation',
|
|
313
|
+
version: '0.4.0',
|
|
314
|
+
description: 'Secret sharing and secure computation across multiple nodes',
|
|
315
|
+
category: PluginCategory.CRYPTO,
|
|
316
|
+
tier: PluginTier.EXPERIMENTAL,
|
|
317
|
+
capabilities: [Capability.NETWORK_CONNECT, Capability.CRYPTO_ENCRYPT],
|
|
318
|
+
lazyLoad: true,
|
|
319
|
+
configSchema: {
|
|
320
|
+
type: 'object',
|
|
321
|
+
properties: {
|
|
322
|
+
protocol: { type: 'string', enum: ['shamir', 'bgw', 'spdz'], default: 'shamir' },
|
|
323
|
+
threshold: { type: 'number', default: 2 }, // k-of-n threshold
|
|
324
|
+
partyCount: { type: 'number', default: 3 },
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
tags: ['crypto', 'mpc', 'privacy'],
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
'crypto.threshold-sig': {
|
|
331
|
+
id: 'crypto.threshold-sig',
|
|
332
|
+
name: 'Threshold Signatures',
|
|
333
|
+
version: '0.6.0',
|
|
334
|
+
description: 'N-of-M distributed signing for high-value operations',
|
|
335
|
+
category: PluginCategory.CRYPTO,
|
|
336
|
+
tier: PluginTier.BETA,
|
|
337
|
+
capabilities: [Capability.CRYPTO_SIGN, Capability.CRYPTO_KEYGEN],
|
|
338
|
+
lazyLoad: true,
|
|
339
|
+
configSchema: {
|
|
340
|
+
type: 'object',
|
|
341
|
+
properties: {
|
|
342
|
+
scheme: { type: 'string', enum: ['frost', 'gg20', 'cggmp'], default: 'frost' },
|
|
343
|
+
threshold: { type: 'number', default: 2 },
|
|
344
|
+
parties: { type: 'number', default: 3 },
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
tags: ['crypto', 'signatures', 'distributed'],
|
|
348
|
+
},
|
|
349
|
+
|
|
350
|
+
// ========================================
|
|
351
|
+
// TIER 4: AI/ML
|
|
352
|
+
// ========================================
|
|
353
|
+
|
|
354
|
+
'ai.federated-learning': {
|
|
355
|
+
id: 'ai.federated-learning',
|
|
356
|
+
name: 'Federated Learning',
|
|
357
|
+
version: '0.7.0',
|
|
358
|
+
description: 'Train ML models across nodes without sharing raw data',
|
|
359
|
+
category: PluginCategory.AI,
|
|
360
|
+
tier: PluginTier.BETA,
|
|
361
|
+
capabilities: [Capability.COMPUTE_WASM, Capability.NETWORK_CONNECT],
|
|
362
|
+
lazyLoad: true,
|
|
363
|
+
configSchema: {
|
|
364
|
+
type: 'object',
|
|
365
|
+
properties: {
|
|
366
|
+
aggregationStrategy: { type: 'string', enum: ['fedavg', 'fedprox', 'scaffold'], default: 'fedavg' },
|
|
367
|
+
localEpochs: { type: 'number', default: 5 },
|
|
368
|
+
differentialPrivacy: { type: 'boolean', default: true },
|
|
369
|
+
noiseMultiplier: { type: 'number', default: 1.0 },
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
tags: ['ai', 'ml', 'privacy', 'distributed'],
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
'ai.model-sharding': {
|
|
376
|
+
id: 'ai.model-sharding',
|
|
377
|
+
name: 'Model Sharding',
|
|
378
|
+
version: '0.5.0',
|
|
379
|
+
description: 'Split large LLMs across multiple nodes for distributed inference',
|
|
380
|
+
category: PluginCategory.AI,
|
|
381
|
+
tier: PluginTier.EXPERIMENTAL,
|
|
382
|
+
capabilities: [Capability.COMPUTE_WASM, Capability.COMPUTE_GPU, Capability.NETWORK_CONNECT],
|
|
383
|
+
lazyLoad: true,
|
|
384
|
+
configSchema: {
|
|
385
|
+
type: 'object',
|
|
386
|
+
properties: {
|
|
387
|
+
shardingStrategy: { type: 'string', enum: ['layer', 'tensor', 'pipeline'], default: 'pipeline' },
|
|
388
|
+
minNodes: { type: 'number', default: 2 },
|
|
389
|
+
cacheKV: { type: 'boolean', default: true },
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
tags: ['ai', 'llm', 'distributed', 'inference'],
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
'ai.swarm-intelligence': {
|
|
396
|
+
id: 'ai.swarm-intelligence',
|
|
397
|
+
name: 'Swarm Intelligence',
|
|
398
|
+
version: '0.6.0',
|
|
399
|
+
description: 'Ant colony, particle swarm, and genetic algorithms for optimization',
|
|
400
|
+
category: PluginCategory.AI,
|
|
401
|
+
tier: PluginTier.BETA,
|
|
402
|
+
capabilities: [Capability.COMPUTE_CPU, Capability.NETWORK_CONNECT],
|
|
403
|
+
lazyLoad: true,
|
|
404
|
+
configSchema: {
|
|
405
|
+
type: 'object',
|
|
406
|
+
properties: {
|
|
407
|
+
algorithm: { type: 'string', enum: ['aco', 'pso', 'ga', 'de'], default: 'pso' },
|
|
408
|
+
populationSize: { type: 'number', default: 50 },
|
|
409
|
+
iterations: { type: 'number', default: 100 },
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
tags: ['ai', 'optimization', 'swarm'],
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
// ========================================
|
|
416
|
+
// TIER 5: ECONOMIC
|
|
417
|
+
// ========================================
|
|
418
|
+
|
|
419
|
+
'economic.prediction-markets': {
|
|
420
|
+
id: 'economic.prediction-markets',
|
|
421
|
+
name: 'Prediction Markets',
|
|
422
|
+
version: '0.4.0',
|
|
423
|
+
description: 'Bet on task completion, quality, and timing',
|
|
424
|
+
category: PluginCategory.ECONOMIC,
|
|
425
|
+
tier: PluginTier.EXPERIMENTAL,
|
|
426
|
+
capabilities: [Capability.STORAGE_WRITE, Capability.CRYPTO_SIGN],
|
|
427
|
+
dependencies: ['core.credits'],
|
|
428
|
+
lazyLoad: true,
|
|
429
|
+
configSchema: {
|
|
430
|
+
type: 'object',
|
|
431
|
+
properties: {
|
|
432
|
+
marketMaker: { type: 'string', enum: ['cpmm', 'lmsr'], default: 'cpmm' },
|
|
433
|
+
minStake: { type: 'number', default: 1 },
|
|
434
|
+
resolutionPeriod: { type: 'number', default: 86400000 }, // 24 hours
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
tags: ['economic', 'prediction', 'incentives'],
|
|
438
|
+
},
|
|
439
|
+
|
|
440
|
+
'economic.reputation-staking': {
|
|
441
|
+
id: 'economic.reputation-staking',
|
|
442
|
+
name: 'Reputation Staking',
|
|
443
|
+
version: '0.5.0',
|
|
444
|
+
description: 'Stake credits as collateral, slashed for misbehavior',
|
|
445
|
+
category: PluginCategory.ECONOMIC,
|
|
446
|
+
tier: PluginTier.BETA,
|
|
447
|
+
capabilities: [Capability.STORAGE_WRITE, Capability.CRYPTO_SIGN],
|
|
448
|
+
dependencies: ['core.credits'],
|
|
449
|
+
lazyLoad: true,
|
|
450
|
+
configSchema: {
|
|
451
|
+
type: 'object',
|
|
452
|
+
properties: {
|
|
453
|
+
minStake: { type: 'number', default: 10 },
|
|
454
|
+
slashRate: { type: 'number', default: 0.1 }, // 10% slash
|
|
455
|
+
unbondingPeriod: { type: 'number', default: 604800000 }, // 7 days
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
tags: ['economic', 'reputation', 'staking'],
|
|
459
|
+
},
|
|
460
|
+
|
|
461
|
+
'economic.compute-amm': {
|
|
462
|
+
id: 'economic.compute-amm',
|
|
463
|
+
name: 'Compute AMM',
|
|
464
|
+
version: '0.3.0',
|
|
465
|
+
description: 'Automated market maker for compute resource pricing',
|
|
466
|
+
category: PluginCategory.ECONOMIC,
|
|
467
|
+
tier: PluginTier.RESEARCH,
|
|
468
|
+
capabilities: [Capability.STORAGE_WRITE, Capability.CRYPTO_SIGN],
|
|
469
|
+
lazyLoad: true,
|
|
470
|
+
configSchema: {
|
|
471
|
+
type: 'object',
|
|
472
|
+
properties: {
|
|
473
|
+
curveType: { type: 'string', enum: ['constant-product', 'stable', 'concentrated'], default: 'constant-product' },
|
|
474
|
+
feeRate: { type: 'number', default: 0.003 }, // 0.3%
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
tags: ['economic', 'amm', 'defi'],
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
// ========================================
|
|
481
|
+
// TIER 6: EXOTIC / RESEARCH
|
|
482
|
+
// ========================================
|
|
483
|
+
|
|
484
|
+
'exotic.proof-of-useful-work': {
|
|
485
|
+
id: 'exotic.proof-of-useful-work',
|
|
486
|
+
name: 'Proof of Useful Work',
|
|
487
|
+
version: '0.2.0',
|
|
488
|
+
description: 'Consensus where mining = real computation tasks',
|
|
489
|
+
category: PluginCategory.EXOTIC,
|
|
490
|
+
tier: PluginTier.RESEARCH,
|
|
491
|
+
capabilities: [Capability.COMPUTE_CPU, Capability.COMPUTE_WASM, Capability.CRYPTO_SIGN],
|
|
492
|
+
lazyLoad: true,
|
|
493
|
+
configSchema: {
|
|
494
|
+
type: 'object',
|
|
495
|
+
properties: {
|
|
496
|
+
difficultyAdjustment: { type: 'number', default: 2016 }, // blocks
|
|
497
|
+
blockTime: { type: 'number', default: 60000 }, // 1 minute target
|
|
498
|
+
taskVerification: { type: 'string', enum: ['probabilistic', 'deterministic', 'zk'], default: 'probabilistic' },
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
tags: ['exotic', 'consensus', 'mining'],
|
|
502
|
+
},
|
|
503
|
+
|
|
504
|
+
'exotic.vdf': {
|
|
505
|
+
id: 'exotic.vdf',
|
|
506
|
+
name: 'Verifiable Delay Functions',
|
|
507
|
+
version: '0.3.0',
|
|
508
|
+
description: 'Time-lock puzzles for randomness and fair ordering',
|
|
509
|
+
category: PluginCategory.EXOTIC,
|
|
510
|
+
tier: PluginTier.RESEARCH,
|
|
511
|
+
capabilities: [Capability.COMPUTE_WASM],
|
|
512
|
+
lazyLoad: true,
|
|
513
|
+
configSchema: {
|
|
514
|
+
type: 'object',
|
|
515
|
+
properties: {
|
|
516
|
+
construction: { type: 'string', enum: ['wesolowski', 'pietrzak'], default: 'wesolowski' },
|
|
517
|
+
securityParameter: { type: 'number', default: 2048 },
|
|
518
|
+
targetDelay: { type: 'number', default: 10000 }, // 10 seconds
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
tags: ['exotic', 'vdf', 'randomness'],
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
'exotic.tee-enclave': {
|
|
525
|
+
id: 'exotic.tee-enclave',
|
|
526
|
+
name: 'TEE Enclaves',
|
|
527
|
+
version: '0.2.0',
|
|
528
|
+
description: 'Intel SGX / ARM TrustZone hardware-protected execution',
|
|
529
|
+
category: PluginCategory.EXOTIC,
|
|
530
|
+
tier: PluginTier.RESEARCH,
|
|
531
|
+
capabilities: [Capability.COMPUTE_CPU, Capability.SYSTEM_EXEC],
|
|
532
|
+
lazyLoad: true,
|
|
533
|
+
configSchema: {
|
|
534
|
+
type: 'object',
|
|
535
|
+
properties: {
|
|
536
|
+
platform: { type: 'string', enum: ['sgx', 'trustzone', 'sev'], default: 'sgx' },
|
|
537
|
+
attestation: { type: 'boolean', default: true },
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
tags: ['exotic', 'tee', 'hardware', 'security'],
|
|
541
|
+
},
|
|
542
|
+
|
|
543
|
+
'exotic.quantum-sim': {
|
|
544
|
+
id: 'exotic.quantum-sim',
|
|
545
|
+
name: 'Quantum Circuit Simulator',
|
|
546
|
+
version: '0.1.0',
|
|
547
|
+
description: 'Simulate quantum algorithms on classical hardware',
|
|
548
|
+
category: PluginCategory.EXOTIC,
|
|
549
|
+
tier: PluginTier.RESEARCH,
|
|
550
|
+
capabilities: [Capability.COMPUTE_WASM, Capability.COMPUTE_GPU],
|
|
551
|
+
lazyLoad: true,
|
|
552
|
+
configSchema: {
|
|
553
|
+
type: 'object',
|
|
554
|
+
properties: {
|
|
555
|
+
maxQubits: { type: 'number', default: 20 },
|
|
556
|
+
backend: { type: 'string', enum: ['statevector', 'density', 'mps'], default: 'statevector' },
|
|
557
|
+
noise: { type: 'boolean', default: false },
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
tags: ['exotic', 'quantum', 'simulation'],
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
'exotic.cellular-automata': {
|
|
564
|
+
id: 'exotic.cellular-automata',
|
|
565
|
+
name: 'Cellular Automata',
|
|
566
|
+
version: '0.2.0',
|
|
567
|
+
description: 'Emergent computation via rule-based cell evolution',
|
|
568
|
+
category: PluginCategory.EXOTIC,
|
|
569
|
+
tier: PluginTier.RESEARCH,
|
|
570
|
+
capabilities: [Capability.COMPUTE_WASM],
|
|
571
|
+
lazyLoad: true,
|
|
572
|
+
configSchema: {
|
|
573
|
+
type: 'object',
|
|
574
|
+
properties: {
|
|
575
|
+
rule: { type: 'number', default: 110 }, // Rule 110 is Turing complete
|
|
576
|
+
dimensions: { type: 'number', enum: [1, 2, 3], default: 2 },
|
|
577
|
+
gridSize: { type: 'number', default: 256 },
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
tags: ['exotic', 'automata', 'emergent'],
|
|
581
|
+
},
|
|
582
|
+
|
|
583
|
+
'network.satellite': {
|
|
584
|
+
id: 'network.satellite',
|
|
585
|
+
name: 'Satellite Connectivity',
|
|
586
|
+
version: '0.2.0',
|
|
587
|
+
description: 'Starlink/Iridium fallback for remote or censored regions',
|
|
588
|
+
category: PluginCategory.NETWORK,
|
|
589
|
+
tier: PluginTier.EXPERIMENTAL,
|
|
590
|
+
capabilities: [Capability.NETWORK_CONNECT, Capability.SYSTEM_EXEC],
|
|
591
|
+
lazyLoad: true,
|
|
592
|
+
configSchema: {
|
|
593
|
+
type: 'object',
|
|
594
|
+
properties: {
|
|
595
|
+
provider: { type: 'string', enum: ['starlink', 'iridium', 'viasat'], default: 'starlink' },
|
|
596
|
+
fallbackOnly: { type: 'boolean', default: true },
|
|
597
|
+
maxLatencyMs: { type: 'number', default: 1000 },
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
tags: ['network', 'satellite', 'resilience'],
|
|
601
|
+
},
|
|
602
|
+
|
|
603
|
+
'network.lora-mesh': {
|
|
604
|
+
id: 'network.lora-mesh',
|
|
605
|
+
name: 'LoRa Mesh Network',
|
|
606
|
+
version: '0.1.0',
|
|
607
|
+
description: 'Low-power radio mesh for IoT and off-grid deployments',
|
|
608
|
+
category: PluginCategory.NETWORK,
|
|
609
|
+
tier: PluginTier.RESEARCH,
|
|
610
|
+
capabilities: [Capability.NETWORK_CONNECT, Capability.SYSTEM_EXEC],
|
|
611
|
+
lazyLoad: true,
|
|
612
|
+
configSchema: {
|
|
613
|
+
type: 'object',
|
|
614
|
+
properties: {
|
|
615
|
+
frequency: { type: 'number', default: 915 }, // MHz (US)
|
|
616
|
+
spreadingFactor: { type: 'number', enum: [7, 8, 9, 10, 11, 12], default: 10 },
|
|
617
|
+
maxHops: { type: 'number', default: 5 },
|
|
618
|
+
},
|
|
619
|
+
},
|
|
620
|
+
tags: ['network', 'lora', 'iot', 'mesh'],
|
|
621
|
+
},
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
// ============================================
|
|
625
|
+
// PLUGIN BUNDLES (Pre-configured sets)
|
|
626
|
+
// ============================================
|
|
627
|
+
|
|
628
|
+
export const PLUGIN_BUNDLES = {
|
|
629
|
+
'minimal': {
|
|
630
|
+
name: 'Minimal',
|
|
631
|
+
description: 'Core functionality only',
|
|
632
|
+
plugins: [],
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
'standard': {
|
|
636
|
+
name: 'Standard',
|
|
637
|
+
description: 'Recommended for most users',
|
|
638
|
+
plugins: [
|
|
639
|
+
'core.compression',
|
|
640
|
+
'network.multi-transport',
|
|
641
|
+
'privacy.e2e-encryption',
|
|
642
|
+
'storage.indexed-db',
|
|
643
|
+
],
|
|
644
|
+
},
|
|
645
|
+
|
|
646
|
+
'privacy-focused': {
|
|
647
|
+
name: 'Privacy Focused',
|
|
648
|
+
description: 'Maximum privacy and anonymity',
|
|
649
|
+
plugins: [
|
|
650
|
+
'privacy.e2e-encryption',
|
|
651
|
+
'privacy.onion-routing',
|
|
652
|
+
'privacy.mixnet',
|
|
653
|
+
'crypto.zk-proofs',
|
|
654
|
+
],
|
|
655
|
+
},
|
|
656
|
+
|
|
657
|
+
'ai-compute': {
|
|
658
|
+
name: 'AI Compute',
|
|
659
|
+
description: 'Optimized for AI/ML workloads',
|
|
660
|
+
plugins: [
|
|
661
|
+
'core.compression',
|
|
662
|
+
'ai.federated-learning',
|
|
663
|
+
'ai.model-sharding',
|
|
664
|
+
'ai.swarm-intelligence',
|
|
665
|
+
],
|
|
666
|
+
},
|
|
667
|
+
|
|
668
|
+
'resilient': {
|
|
669
|
+
name: 'Resilient',
|
|
670
|
+
description: 'Maximum uptime and connectivity',
|
|
671
|
+
plugins: [
|
|
672
|
+
'network.multi-transport',
|
|
673
|
+
'network.satellite',
|
|
674
|
+
'storage.indexed-db',
|
|
675
|
+
'core.compression',
|
|
676
|
+
],
|
|
677
|
+
},
|
|
678
|
+
|
|
679
|
+
'economic': {
|
|
680
|
+
name: 'Economic',
|
|
681
|
+
description: 'Full incentive mechanisms',
|
|
682
|
+
plugins: [
|
|
683
|
+
'economic.prediction-markets',
|
|
684
|
+
'economic.reputation-staking',
|
|
685
|
+
'economic.compute-amm',
|
|
686
|
+
],
|
|
687
|
+
},
|
|
688
|
+
|
|
689
|
+
'experimental': {
|
|
690
|
+
name: 'Experimental',
|
|
691
|
+
description: 'Bleeding edge features (unstable)',
|
|
692
|
+
plugins: [
|
|
693
|
+
'crypto.homomorphic',
|
|
694
|
+
'crypto.mpc',
|
|
695
|
+
'exotic.proof-of-useful-work',
|
|
696
|
+
'exotic.vdf',
|
|
697
|
+
'exotic.quantum-sim',
|
|
698
|
+
],
|
|
699
|
+
},
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
export default PLUGIN_CATALOG;
|