@affectively/aeon 1.1.0 → 1.2.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/dist/core/index.d.cts +70 -5
- package/dist/core/index.d.ts +70 -5
- package/dist/index.cjs +151 -0
- 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 +151 -0
- package/dist/index.js.map +1 -1
- package/dist/presence/index.cjs +151 -0
- package/dist/presence/index.cjs.map +1 -1
- package/dist/presence/index.d.cts +116 -1
- package/dist/presence/index.d.ts +116 -1
- package/dist/presence/index.js +151 -0
- package/dist/presence/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BandwidthProfile, CRDTOperation, ConflictDetectionResult, EventCallback, EventUnsubscribe, IEventEmitter, NetworkState, Operation, OperationPriority, OperationStatus, OperationType, PresenceInfo, ResolutionStrategy, SyncBatch, SyncCoordinatorConfig, SyncResult, VectorClock } from './core/index.cjs';
|
|
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 './core/index.cjs';
|
|
2
2
|
export { Logger, createNamespacedLogger, disableLogging, getLogger, logger, resetLogger, setLogger } from './utils/index.cjs';
|
|
3
3
|
export { DashStorageAdapter, DashStorageAdapterOptions, DashStorageBackend, DashStorageChange, DashSyncClient, InMemoryStorageAdapter } from './persistence/index.cjs';
|
|
4
4
|
export { P as PersistedEnvelope, a as PersistenceDeserializer, b as PersistenceSerializer, S as StorageAdapter } from './types-CMxO7QF0.cjs';
|
|
@@ -7,6 +7,6 @@ export { Handshake, MergeStrategy, ProtocolError, ReconciliationResult, Replica,
|
|
|
7
7
|
export { OfflineOperation, OfflineOperationQueue, OfflineOperationQueueOptions, OfflineQueueEvents, OfflineQueuePersistenceConfig, OfflineQueueStats, getOfflineOperationQueue, resetOfflineOperationQueue } from './offline/index.cjs';
|
|
8
8
|
export { CompressedBatch, CompressedChunk, CompressionEngine, CompressionStats, DeltaBatch, DeltaOperation, DeltaStats, DeltaSyncOptimizer, getCompressionEngine, getDeltaSyncOptimizer, resetCompressionEngine, resetDeltaSyncOptimizer } from './compression/index.cjs';
|
|
9
9
|
export { ActivityPattern, AdaptiveCompressionOptimizer, AdaptiveStats, BatchTimingOptimizer, BatchTimingStats, CompressionRecommendation, DeviceProfile, NetworkProfile, NetworkWindow, OperationPattern, OperationPrediction, PrefetchedBatch, PrefetchingEngine, PrefetchingStats, SchedulingDecision, getAdaptiveCompressionOptimizer, getBatchTimingOptimizer, getPrefetchingEngine, resetAdaptiveCompressionOptimizer, resetBatchTimingOptimizer, resetPrefetchingEngine } from './optimization/index.cjs';
|
|
10
|
-
export { AgentPresence, AgentPresenceManager, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.cjs';
|
|
10
|
+
export { AgentEmotionState, AgentInputState, AgentPresence, AgentPresenceManager, AgentScrollState, AgentSelectionRange, AgentTypingState, AgentViewportState, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.cjs';
|
|
11
11
|
export { AEON_CAPABILITIES, AeonCapability, AeonCapabilityResult, AeonCryptoConfig, AeonEncryptionMode, AuthenticatedMessageFields, Capability, DEFAULT_CRYPTO_CONFIG, DID, DecryptionResult, DomainCategory, ECKeyPair, EncryptedPayload, EncryptionAlgorithm, ICryptoProvider, Identity, KeyPair, NullCryptoProvider, SecureNodeInfo, SecureSyncSession, SignedSyncData, SigningAlgorithm, UCANPayload, UCANToken, VerificationResult } from './crypto/index.cjs';
|
|
12
12
|
import 'eventemitter3';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BandwidthProfile, CRDTOperation, ConflictDetectionResult, EventCallback, EventUnsubscribe, IEventEmitter, NetworkState, Operation, OperationPriority, OperationStatus, OperationType, PresenceInfo, ResolutionStrategy, SyncBatch, SyncCoordinatorConfig, SyncResult, VectorClock } from './core/index.js';
|
|
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 './core/index.js';
|
|
2
2
|
export { Logger, createNamespacedLogger, disableLogging, getLogger, logger, resetLogger, setLogger } from './utils/index.js';
|
|
3
3
|
export { DashStorageAdapter, DashStorageAdapterOptions, DashStorageBackend, DashStorageChange, DashSyncClient, InMemoryStorageAdapter } from './persistence/index.js';
|
|
4
4
|
export { P as PersistedEnvelope, a as PersistenceDeserializer, b as PersistenceSerializer, S as StorageAdapter } from './types-CMxO7QF0.js';
|
|
@@ -7,6 +7,6 @@ export { Handshake, MergeStrategy, ProtocolError, ReconciliationResult, Replica,
|
|
|
7
7
|
export { OfflineOperation, OfflineOperationQueue, OfflineOperationQueueOptions, OfflineQueueEvents, OfflineQueuePersistenceConfig, OfflineQueueStats, getOfflineOperationQueue, resetOfflineOperationQueue } from './offline/index.js';
|
|
8
8
|
export { CompressedBatch, CompressedChunk, CompressionEngine, CompressionStats, DeltaBatch, DeltaOperation, DeltaStats, DeltaSyncOptimizer, getCompressionEngine, getDeltaSyncOptimizer, resetCompressionEngine, resetDeltaSyncOptimizer } from './compression/index.js';
|
|
9
9
|
export { ActivityPattern, AdaptiveCompressionOptimizer, AdaptiveStats, BatchTimingOptimizer, BatchTimingStats, CompressionRecommendation, DeviceProfile, NetworkProfile, NetworkWindow, OperationPattern, OperationPrediction, PrefetchedBatch, PrefetchingEngine, PrefetchingStats, SchedulingDecision, getAdaptiveCompressionOptimizer, getBatchTimingOptimizer, getPrefetchingEngine, resetAdaptiveCompressionOptimizer, resetBatchTimingOptimizer, resetPrefetchingEngine } from './optimization/index.js';
|
|
10
|
-
export { AgentPresence, AgentPresenceManager, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.js';
|
|
10
|
+
export { AgentEmotionState, AgentInputState, AgentPresence, AgentPresenceManager, AgentScrollState, AgentSelectionRange, AgentTypingState, AgentViewportState, PresenceEvents, PresenceUpdate, clearAgentPresenceManager, getAgentPresenceManager } from './presence/index.js';
|
|
11
11
|
export { AEON_CAPABILITIES, AeonCapability, AeonCapabilityResult, AeonCryptoConfig, AeonEncryptionMode, AuthenticatedMessageFields, Capability, DEFAULT_CRYPTO_CONFIG, DID, DecryptionResult, DomainCategory, ECKeyPair, EncryptedPayload, EncryptionAlgorithm, ICryptoProvider, Identity, KeyPair, NullCryptoProvider, SecureNodeInfo, SecureSyncSession, SignedSyncData, SigningAlgorithm, UCANPayload, UCANToken, VerificationResult } from './crypto/index.js';
|
|
12
12
|
import 'eventemitter3';
|
package/dist/index.js
CHANGED
|
@@ -5339,6 +5339,157 @@ var AgentPresenceManager = class extends EventEmitter {
|
|
|
5339
5339
|
});
|
|
5340
5340
|
}
|
|
5341
5341
|
}
|
|
5342
|
+
/**
|
|
5343
|
+
* Update focused node path
|
|
5344
|
+
*/
|
|
5345
|
+
updateFocusNode(agentId, nodePath) {
|
|
5346
|
+
const presence = this.presences.get(agentId);
|
|
5347
|
+
if (presence) {
|
|
5348
|
+
presence.focusNode = nodePath;
|
|
5349
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5350
|
+
this.presences.set(agentId, presence);
|
|
5351
|
+
this.emit("focus_updated", {
|
|
5352
|
+
agentId,
|
|
5353
|
+
focusNode: nodePath
|
|
5354
|
+
});
|
|
5355
|
+
}
|
|
5356
|
+
}
|
|
5357
|
+
/**
|
|
5358
|
+
* Update text selection range
|
|
5359
|
+
*/
|
|
5360
|
+
updateSelection(agentId, selectionRange) {
|
|
5361
|
+
const presence = this.presences.get(agentId);
|
|
5362
|
+
if (presence) {
|
|
5363
|
+
presence.selectionRange = selectionRange;
|
|
5364
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5365
|
+
this.presences.set(agentId, presence);
|
|
5366
|
+
this.emit("selection_updated", {
|
|
5367
|
+
agentId,
|
|
5368
|
+
selectionRange
|
|
5369
|
+
});
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
/**
|
|
5373
|
+
* Update typing state
|
|
5374
|
+
*/
|
|
5375
|
+
updateTyping(agentId, isTyping, field, isComposing = false) {
|
|
5376
|
+
const presence = this.presences.get(agentId);
|
|
5377
|
+
if (presence) {
|
|
5378
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
5379
|
+
const previous = presence.typingState;
|
|
5380
|
+
const typingState = {
|
|
5381
|
+
isTyping,
|
|
5382
|
+
field,
|
|
5383
|
+
isComposing,
|
|
5384
|
+
startedAt: isTyping && !previous?.isTyping ? now : isTyping ? previous?.startedAt : void 0,
|
|
5385
|
+
stoppedAt: isTyping ? void 0 : now
|
|
5386
|
+
};
|
|
5387
|
+
presence.typingState = typingState;
|
|
5388
|
+
presence.lastSeen = now;
|
|
5389
|
+
this.presences.set(agentId, presence);
|
|
5390
|
+
this.emit("typing_updated", {
|
|
5391
|
+
agentId,
|
|
5392
|
+
typingState
|
|
5393
|
+
});
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
/**
|
|
5397
|
+
* Update scroll state
|
|
5398
|
+
*/
|
|
5399
|
+
updateScroll(agentId, scrollState) {
|
|
5400
|
+
const presence = this.presences.get(agentId);
|
|
5401
|
+
if (presence) {
|
|
5402
|
+
presence.scrollState = {
|
|
5403
|
+
...scrollState,
|
|
5404
|
+
depth: Math.max(0, Math.min(1, scrollState.depth))
|
|
5405
|
+
};
|
|
5406
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5407
|
+
this.presences.set(agentId, presence);
|
|
5408
|
+
this.emit("scroll_updated", {
|
|
5409
|
+
agentId,
|
|
5410
|
+
scrollState: presence.scrollState
|
|
5411
|
+
});
|
|
5412
|
+
}
|
|
5413
|
+
}
|
|
5414
|
+
/**
|
|
5415
|
+
* Update viewport size
|
|
5416
|
+
*/
|
|
5417
|
+
updateViewport(agentId, width, height) {
|
|
5418
|
+
const presence = this.presences.get(agentId);
|
|
5419
|
+
if (presence) {
|
|
5420
|
+
presence.viewport = { width, height };
|
|
5421
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5422
|
+
this.presences.set(agentId, presence);
|
|
5423
|
+
this.emit("viewport_updated", {
|
|
5424
|
+
agentId,
|
|
5425
|
+
viewport: presence.viewport
|
|
5426
|
+
});
|
|
5427
|
+
}
|
|
5428
|
+
}
|
|
5429
|
+
/**
|
|
5430
|
+
* Update input state
|
|
5431
|
+
*/
|
|
5432
|
+
updateInputState(agentId, inputState) {
|
|
5433
|
+
const presence = this.presences.get(agentId);
|
|
5434
|
+
if (presence) {
|
|
5435
|
+
presence.inputState = inputState;
|
|
5436
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5437
|
+
this.presences.set(agentId, presence);
|
|
5438
|
+
this.emit("input_state_updated", {
|
|
5439
|
+
agentId,
|
|
5440
|
+
inputState
|
|
5441
|
+
});
|
|
5442
|
+
}
|
|
5443
|
+
}
|
|
5444
|
+
/**
|
|
5445
|
+
* Clear input state
|
|
5446
|
+
*/
|
|
5447
|
+
clearInputState(agentId) {
|
|
5448
|
+
const presence = this.presences.get(agentId);
|
|
5449
|
+
if (presence) {
|
|
5450
|
+
presence.inputState = void 0;
|
|
5451
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5452
|
+
this.presences.set(agentId, presence);
|
|
5453
|
+
this.emit("input_state_updated", {
|
|
5454
|
+
agentId,
|
|
5455
|
+
inputState: void 0
|
|
5456
|
+
});
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
/**
|
|
5460
|
+
* Update emotional state
|
|
5461
|
+
*/
|
|
5462
|
+
updateEmotionState(agentId, emotionState) {
|
|
5463
|
+
const presence = this.presences.get(agentId);
|
|
5464
|
+
if (presence) {
|
|
5465
|
+
const enrichedState = {
|
|
5466
|
+
...emotionState,
|
|
5467
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
5468
|
+
};
|
|
5469
|
+
presence.emotionState = enrichedState;
|
|
5470
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5471
|
+
this.presences.set(agentId, presence);
|
|
5472
|
+
this.emit("emotion_updated", {
|
|
5473
|
+
agentId,
|
|
5474
|
+
emotionState: enrichedState
|
|
5475
|
+
});
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
/**
|
|
5479
|
+
* Clear emotional state
|
|
5480
|
+
*/
|
|
5481
|
+
clearEmotionState(agentId) {
|
|
5482
|
+
const presence = this.presences.get(agentId);
|
|
5483
|
+
if (presence) {
|
|
5484
|
+
presence.emotionState = void 0;
|
|
5485
|
+
presence.lastSeen = (/* @__PURE__ */ new Date()).toISOString();
|
|
5486
|
+
this.presences.set(agentId, presence);
|
|
5487
|
+
this.emit("emotion_updated", {
|
|
5488
|
+
agentId,
|
|
5489
|
+
emotionState: void 0
|
|
5490
|
+
});
|
|
5491
|
+
}
|
|
5492
|
+
}
|
|
5342
5493
|
/**
|
|
5343
5494
|
* Update status
|
|
5344
5495
|
*/
|