@dxos/echo-pipeline 0.1.58-main.4d30760 → 0.1.58-main.4e2a73a

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.
Files changed (48) hide show
  1. package/dist/lib/browser/{chunk-VYZEP2BZ.mjs → chunk-7ZNBLEKV.mjs} +53 -59
  2. package/dist/lib/browser/chunk-7ZNBLEKV.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -57
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +1 -1
  7. package/dist/lib/browser/testing/index.mjs.map +1 -1
  8. package/dist/lib/node/index.cjs +57 -126
  9. package/dist/lib/node/index.cjs.map +4 -4
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node/testing/index.cjs +162 -166
  12. package/dist/lib/node/testing/index.cjs.map +4 -4
  13. package/dist/types/src/db-host/snapshot-manager.d.ts.map +1 -1
  14. package/dist/types/src/db-host/snapshot-store.d.ts.map +1 -1
  15. package/dist/types/src/index.d.ts +0 -1
  16. package/dist/types/src/index.d.ts.map +1 -1
  17. package/dist/types/src/metadata/metadata-store.d.ts.map +1 -1
  18. package/dist/types/src/pipeline/pipeline.d.ts.map +1 -1
  19. package/dist/types/src/pipeline/timeframe-clock.d.ts.map +1 -1
  20. package/dist/types/src/space/data-pipeline.d.ts.map +1 -1
  21. package/dist/types/src/space/space-manager.d.ts +2 -2
  22. package/dist/types/src/space/space-manager.d.ts.map +1 -1
  23. package/dist/types/src/space/space.d.ts +2 -2
  24. package/dist/types/src/space/space.d.ts.map +1 -1
  25. package/dist/types/src/testing/test-agent-builder.d.ts +1 -1
  26. package/dist/types/src/testing/test-agent-builder.d.ts.map +1 -1
  27. package/package.json +31 -32
  28. package/src/db-host/snapshot-manager.ts +1 -3
  29. package/src/db-host/snapshot-store.ts +1 -4
  30. package/src/index.ts +0 -1
  31. package/src/metadata/metadata-store.ts +2 -6
  32. package/src/pipeline/pipeline-stress.test.ts +10 -3
  33. package/src/pipeline/pipeline.test.ts +1 -1
  34. package/src/pipeline/pipeline.ts +3 -4
  35. package/src/pipeline/timeframe-clock.ts +1 -4
  36. package/src/space/control-pipeline.test.ts +1 -1
  37. package/src/space/data-pipeline.ts +1 -2
  38. package/src/space/space-manager.ts +2 -2
  39. package/src/space/space-protocol.test.ts +1 -1
  40. package/src/space/space.ts +3 -3
  41. package/src/testing/test-agent-builder.ts +1 -1
  42. package/dist/lib/browser/chunk-VYZEP2BZ.mjs.map +0 -7
  43. package/dist/types/src/errors/errors.d.ts +0 -26
  44. package/dist/types/src/errors/errors.d.ts.map +0 -1
  45. package/dist/types/src/errors/index.d.ts +0 -2
  46. package/dist/types/src/errors/index.d.ts.map +0 -1
  47. package/src/errors/errors.ts +0 -52
  48. package/src/errors/index.ts +0 -5
@@ -32,16 +32,11 @@ var src_exports = {};
32
32
  __export(src_exports, {
33
33
  AuthExtension: () => AuthExtension,
34
34
  AuthStatus: () => AuthStatus,
35
- DBError: () => DBError,
36
35
  DataPipeline: () => DataPipeline,
37
36
  DataServiceHost: () => DataServiceHost,
38
37
  DataServiceImpl: () => DataServiceImpl,
39
38
  DataServiceSubscriptions: () => DataServiceSubscriptions,
40
39
  DatabaseHost: () => DatabaseHost,
41
- EntityNotFoundError: () => EntityNotFoundError,
42
- IdentityNotInitializedError: () => IdentityNotInitializedError,
43
- InvalidInvitationError: () => InvalidInvitationError,
44
- InvalidStorageVersionError: () => InvalidStorageVersionError,
45
40
  MOCK_AUTH_PROVIDER: () => MOCK_AUTH_PROVIDER,
46
41
  MOCK_AUTH_VERIFIER: () => MOCK_AUTH_VERIFIER,
47
42
  MetadataStore: () => MetadataStore,
@@ -50,11 +45,9 @@ __export(src_exports, {
50
45
  SnapshotStore: () => SnapshotStore,
51
46
  Space: () => Space,
52
47
  SpaceManager: () => SpaceManager,
53
- SpaceNotFoundError: () => SpaceNotFoundError,
54
48
  SpaceProtocol: () => SpaceProtocol,
55
49
  SpaceProtocolSession: () => SpaceProtocolSession,
56
50
  TimeframeClock: () => TimeframeClock,
57
- UnknownModelError: () => UnknownModelError,
58
51
  codec: () => codec,
59
52
  createMappedFeedWriter: () => createMappedFeedWriter,
60
53
  mapFeedIndexesToTimeframe: () => mapFeedIndexesToTimeframe,
@@ -299,7 +292,6 @@ function _ts_decorate(decorators, target, key, desc) {
299
292
  }
300
293
  var SpaceSnapshot = import_protocols2.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
301
294
  var SnapshotManager = class SnapshotManager2 {
302
- // prettier-ignore
303
295
  constructor(_snapshotStore, _blobStore, _blobSync) {
304
296
  this._snapshotStore = _snapshotStore;
305
297
  this._blobStore = _blobStore;
@@ -337,7 +329,6 @@ var import_crypto = require("@dxos/crypto");
337
329
  var import_protocols3 = require("@dxos/protocols");
338
330
  var SpaceSnapshot2 = import_protocols3.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
339
331
  var SnapshotStore = class {
340
- // prettier-ignore
341
332
  constructor(_directory) {
342
333
  this._directory = _directory;
343
334
  }
@@ -484,59 +475,9 @@ var DataServiceImpl = class {
484
475
  }
485
476
  };
486
477
 
487
- // packages/core/echo/echo-pipeline/src/errors/errors.ts
488
- var DBError = class extends Error {
489
- constructor(code, message, context) {
490
- super(message ? `${code}: ${message}` : code.toString());
491
- this.code = code;
492
- this.context = context;
493
- Object.setPrototypeOf(this, new.target.prototype);
494
- }
495
- };
496
- var IdentityNotInitializedError = class extends DBError {
497
- constructor() {
498
- super("IDENTITY_NOT_INITIALIZED", "Identity not initialized.");
499
- }
500
- };
501
- var InvalidInvitationError = class extends DBError {
502
- constructor() {
503
- super("INVALID_INVITATION", "Invitation is invalid.");
504
- }
505
- };
506
- var InvalidStorageVersionError = class extends DBError {
507
- constructor(expected, actual) {
508
- super("INVALID_STORAGE_VERSION", "Invalid storage version.", {
509
- expected,
510
- actual
511
- });
512
- }
513
- };
514
- var SpaceNotFoundError = class extends DBError {
515
- constructor(spaceKey) {
516
- super("SPACE_NOT_FOUND", "Space not found.", {
517
- spaceKey
518
- });
519
- }
520
- };
521
- var EntityNotFoundError = class extends DBError {
522
- constructor(entityId) {
523
- super("ITEM_NOT_FOUND", "Item not found.", {
524
- entityId
525
- });
526
- }
527
- };
528
- var UnknownModelError = class extends DBError {
529
- constructor(model) {
530
- super("UNKNOWN_MODEL", "Unknown model.", {
531
- model
532
- });
533
- }
534
- };
535
-
536
478
  // packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts
537
479
  var import_crc_32 = __toESM(require("crc-32"));
538
480
  var import_async2 = require("@dxos/async");
539
- var import_errors = require("@dxos/errors");
540
481
  var import_invariant4 = require("@dxos/invariant");
541
482
  var import_keys3 = require("@dxos/keys");
542
483
  var import_log3 = require("@dxos/log");
@@ -564,7 +505,6 @@ var emptyLargeSpaceMetadata = () => ({});
564
505
  var EchoMetadata = import_protocols4.schema.getCodecForType("dxos.echo.metadata.EchoMetadata");
565
506
  var LargeSpaceMetadata = import_protocols4.schema.getCodecForType("dxos.echo.metadata.LargeSpaceMetadata");
566
507
  var MetadataStore = class {
567
- // prettier-ignore
568
508
  constructor(_directory) {
569
509
  this._directory = _directory;
570
510
  this._metadata = emptyEchoMetadata();
@@ -599,12 +539,12 @@ var MetadataStore = class {
599
539
  name: file.filename
600
540
  }, {
601
541
  F: __dxlog_file4,
602
- L: 82,
542
+ L: 78,
603
543
  S: this,
604
544
  C: (f, a) => f(...a)
605
545
  });
606
546
  if (fileLength < dataSize + 8) {
607
- throw new import_errors.DataCorruptionError("Metadata size is smaller than expected.", {
547
+ throw new import_protocols4.DataCorruptionError("Metadata size is smaller than expected.", {
608
548
  fileLength,
609
549
  dataSize
610
550
  });
@@ -612,7 +552,7 @@ var MetadataStore = class {
612
552
  const data = await file.read(8, dataSize);
613
553
  const calculatedChecksum = import_crc_32.default.buf(data);
614
554
  if (calculatedChecksum !== checksum) {
615
- throw new import_errors.DataCorruptionError("Metadata checksum is invalid.");
555
+ throw new import_protocols4.DataCorruptionError("Metadata checksum is invalid.");
616
556
  }
617
557
  return codec2.decode(data);
618
558
  } finally {
@@ -632,7 +572,7 @@ var MetadataStore = class {
632
572
  checksum
633
573
  }, {
634
574
  F: __dxlog_file4,
635
- L: 114,
575
+ L: 110,
636
576
  S: this,
637
577
  C: (f, a) => f(...a)
638
578
  });
@@ -664,7 +604,7 @@ var MetadataStore = class {
664
604
  err
665
605
  }, {
666
606
  F: __dxlog_file4,
667
- L: 145,
607
+ L: 141,
668
608
  S: this,
669
609
  C: (f, a) => f(...a)
670
610
  });
@@ -681,7 +621,7 @@ var MetadataStore = class {
681
621
  err
682
622
  }, {
683
623
  F: __dxlog_file4,
684
- L: 157,
624
+ L: 153,
685
625
  S: this,
686
626
  C: (f, a) => f(...a)
687
627
  });
@@ -711,7 +651,7 @@ var MetadataStore = class {
711
651
  err
712
652
  }, {
713
653
  F: __dxlog_file4,
714
- L: 186,
654
+ L: 182,
715
655
  S: this,
716
656
  C: (f, a) => f(...a)
717
657
  });
@@ -732,7 +672,7 @@ var MetadataStore = class {
732
672
  const space = this.spaces.find((space2) => space2.key === spaceKey);
733
673
  (0, import_invariant4.invariant)(space, "Space not found", {
734
674
  F: __dxlog_file4,
735
- L: 208,
675
+ L: 204,
736
676
  S: this,
737
677
  A: [
738
678
  "space",
@@ -756,7 +696,7 @@ var MetadataStore = class {
756
696
  async clear() {
757
697
  (0, import_log3.log)("clearing all metadata", void 0, {
758
698
  F: __dxlog_file4,
759
- L: 227,
699
+ L: 223,
760
700
  S: this,
761
701
  C: (f, a) => f(...a)
762
702
  });
@@ -769,7 +709,7 @@ var MetadataStore = class {
769
709
  async setIdentityRecord(record) {
770
710
  (0, import_invariant4.invariant)(!this._metadata.identity, "Cannot overwrite existing identity in metadata", {
771
711
  F: __dxlog_file4,
772
- L: 237,
712
+ L: 233,
773
713
  S: this,
774
714
  A: [
775
715
  "!this._metadata.identity",
@@ -783,7 +723,7 @@ var MetadataStore = class {
783
723
  async addSpace(record) {
784
724
  (0, import_invariant4.invariant)(!(this._metadata.spaces ?? []).find((space) => space.key === record.key), "Cannot overwrite existing space in metadata", {
785
725
  F: __dxlog_file4,
786
- L: 245,
726
+ L: 241,
787
727
  S: this,
788
728
  A: [
789
729
  "!(this._metadata.spaces ?? []).find((space) => space.key === record.key)",
@@ -909,7 +849,6 @@ var startAfter = (timeframe) => timeframe.frames().map(([feedKey, index]) => ({
909
849
  index: index + 1
910
850
  }));
911
851
  var TimeframeClock = class {
912
- // prettier-ignore
913
852
  constructor(_timeframe = new import_timeframe.Timeframe()) {
914
853
  this._timeframe = _timeframe;
915
854
  this.update = new import_async3.Event();
@@ -955,7 +894,7 @@ var TimeframeClock = class {
955
894
  current: this._timeframe
956
895
  }, {
957
896
  F: __dxlog_file6,
958
- L: 73,
897
+ L: 70,
959
898
  S: this,
960
899
  C: (f, a) => f(...a)
961
900
  });
@@ -966,7 +905,7 @@ var TimeframeClock = class {
966
905
  deps: import_timeframe.Timeframe.dependencies(target, this._timeframe)
967
906
  }, {
968
907
  F: __dxlog_file6,
969
- L: 75,
908
+ L: 72,
970
909
  S: this,
971
910
  C: (f, a) => f(...a)
972
911
  });
@@ -991,7 +930,6 @@ function _ts_decorate4(decorators, target, key, desc) {
991
930
  }
992
931
  var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts";
993
932
  var PipelineState = class {
994
- // prettier-ignore
995
933
  constructor(_feeds, _timeframeClock) {
996
934
  this._feeds = _feeds;
997
935
  this._timeframeClock = _timeframeClock;
@@ -1050,7 +988,7 @@ var PipelineState = class {
1050
988
  target: this.targetTimeframe
1051
989
  }, {
1052
990
  F: __dxlog_file7,
1053
- L: 134,
991
+ L: 133,
1054
992
  S: this,
1055
993
  C: (f, a) => f(...a)
1056
994
  });
@@ -1082,7 +1020,7 @@ var PipelineState = class {
1082
1020
  dependencies: import_timeframe2.Timeframe.dependencies(this.targetTimeframe, this.timeframe)
1083
1021
  }, {
1084
1022
  F: __dxlog_file7,
1085
- L: 162,
1023
+ L: 161,
1086
1024
  S: this,
1087
1025
  C: (f, a) => f(...a)
1088
1026
  });
@@ -1115,7 +1053,7 @@ var Pipeline = class {
1115
1053
  get writer() {
1116
1054
  (0, import_invariant6.invariant)(this._writer, "Writer not set.", {
1117
1055
  F: __dxlog_file7,
1118
- L: 243,
1056
+ L: 242,
1119
1057
  S: this,
1120
1058
  A: [
1121
1059
  "this._writer",
@@ -1144,7 +1082,7 @@ var Pipeline = class {
1144
1082
  setWriteFeed(feed) {
1145
1083
  (0, import_invariant6.invariant)(!this._writer, "Writer already set.", {
1146
1084
  F: __dxlog_file7,
1147
- L: 270,
1085
+ L: 269,
1148
1086
  S: this,
1149
1087
  A: [
1150
1088
  "!this._writer",
@@ -1153,7 +1091,7 @@ var Pipeline = class {
1153
1091
  });
1154
1092
  (0, import_invariant6.invariant)(feed.properties.writable, "Feed must be writable.", {
1155
1093
  F: __dxlog_file7,
1156
- L: 271,
1094
+ L: 270,
1157
1095
  S: this,
1158
1096
  A: [
1159
1097
  "feed.properties.writable",
@@ -1168,7 +1106,7 @@ var Pipeline = class {
1168
1106
  async start() {
1169
1107
  (0, import_invariant6.invariant)(!this._isStarted, "Pipeline is already started.", {
1170
1108
  F: __dxlog_file7,
1171
- L: 284,
1109
+ L: 283,
1172
1110
  S: this,
1173
1111
  A: [
1174
1112
  "!this._isStarted",
@@ -1177,7 +1115,7 @@ var Pipeline = class {
1177
1115
  });
1178
1116
  (0, import_log6.log)("starting...", void 0, {
1179
1117
  F: __dxlog_file7,
1180
- L: 285,
1118
+ L: 284,
1181
1119
  S: this,
1182
1120
  C: (f, a) => f(...a)
1183
1121
  });
@@ -1186,7 +1124,7 @@ var Pipeline = class {
1186
1124
  this._isStarted = true;
1187
1125
  (0, import_log6.log)("started", void 0, {
1188
1126
  F: __dxlog_file7,
1189
- L: 289,
1127
+ L: 288,
1190
1128
  S: this,
1191
1129
  C: (f, a) => f(...a)
1192
1130
  });
@@ -1199,7 +1137,7 @@ var Pipeline = class {
1199
1137
  async stop() {
1200
1138
  (0, import_log6.log)("stopping...", void 0, {
1201
1139
  F: __dxlog_file7,
1202
- L: 300,
1140
+ L: 299,
1203
1141
  S: this,
1204
1142
  C: (f, a) => f(...a)
1205
1143
  });
@@ -1217,7 +1155,7 @@ var Pipeline = class {
1217
1155
  this._isStarted = false;
1218
1156
  (0, import_log6.log)("stopped", void 0, {
1219
1157
  F: __dxlog_file7,
1220
- L: 313,
1158
+ L: 312,
1221
1159
  S: this,
1222
1160
  C: (f, a) => f(...a)
1223
1161
  });
@@ -1229,7 +1167,7 @@ var Pipeline = class {
1229
1167
  async setCursor(timeframe) {
1230
1168
  (0, import_invariant6.invariant)(!this._isStarted || this._isPaused, "Invalid state.", {
1231
1169
  F: __dxlog_file7,
1232
- L: 322,
1170
+ L: 321,
1233
1171
  S: this,
1234
1172
  A: [
1235
1173
  "!this._isStarted || this._isPaused",
@@ -1258,7 +1196,7 @@ var Pipeline = class {
1258
1196
  async unpause() {
1259
1197
  (0, import_invariant6.invariant)(this._isPaused, "Pipeline is not paused.", {
1260
1198
  F: __dxlog_file7,
1261
- L: 351,
1199
+ L: 350,
1262
1200
  S: this,
1263
1201
  A: [
1264
1202
  "this._isPaused",
@@ -1278,7 +1216,7 @@ var Pipeline = class {
1278
1216
  async *consume() {
1279
1217
  (0, import_invariant6.invariant)(!this._isBeingConsumed, "Pipeline is already being consumed.", {
1280
1218
  F: __dxlog_file7,
1281
- L: 366,
1219
+ L: 365,
1282
1220
  S: this,
1283
1221
  A: [
1284
1222
  "!this._isBeingConsumed",
@@ -1288,7 +1226,7 @@ var Pipeline = class {
1288
1226
  this._isBeingConsumed = true;
1289
1227
  (0, import_invariant6.invariant)(this._feedSetIterator, "Iterator not initialized.", {
1290
1228
  F: __dxlog_file7,
1291
- L: 369,
1229
+ L: 368,
1292
1230
  S: this,
1293
1231
  A: [
1294
1232
  "this._feedSetIterator",
@@ -1302,7 +1240,7 @@ var Pipeline = class {
1302
1240
  if (lastFeedSetIterator !== this._feedSetIterator) {
1303
1241
  (0, import_invariant6.invariant)(this._feedSetIterator, "Iterator not initialized.", {
1304
1242
  F: __dxlog_file7,
1305
- L: 378,
1243
+ L: 377,
1306
1244
  S: this,
1307
1245
  A: [
1308
1246
  "this._feedSetIterator",
@@ -1337,7 +1275,7 @@ var Pipeline = class {
1337
1275
  length: feed.length
1338
1276
  }, {
1339
1277
  F: __dxlog_file7,
1340
- L: 407,
1278
+ L: 406,
1341
1279
  S: this,
1342
1280
  C: (f, a) => f(...a)
1343
1281
  });
@@ -1351,7 +1289,7 @@ var Pipeline = class {
1351
1289
  data
1352
1290
  }, {
1353
1291
  F: __dxlog_file7,
1354
- L: 412,
1292
+ L: 411,
1355
1293
  S: this,
1356
1294
  C: (f, a) => f(...a)
1357
1295
  });
@@ -1367,7 +1305,7 @@ var Pipeline = class {
1367
1305
  this._feedSetIterator.stalled.on((iterator) => {
1368
1306
  import_log6.log.warn(`Stalled after ${iterator.options.stallTimeout}ms with ${iterator.size} feeds.`, void 0, {
1369
1307
  F: __dxlog_file7,
1370
- L: 426,
1308
+ L: 425,
1371
1309
  S: this,
1372
1310
  C: (f, a) => f(...a)
1373
1311
  });
@@ -1771,9 +1709,9 @@ var import_async7 = require("@dxos/async");
1771
1709
  var import_context6 = require("@dxos/context");
1772
1710
  var import_credentials3 = require("@dxos/credentials");
1773
1711
  var import_echo_db3 = require("@dxos/echo-db");
1774
- var import_errors2 = require("@dxos/errors");
1775
1712
  var import_invariant8 = require("@dxos/invariant");
1776
1713
  var import_log9 = require("@dxos/log");
1714
+ var import_protocols6 = require("@dxos/protocols");
1777
1715
  var import_timeframe4 = require("@dxos/timeframe");
1778
1716
  var import_tracing2 = require("@dxos/tracing");
1779
1717
  var import_util6 = require("@dxos/util");
@@ -1845,7 +1783,7 @@ var DataPipeline = class DataPipeline2 {
1845
1783
  write: (data, options) => {
1846
1784
  (0, import_invariant8.invariant)(this._pipeline, "Pipeline is not initialized.", {
1847
1785
  F: __dxlog_file10,
1848
- L: 154,
1786
+ L: 153,
1849
1787
  S: this,
1850
1788
  A: [
1851
1789
  "this._pipeline",
@@ -1854,7 +1792,7 @@ var DataPipeline = class DataPipeline2 {
1854
1792
  });
1855
1793
  (0, import_invariant8.invariant)(this.currentEpoch, "Epoch is not initialized.", {
1856
1794
  F: __dxlog_file10,
1857
- L: 155,
1795
+ L: 154,
1858
1796
  S: this,
1859
1797
  A: [
1860
1798
  "this.currentEpoch",
@@ -1880,7 +1818,7 @@ var DataPipeline = class DataPipeline2 {
1880
1818
  }
1881
1819
  (0, import_log9.log)("close", void 0, {
1882
1820
  F: __dxlog_file10,
1883
- L: 179,
1821
+ L: 178,
1884
1822
  S: this,
1885
1823
  C: (f, a) => f(...a)
1886
1824
  });
@@ -1895,7 +1833,7 @@ var DataPipeline = class DataPipeline2 {
1895
1833
  } catch (err) {
1896
1834
  import_log9.log.catch(err, void 0, {
1897
1835
  F: __dxlog_file10,
1898
- L: 192,
1836
+ L: 191,
1899
1837
  S: this,
1900
1838
  C: (f, a) => f(...a)
1901
1839
  });
@@ -1920,7 +1858,7 @@ var DataPipeline = class DataPipeline2 {
1920
1858
  let messageCounter = 0;
1921
1859
  (0, import_invariant8.invariant)(this._pipeline, "Pipeline is not initialized.", {
1922
1860
  F: __dxlog_file10,
1923
- L: 217,
1861
+ L: 216,
1924
1862
  S: this,
1925
1863
  A: [
1926
1864
  "this._pipeline",
@@ -1936,7 +1874,7 @@ var DataPipeline = class DataPipeline2 {
1936
1874
  seq
1937
1875
  }, {
1938
1876
  F: __dxlog_file10,
1939
- L: 223,
1877
+ L: 222,
1940
1878
  S: this,
1941
1879
  C: (f, a) => f(...a)
1942
1880
  });
@@ -1948,7 +1886,7 @@ var DataPipeline = class DataPipeline2 {
1948
1886
  feedKey
1949
1887
  }, {
1950
1888
  F: __dxlog_file10,
1951
- L: 229,
1889
+ L: 228,
1952
1890
  S: this,
1953
1891
  C: (f, a) => f(...a)
1954
1892
  });
@@ -1971,7 +1909,7 @@ var DataPipeline = class DataPipeline2 {
1971
1909
  spaceKey: this._params.spaceKey.toHex()
1972
1910
  }, {
1973
1911
  F: __dxlog_file10,
1974
- L: 246,
1912
+ L: 245,
1975
1913
  S: this,
1976
1914
  C: (f, a) => f(...a)
1977
1915
  });
@@ -1980,7 +1918,7 @@ var DataPipeline = class DataPipeline2 {
1980
1918
  } catch (err) {
1981
1919
  import_log9.log.catch(err, void 0, {
1982
1920
  F: __dxlog_file10,
1983
- L: 256,
1921
+ L: 255,
1984
1922
  S: this,
1985
1923
  C: (f, a) => f(...a)
1986
1924
  });
@@ -1995,7 +1933,7 @@ var DataPipeline = class DataPipeline2 {
1995
1933
  _createSnapshot() {
1996
1934
  (0, import_invariant8.invariant)(this.databaseHost, "Database backend is not initialized.", {
1997
1935
  F: __dxlog_file10,
1998
- L: 270,
1936
+ L: 269,
1999
1937
  S: this,
2000
1938
  A: [
2001
1939
  "this.databaseHost",
@@ -2024,7 +1962,7 @@ var DataPipeline = class DataPipeline2 {
2024
1962
  } catch (err) {
2025
1963
  import_log9.log.warn("Failed to cache properties", err, {
2026
1964
  F: __dxlog_file10,
2027
- L: 299,
1965
+ L: 298,
2028
1966
  S: this,
2029
1967
  C: (f, a) => f(...a)
2030
1968
  });
@@ -2050,17 +1988,17 @@ var DataPipeline = class DataPipeline2 {
2050
1988
  await this._epochCtx?.dispose();
2051
1989
  const ctx = new import_context6.Context({
2052
1990
  onError: (err) => {
2053
- if (err instanceof import_errors2.CancelledError) {
1991
+ if (err instanceof import_protocols6.CancelledError) {
2054
1992
  (0, import_log9.log)("Epoch processing cancelled.", void 0, {
2055
1993
  F: __dxlog_file10,
2056
- L: 335,
1994
+ L: 334,
2057
1995
  S: this,
2058
1996
  C: (f, a) => f(...a)
2059
1997
  });
2060
1998
  } else {
2061
1999
  import_log9.log.catch(err, void 0, {
2062
2000
  F: __dxlog_file10,
2063
- L: 337,
2001
+ L: 336,
2064
2002
  S: this,
2065
2003
  C: (f, a) => f(...a)
2066
2004
  });
@@ -2080,7 +2018,7 @@ var DataPipeline = class DataPipeline2 {
2080
2018
  async _processEpoch(ctx, epoch) {
2081
2019
  (0, import_invariant8.invariant)(this._isOpen, "Space is closed.", {
2082
2020
  F: __dxlog_file10,
2083
- L: 356,
2021
+ L: 355,
2084
2022
  S: this,
2085
2023
  A: [
2086
2024
  "this._isOpen",
@@ -2089,7 +2027,7 @@ var DataPipeline = class DataPipeline2 {
2089
2027
  });
2090
2028
  (0, import_invariant8.invariant)(this._pipeline, void 0, {
2091
2029
  F: __dxlog_file10,
2092
- L: 357,
2030
+ L: 356,
2093
2031
  S: this,
2094
2032
  A: [
2095
2033
  "this._pipeline",
@@ -2101,7 +2039,7 @@ var DataPipeline = class DataPipeline2 {
2101
2039
  epoch: (0, import_log9.omit)(epoch, "proof")
2102
2040
  }, {
2103
2041
  F: __dxlog_file10,
2104
- L: 360,
2042
+ L: 359,
2105
2043
  S: this,
2106
2044
  C: (f, a) => f(...a)
2107
2045
  });
@@ -2111,7 +2049,7 @@ var DataPipeline = class DataPipeline2 {
2111
2049
  }
2112
2050
  (0, import_log9.log)("restarting pipeline from epoch", void 0, {
2113
2051
  F: __dxlog_file10,
2114
- L: 366,
2052
+ L: 365,
2115
2053
  S: this,
2116
2054
  C: (f, a) => f(...a)
2117
2055
  });
@@ -2122,7 +2060,7 @@ var DataPipeline = class DataPipeline2 {
2122
2060
  async waitUntilTimeframe(timeframe) {
2123
2061
  (0, import_invariant8.invariant)(this._pipeline, "Pipeline is not initialized.", {
2124
2062
  F: __dxlog_file10,
2125
- L: 373,
2063
+ L: 372,
2126
2064
  S: this,
2127
2065
  A: [
2128
2066
  "this._pipeline",
@@ -2134,7 +2072,7 @@ var DataPipeline = class DataPipeline2 {
2134
2072
  async createEpoch() {
2135
2073
  (0, import_invariant8.invariant)(this._pipeline, void 0, {
2136
2074
  F: __dxlog_file10,
2137
- L: 379,
2075
+ L: 378,
2138
2076
  S: this,
2139
2077
  A: [
2140
2078
  "this._pipeline",
@@ -2143,7 +2081,7 @@ var DataPipeline = class DataPipeline2 {
2143
2081
  });
2144
2082
  (0, import_invariant8.invariant)(this.currentEpoch, void 0, {
2145
2083
  F: __dxlog_file10,
2146
- L: 380,
2084
+ L: 379,
2147
2085
  S: this,
2148
2086
  A: [
2149
2087
  "this.currentEpoch",
@@ -2174,7 +2112,7 @@ var DataPipeline = class DataPipeline2 {
2174
2112
  } catch (err) {
2175
2113
  import_log9.log.catch(err, void 0, {
2176
2114
  F: __dxlog_file10,
2177
- L: 410,
2115
+ L: 409,
2178
2116
  S: this,
2179
2117
  C: (f, a) => f(...a)
2180
2118
  });
@@ -2459,7 +2397,7 @@ var import_async9 = require("@dxos/async");
2459
2397
  var import_debug4 = require("@dxos/debug");
2460
2398
  var import_keys7 = require("@dxos/keys");
2461
2399
  var import_log12 = require("@dxos/log");
2462
- var import_protocols6 = require("@dxos/protocols");
2400
+ var import_protocols7 = require("@dxos/protocols");
2463
2401
  var import_util9 = require("@dxos/util");
2464
2402
 
2465
2403
  // packages/core/echo/echo-pipeline/src/space/space-protocol.ts
@@ -2703,7 +2641,7 @@ var SpaceManager = class SpaceManager2 {
2703
2641
  ].map((space) => space.close()));
2704
2642
  }
2705
2643
  async constructSpace({ metadata, swarmIdentity, onNetworkConnection, onAuthFailure, memberKey }) {
2706
- import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols6.trace.begin({
2644
+ import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols7.trace.begin({
2707
2645
  id: this._instanceId
2708
2646
  }), {
2709
2647
  F: __dxlog_file13,
@@ -2741,7 +2679,7 @@ var SpaceManager = class SpaceManager2 {
2741
2679
  memberKey
2742
2680
  });
2743
2681
  this._spaces.set(space.key, space);
2744
- import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols6.trace.end({
2682
+ import_log12.log.trace("dxos.echo.space-manager.construct-space", import_protocols7.trace.end({
2745
2683
  id: this._instanceId
2746
2684
  }), {
2747
2685
  F: __dxlog_file13,
@@ -2765,16 +2703,11 @@ SpaceManager = _ts_decorate9([
2765
2703
  0 && (module.exports = {
2766
2704
  AuthExtension,
2767
2705
  AuthStatus,
2768
- DBError,
2769
2706
  DataPipeline,
2770
2707
  DataServiceHost,
2771
2708
  DataServiceImpl,
2772
2709
  DataServiceSubscriptions,
2773
2710
  DatabaseHost,
2774
- EntityNotFoundError,
2775
- IdentityNotInitializedError,
2776
- InvalidInvitationError,
2777
- InvalidStorageVersionError,
2778
2711
  MOCK_AUTH_PROVIDER,
2779
2712
  MOCK_AUTH_VERIFIER,
2780
2713
  MetadataStore,
@@ -2783,11 +2716,9 @@ SpaceManager = _ts_decorate9([
2783
2716
  SnapshotStore,
2784
2717
  Space,
2785
2718
  SpaceManager,
2786
- SpaceNotFoundError,
2787
2719
  SpaceProtocol,
2788
2720
  SpaceProtocolSession,
2789
2721
  TimeframeClock,
2790
- UnknownModelError,
2791
2722
  codec,
2792
2723
  createMappedFeedWriter,
2793
2724
  mapFeedIndexesToTimeframe,