@a0n/aeon 5.0.1 → 5.0.2
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/dist/AeonEventEmitter-B1DzaYFk.d.cts +23 -0
- package/dist/AeonEventEmitter-B1DzaYFk.d.ts +23 -0
- package/dist/compression/index.d.cts +1 -1
- package/dist/compression/index.d.ts +1 -1
- package/dist/core/index.cjs +89 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -212
- package/dist/core/index.d.ts +2 -212
- package/dist/core/index.js +88 -0
- package/dist/core/index.js.map +1 -1
- package/dist/distributed/index.cjs +88 -4
- package/dist/distributed/index.cjs.map +1 -1
- package/dist/distributed/index.d.cts +2 -2
- package/dist/distributed/index.d.ts +2 -2
- package/dist/distributed/index.js +88 -4
- package/dist/distributed/index.js.map +1 -1
- package/dist/index.cjs +98 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +98 -5
- package/dist/index.js.map +1 -1
- package/dist/offline/index.cjs +88 -4
- package/dist/offline/index.cjs.map +1 -1
- package/dist/offline/index.d.cts +3 -3
- package/dist/offline/index.d.ts +3 -3
- package/dist/offline/index.js +88 -4
- package/dist/offline/index.js.map +1 -1
- package/dist/optimization/index.d.cts +1 -1
- package/dist/optimization/index.d.ts +1 -1
- package/dist/presence/index.cjs +88 -4
- package/dist/presence/index.cjs.map +1 -1
- package/dist/presence/index.d.cts +2 -2
- package/dist/presence/index.d.ts +2 -2
- package/dist/presence/index.js +88 -4
- package/dist/presence/index.js.map +1 -1
- package/dist/types-Bj5EbkSK.d.cts +212 -0
- package/dist/types-Bj5EbkSK.d.ts +212 -0
- package/package.json +15 -17
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { BandwidthProfile, CRDTOperation, ConflictDetectionResult, EventCallback, EventUnsubscribe, IEventEmitter, NetworkState, Operation, OperationPriority, OperationStatus, OperationType, PresenceEmotion, PresenceInfo, PresenceInputState, PresenceScroll, PresenceSelection, PresenceTyping, PresenceViewport, ResolutionStrategy, SyncBatch, SyncCoordinatorConfig, SyncResult, VectorClock } from './
|
|
1
|
+
export { B as BandwidthProfile, C as CRDTOperation, a as ConflictDetectionResult, E as EventCallback, b as EventUnsubscribe, I as IEventEmitter, N as NetworkState, O as Operation, c as OperationPriority, d as OperationStatus, e as OperationType, P as PresenceEmotion, f as PresenceInfo, g as PresenceInputState, h as PresenceScroll, i as PresenceSelection, j as PresenceTyping, k as PresenceViewport, R as ResolutionStrategy, S as SyncBatch, l as SyncCoordinatorConfig, m as SyncResult, V as VectorClock } from './types-Bj5EbkSK.cjs';
|
|
2
|
+
export { A as AeonEventEmitter, a as AeonEventMap } from './AeonEventEmitter-B1DzaYFk.cjs';
|
|
2
3
|
export { Logger, createNamespacedLogger, disableLogging, getLogger, logger, resetLogger, setLogger } from './utils/index.cjs';
|
|
3
4
|
export { DashStorageAdapter, DashStorageAdapterHooks, DashStorageAdapterOptions, DashStorageBackend, DashStorageChange, DashSyncClient, DashSyncRule, DashSyncRules, DashSyncUrgency, InMemoryStorageAdapter } from './persistence/index.cjs';
|
|
4
5
|
export { P as PersistedEnvelope, a as PersistenceDeserializer, b as PersistenceSerializer, S as StorageAdapter } from './types-CMxO7QF0.cjs';
|
|
@@ -10,7 +11,6 @@ export { ActivityPattern, AdaptiveCompressionOptimizer, AdaptiveStats, BatchTimi
|
|
|
10
11
|
export { AgentEmotionState, AgentInputState, AgentPresence, AgentPresenceManager, AgentScrollState, AgentSelectionRange, AgentTypingState, AgentViewportState, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.cjs';
|
|
11
12
|
export { A as AEON_CAPABILITIES, a as AeonCapability, b as AeonCapabilityResult, c as AeonCryptoConfig, d as AeonEncryptionMode, e as AuthenticatedMessageFields, C as Capability, D as DEFAULT_CRYPTO_CONFIG, f as DID, g as DecryptionResult, h as DomainCategory, E as ECKeyPair, i as EncryptedPayload, j as EncryptionAlgorithm, I as ICryptoProvider, k as Identity, K as KeyPair, N as NullCryptoProvider, S as SecureNodeInfo, l as SecureSyncSession, m as SignedSyncData, n as SigningAlgorithm, U as UCANPayload, o as UCANToken, V as VerificationResult } from './CryptoProvider-SLWjqByk.cjs';
|
|
12
13
|
export { ITransactionSigner, NullTransactionSigner, TransactionSignerErrorCode, TransactionSignerExecuteRequest, TransactionSignerExecuteResponse, TransactionSignerHealth, TransactionSignerMetadata, TransactionSignerPayloadMap, createTransactionSignerAdapter } from './crypto/index.cjs';
|
|
13
|
-
import 'eventemitter3';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Aeon Flow Protocol — Type Definitions
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { BandwidthProfile, CRDTOperation, ConflictDetectionResult, EventCallback, EventUnsubscribe, IEventEmitter, NetworkState, Operation, OperationPriority, OperationStatus, OperationType, PresenceEmotion, PresenceInfo, PresenceInputState, PresenceScroll, PresenceSelection, PresenceTyping, PresenceViewport, ResolutionStrategy, SyncBatch, SyncCoordinatorConfig, SyncResult, VectorClock } from './
|
|
1
|
+
export { B as BandwidthProfile, C as CRDTOperation, a as ConflictDetectionResult, E as EventCallback, b as EventUnsubscribe, I as IEventEmitter, N as NetworkState, O as Operation, c as OperationPriority, d as OperationStatus, e as OperationType, P as PresenceEmotion, f as PresenceInfo, g as PresenceInputState, h as PresenceScroll, i as PresenceSelection, j as PresenceTyping, k as PresenceViewport, R as ResolutionStrategy, S as SyncBatch, l as SyncCoordinatorConfig, m as SyncResult, V as VectorClock } from './types-Bj5EbkSK.js';
|
|
2
|
+
export { A as AeonEventEmitter, a as AeonEventMap } from './AeonEventEmitter-B1DzaYFk.js';
|
|
2
3
|
export { Logger, createNamespacedLogger, disableLogging, getLogger, logger, resetLogger, setLogger } from './utils/index.js';
|
|
3
4
|
export { DashStorageAdapter, DashStorageAdapterHooks, DashStorageAdapterOptions, DashStorageBackend, DashStorageChange, DashSyncClient, DashSyncRule, DashSyncRules, DashSyncUrgency, InMemoryStorageAdapter } from './persistence/index.js';
|
|
4
5
|
export { P as PersistedEnvelope, a as PersistenceDeserializer, b as PersistenceSerializer, S as StorageAdapter } from './types-CMxO7QF0.js';
|
|
@@ -10,7 +11,6 @@ export { ActivityPattern, AdaptiveCompressionOptimizer, AdaptiveStats, BatchTimi
|
|
|
10
11
|
export { AgentEmotionState, AgentInputState, AgentPresence, AgentPresenceManager, AgentScrollState, AgentSelectionRange, AgentTypingState, AgentViewportState, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.js';
|
|
11
12
|
export { A as AEON_CAPABILITIES, a as AeonCapability, b as AeonCapabilityResult, c as AeonCryptoConfig, d as AeonEncryptionMode, e as AuthenticatedMessageFields, C as Capability, D as DEFAULT_CRYPTO_CONFIG, f as DID, g as DecryptionResult, h as DomainCategory, E as ECKeyPair, i as EncryptedPayload, j as EncryptionAlgorithm, I as ICryptoProvider, k as Identity, K as KeyPair, N as NullCryptoProvider, S as SecureNodeInfo, l as SecureSyncSession, m as SignedSyncData, n as SigningAlgorithm, U as UCANPayload, o as UCANToken, V as VerificationResult } from './CryptoProvider-SLWjqByk.js';
|
|
12
13
|
export { ITransactionSigner, NullTransactionSigner, TransactionSignerErrorCode, TransactionSignerExecuteRequest, TransactionSignerExecuteResponse, TransactionSignerHealth, TransactionSignerMetadata, TransactionSignerPayloadMap, createTransactionSignerAdapter } from './crypto/index.js';
|
|
13
|
-
import 'eventemitter3';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Aeon Flow Protocol — Type Definitions
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventEmitter } from 'eventemitter3';
|
|
2
1
|
import { createHash } from 'crypto';
|
|
3
2
|
|
|
4
3
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -8,6 +7,94 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
8
7
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
9
8
|
});
|
|
10
9
|
|
|
10
|
+
// src/core/AeonEventEmitter.ts
|
|
11
|
+
var AeonEventEmitter = class {
|
|
12
|
+
listenerMap = /* @__PURE__ */ new Map();
|
|
13
|
+
on(event, fn, context) {
|
|
14
|
+
return this.registerListener(event, fn, context, false);
|
|
15
|
+
}
|
|
16
|
+
addListener(event, fn, context) {
|
|
17
|
+
return this.registerListener(event, fn, context, false);
|
|
18
|
+
}
|
|
19
|
+
once(event, fn, context) {
|
|
20
|
+
return this.registerListener(event, fn, context, true);
|
|
21
|
+
}
|
|
22
|
+
off(event, fn, context, once) {
|
|
23
|
+
return this.removeListener(event, fn, context, once);
|
|
24
|
+
}
|
|
25
|
+
removeListener(event, fn, context, once) {
|
|
26
|
+
const listeners = this.listenerMap.get(event);
|
|
27
|
+
if (!listeners) {
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
if (!fn) {
|
|
31
|
+
this.listenerMap.delete(event);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
const retained = listeners.filter(
|
|
35
|
+
(listener) => listener.fn !== fn || once === true && listener.once !== true || context !== void 0 && listener.context !== context
|
|
36
|
+
);
|
|
37
|
+
if (retained.length === 0) {
|
|
38
|
+
this.listenerMap.delete(event);
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
this.listenerMap.set(
|
|
42
|
+
event,
|
|
43
|
+
retained
|
|
44
|
+
);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
removeAllListeners(event) {
|
|
48
|
+
if (event === void 0) {
|
|
49
|
+
this.listenerMap.clear();
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
this.listenerMap.delete(event);
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
emit(event, ...args) {
|
|
56
|
+
const listeners = this.listenerMap.get(event);
|
|
57
|
+
if (!listeners || listeners.length === 0) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
for (const listener of [...listeners]) {
|
|
61
|
+
if (listener.once) {
|
|
62
|
+
this.removeListener(event, listener.fn, listener.context, true);
|
|
63
|
+
}
|
|
64
|
+
listener.fn.apply(listener.context, args);
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
eventNames() {
|
|
69
|
+
return Array.from(this.listenerMap.keys());
|
|
70
|
+
}
|
|
71
|
+
listeners(event) {
|
|
72
|
+
return this.listenerMap.get(event)?.map((listener) => listener.fn) ?? [];
|
|
73
|
+
}
|
|
74
|
+
listenerCount(event) {
|
|
75
|
+
return this.listenerMap.get(event)?.length ?? 0;
|
|
76
|
+
}
|
|
77
|
+
subscribe(event, fn, context) {
|
|
78
|
+
this.on(event, fn, context);
|
|
79
|
+
return () => {
|
|
80
|
+
this.off(event, fn, context);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
registerListener(event, fn, context, once) {
|
|
84
|
+
if (typeof fn !== "function") {
|
|
85
|
+
throw new TypeError("The listener must be a function");
|
|
86
|
+
}
|
|
87
|
+
const listeners = this.listenerMap.get(event) ?? [];
|
|
88
|
+
listeners.push({
|
|
89
|
+
fn,
|
|
90
|
+
context: context || this,
|
|
91
|
+
once
|
|
92
|
+
});
|
|
93
|
+
this.listenerMap.set(event, listeners);
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
11
98
|
// src/utils/logger.ts
|
|
12
99
|
var consoleLogger = {
|
|
13
100
|
debug: (...args) => {
|
|
@@ -1392,7 +1479,9 @@ var MigrationTracker = class _MigrationTracker {
|
|
|
1392
1479
|
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
1393
1480
|
}
|
|
1394
1481
|
};
|
|
1395
|
-
|
|
1482
|
+
|
|
1483
|
+
// src/distributed/SyncCoordinator.ts
|
|
1484
|
+
var SyncCoordinator = class _SyncCoordinator extends AeonEventEmitter {
|
|
1396
1485
|
static MAX_SYNC_EVENTS = 1e4;
|
|
1397
1486
|
nodes = /* @__PURE__ */ new Map();
|
|
1398
1487
|
sessions = /* @__PURE__ */ new Map();
|
|
@@ -3937,8 +4026,10 @@ var RecoveryLedger = class _RecoveryLedger {
|
|
|
3937
4026
|
}
|
|
3938
4027
|
}
|
|
3939
4028
|
};
|
|
4029
|
+
|
|
4030
|
+
// src/offline/OfflineOperationQueue.ts
|
|
3940
4031
|
var logger2 = getLogger();
|
|
3941
|
-
var OfflineOperationQueue = class _OfflineOperationQueue extends
|
|
4032
|
+
var OfflineOperationQueue = class _OfflineOperationQueue extends AeonEventEmitter {
|
|
3942
4033
|
static DEFAULT_PERSIST_KEY = "aeon:offline-queue:v1";
|
|
3943
4034
|
queue = /* @__PURE__ */ new Map();
|
|
3944
4035
|
syncingIds = /* @__PURE__ */ new Set();
|
|
@@ -6486,8 +6577,10 @@ function getAdaptiveCompressionOptimizer() {
|
|
|
6486
6577
|
function resetAdaptiveCompressionOptimizer() {
|
|
6487
6578
|
adaptiveOptimizerInstance = null;
|
|
6488
6579
|
}
|
|
6580
|
+
|
|
6581
|
+
// src/presence/AgentPresenceManager.ts
|
|
6489
6582
|
var logger8 = getLogger();
|
|
6490
|
-
var AgentPresenceManager = class extends
|
|
6583
|
+
var AgentPresenceManager = class extends AeonEventEmitter {
|
|
6491
6584
|
presences = /* @__PURE__ */ new Map();
|
|
6492
6585
|
sessionId;
|
|
6493
6586
|
heartbeatInterval = null;
|
|
@@ -10823,6 +10916,6 @@ var useAeonPage = (() => {
|
|
|
10823
10916
|
);
|
|
10824
10917
|
});
|
|
10825
10918
|
|
|
10826
|
-
export { ACK_FLAG, AEON_CAPABILITIES, AEON_FLOW_RX_UUID, AEON_FLOW_SERVICE_UUID, AEON_FLOW_TX_UUID, AEON_USB_INTERFACE_CLASS, AEON_USB_PROTOCOL, AEON_USB_SUBCLASS, AdaptiveCompressionOptimizer, AeonFlowProtocol, AgentPresenceManager, BUILTIN_CODECS, BatchTimingOptimizer, BluetoothFlowTransport, BrotliCodec, ChildProcessFlowTransport, CompressionEngine, DEFAULT_CRYPTO_CONFIG, DEFAULT_FLOW_CONFIG, DEFAULT_SPECULATION_BUDGET, DashRelayFlowTransport, DashStorageAdapter, DataTransformer, DeltaCodec, DeltaSyncOptimizer, DictionaryCodec, FIN, FOLD, FORK, FRAGMENT_HEADER_SIZE, FederatedInferenceCoordinator, FlowCodec, FrameReassembler, GNOSIS_IMPOSSIBLE_SYSTEM_TOPOLOGIES, GzipCodec, HEADER_SIZE, HTTPAeonBridge, HuffmanCodec, InMemoryStorageAdapter, LZ77Codec, Link, MAX_FRAGMENT_PAYLOAD, MAX_PAYLOAD_LENGTH, MessagePortFlowTransport, MigrationEngine, MigrationTracker, NullCryptoProvider, NullTransactionSigner, OfflineOperationQueue, POISON, PURE_JS_CODECS, PrefetchingEngine, RACE, RLECodec, RawCodec, RecoveryLedger, ReplicationManager, SchemaVersionManager, StateReconciler, SyncCoordinator, SyncProtocol, TCPFlowTransport, TopologicalCompressor, TopologyAnalyzer, TopologySampler, UDPFlowTransport, UDP_MTU, USBFlowTransport, VENT, WebRTCFlowTransport, WebTransportFlowTransport, adaptiveParallelismPolicy, beta2FromBandGap, canonicalizeFeatureFlags, classifyPipelineRegime, clearAgentPresenceManager, computeProjectionCacheKey, connectTCPFlow, createDashRelayFlow, createIPCPair, createNamespacedLogger, createP2PFlow, createProjectionArtifactId, createTransactionSignerAdapter, decodeHTTPRequest, decodeHTTPResponse, disableLogging, encodeHTTPRequest, encodeHTTPResponse, firstLawConserved, frontierFill, getAdaptiveCompressionOptimizer, getAgentPresenceManager, getBatchTimingOptimizer, getCodecById, getCompressionEngine, getDeltaSyncOptimizer, getGnosisImpossibleSystemTopology, getLogger, getOfflineOperationQueue, getPrefetchingEngine, listenTCPFlow, logger, matchesRequestGuard, normalizeRequestSignature, pipelineOccupancy, protocolDeficits, quantumDeficitIdentity, requestSignatureKey, resetAdaptiveCompressionOptimizer, resetBatchTimingOptimizer, resetCompressionEngine, resetDeltaSyncOptimizer, resetLogger, resetOfflineOperationQueue, resetPrefetchingEngine, setLogger, settlementDeficits, speculativeTreeExpectedAccepted, stableContentHash, turbulentIdleFraction, useAeonPage, worthingtonWhipSavings };
|
|
10919
|
+
export { ACK_FLAG, AEON_CAPABILITIES, AEON_FLOW_RX_UUID, AEON_FLOW_SERVICE_UUID, AEON_FLOW_TX_UUID, AEON_USB_INTERFACE_CLASS, AEON_USB_PROTOCOL, AEON_USB_SUBCLASS, AdaptiveCompressionOptimizer, AeonEventEmitter, AeonFlowProtocol, AgentPresenceManager, BUILTIN_CODECS, BatchTimingOptimizer, BluetoothFlowTransport, BrotliCodec, ChildProcessFlowTransport, CompressionEngine, DEFAULT_CRYPTO_CONFIG, DEFAULT_FLOW_CONFIG, DEFAULT_SPECULATION_BUDGET, DashRelayFlowTransport, DashStorageAdapter, DataTransformer, DeltaCodec, DeltaSyncOptimizer, DictionaryCodec, FIN, FOLD, FORK, FRAGMENT_HEADER_SIZE, FederatedInferenceCoordinator, FlowCodec, FrameReassembler, GNOSIS_IMPOSSIBLE_SYSTEM_TOPOLOGIES, GzipCodec, HEADER_SIZE, HTTPAeonBridge, HuffmanCodec, InMemoryStorageAdapter, LZ77Codec, Link, MAX_FRAGMENT_PAYLOAD, MAX_PAYLOAD_LENGTH, MessagePortFlowTransport, MigrationEngine, MigrationTracker, NullCryptoProvider, NullTransactionSigner, OfflineOperationQueue, POISON, PURE_JS_CODECS, PrefetchingEngine, RACE, RLECodec, RawCodec, RecoveryLedger, ReplicationManager, SchemaVersionManager, StateReconciler, SyncCoordinator, SyncProtocol, TCPFlowTransport, TopologicalCompressor, TopologyAnalyzer, TopologySampler, UDPFlowTransport, UDP_MTU, USBFlowTransport, VENT, WebRTCFlowTransport, WebTransportFlowTransport, adaptiveParallelismPolicy, beta2FromBandGap, canonicalizeFeatureFlags, classifyPipelineRegime, clearAgentPresenceManager, computeProjectionCacheKey, connectTCPFlow, createDashRelayFlow, createIPCPair, createNamespacedLogger, createP2PFlow, createProjectionArtifactId, createTransactionSignerAdapter, decodeHTTPRequest, decodeHTTPResponse, disableLogging, encodeHTTPRequest, encodeHTTPResponse, firstLawConserved, frontierFill, getAdaptiveCompressionOptimizer, getAgentPresenceManager, getBatchTimingOptimizer, getCodecById, getCompressionEngine, getDeltaSyncOptimizer, getGnosisImpossibleSystemTopology, getLogger, getOfflineOperationQueue, getPrefetchingEngine, listenTCPFlow, logger, matchesRequestGuard, normalizeRequestSignature, pipelineOccupancy, protocolDeficits, quantumDeficitIdentity, requestSignatureKey, resetAdaptiveCompressionOptimizer, resetBatchTimingOptimizer, resetCompressionEngine, resetDeltaSyncOptimizer, resetLogger, resetOfflineOperationQueue, resetPrefetchingEngine, setLogger, settlementDeficits, speculativeTreeExpectedAccepted, stableContentHash, turbulentIdleFraction, useAeonPage, worthingtonWhipSavings };
|
|
10827
10920
|
//# sourceMappingURL=index.js.map
|
|
10828
10921
|
//# sourceMappingURL=index.js.map
|