Configuration¶
Engine¶
EngineOptions:
| Option | Meaning |
|---|---|
session |
Existing IChronicle/Chronicle session |
stack, space, source |
Facades that must share the canonical session |
autoConnect |
URL passed to connect() during construction |
useWebRTC |
Selects the hybrid network manager when connecting |
networkOptions |
Codec, reconnect, and message-buffer settings |
profiler |
Optional structural action profiler |
checkpointAttester |
Optional CheckpointAttester used by attestCheckpoint() |
Engine.attestCheckpoint(request) accepts a caller-created request with a
lowercase SHA-256 hex digest, a kind of checkpoint, export, result, or
compaction, and a nonempty version. Invalid requests reject with
InvalidCheckpointAttestationRequestError; no configured attester rejects with
CheckpointAttesterNotConfiguredError. Success emits checkpoint:attested;
provider failure emits checkpoint:attestationFailed. Those events contain
only { digest, kind, version }, never proof material or provider error
details. Validation and unconfigured failures emit neither event.
Transport¶
PeerConnectionOptions configures a codec, binary mode, reconnect behavior,
message buffer size, and the optional
getAdmissionCredential?: () => Promise<unknown> callback. The same callback
is available as EngineNetworkOptions.getAdmissionCredential. It is called
fresh for each socket open/reconnect; credentials are not cached.
Relay admission is configured on UniversalRelayServerOptions with the generic
admissionProvider?: RelayAdmissionProvider, plus
admissionTimeoutMs?: number (default 5000) and
maxAdmissionFrameBytes?: number (default 16 KiB). A provider authorizes the
opaque credential from one reserved encoded { type: "admission", credential }
frame before welcome, rosters, rooms, routing, or WebRTC signaling. Provider
errors and timeouts deny the pending connection when a provider is configured.
With no provider, the relay has the exact open legacy behavior; the reserved
frame is still never relayed. TLS/WSS and encrypted sync are separate concerns.
ReconnectConfig includes enabled, initialDelay, maxDelay, multiplier,
maxAttempts, and jitter.
HybridPeerManagerOptions requires url and can set RTC configuration,
automatic upgrade, upgrade delay, reconnect, and peer options. WebRTCConfig
controls ICE servers, ordered delivery, retransmits, TURN fallback, timeout,
retry count, and codec.
Storage¶
FilesystemAdapter accepts { dir? }; IndexedDBAdapter accepts { dbName? }.
MemoryAdapter has no constructor options. All adapter methods are Promise
based. TODO: maintainer review of package-level deep-import and export policy
for network/storage classes.