@interncom/diplomatic 0.8.2 → 0.8.4

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.
@@ -4,7 +4,7 @@ import { Status } from "./shared/consts";
4
4
  import { EncodedMessage } from "./shared/message";
5
5
  import { EntityID, Hash, HostHandle, ICrypto, IDeleteParams, IEntRev, IHostConnectionInfo, IInsertParams, IMessageHead, IStateManager, ITransport, IUpdateParams, MasterSeed } from "./shared/types";
6
6
  import { ValStat } from "./shared/valstat";
7
- import { ApldState, IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore, IStoredMessage, ListMsgsOpts, ReconcileOpts } from "./types";
7
+ import { ApldState, IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore, IStoredMessage, ListMsgsOpts, ReconcileOpts, ReconcileReport } from "./types";
8
8
  export declare class SyncClient<Handle extends HostHandle> implements IClient<Handle> {
9
9
  private clock;
10
10
  private state;
@@ -160,14 +160,13 @@ export declare class SyncClient<Handle extends HostHandle> implements IClient<Ha
160
160
  /** Count archive rows; optional apld filter. Prefer over list+length. */
161
161
  countMsgs(apld?: ApldState): Promise<number>;
162
162
  /**
163
- * Full inventory of one host (peek seq 0): set numBags/numDupes/lastSeq on
164
- * the host row; optionally enqueue downloads (`pull`, default true) and/or
165
- * uploads (`push`, default false). Waits out in-flight {@link sync} first
166
- * (same as {@link rebuild}). By default runs {@link sync} afterward so
167
- * queues drain. Returns ephemeral host msg checksum (distinct msgs on host;
168
- * same construction as {@link msgcheck}). Read counts via {@link hosts}.
163
+ * Full inventory of one host (peek seq 0): advances lastSeq; optionally
164
+ * enqueues pull/push. Waits out in-flight {@link sync} first (same as
165
+ * {@link rebuild}). By default drains via {@link sync}, then re-inventories.
166
+ * Returns ephemeral {@link ReconcileReport} (msgcheck, numBags, numDupes)
167
+ * bag tallies are not persisted.
169
168
  */
170
- reconcile(hostLabel: string, opts?: ReconcileOpts): Promise<ValStat<Hash>>;
169
+ reconcile(hostLabel: string, opts?: ReconcileOpts): Promise<ValStat<ReconcileReport>>;
171
170
  /**
172
171
  * Peek each host from seq 0 and pull any bags not already in the archive.
173
172
  * Leaves open msgs as APLD_PENDING; does not exec (rebuild replays everything).
@@ -18,7 +18,7 @@ import { nullStateManager, StateManager } from "./state";
18
18
  import { IDBStore, openIDBStore } from "./stores/idb/store";
19
19
  import { MemoryStore } from "./stores/memory/store";
20
20
  import { SingletonStateManager } from "./shared/singleton";
21
- import type { ApldState, Applier, HostStatsUpdate, IClient, IDiplomaticClientState, IHostRow, IStore, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ListMsgsOpts, ReconcileOpts } from "./types";
21
+ import type { ApldState, Applier, HostStatsUpdate, IClient, IDiplomaticClientState, IHostRow, IStore, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ListMsgsOpts, ReconcileOpts, ReconcileReport } from "./types";
22
22
  import { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, isApldState, isPendingApply, isTerminalApplyFailure, setApld } from "./types";
23
23
  import type { SyncProgressEvent } from "./progress";
24
24
  import { defaultPeekProgressEvery, idleProgress, shouldEmitItemProgress } from "./progress";
@@ -31,4 +31,4 @@ export declare function genWebClient(stateMgr: IStateManager, url: URL): Promise
31
31
  setSeed: (seedHex: string) => Promise<void>;
32
32
  }>;
33
33
  export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, b64tob, btob64, btoh, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, crypto, Decoder, defaultPeekProgressEvery, eidCodec, encodeEntRev, Encoder, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBStore, idleProgress, IEntDB, IEntity, isApldState, isPendingApply, isTerminalApplyFailure, IStore, MasterSeed, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, revFromEntity, revFromHead, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
34
- export type { ApldState, Applier, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITransport, IUpdateParams, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, ReconcileOpts, SyncProgressEvent, WorkerClientOptions, };
34
+ export type { ApldState, Applier, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITransport, IUpdateParams, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, ReconcileOpts, ReconcileReport, SyncProgressEvent, WorkerClientOptions, };