@dxos/echo-pipeline 0.1.58-main.4cbb52d → 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 (36) hide show
  1. package/dist/lib/browser/{chunk-YHBA7EZB.mjs → chunk-7ZNBLEKV.mjs} +30 -35
  2. package/dist/lib/browser/chunk-7ZNBLEKV.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/testing/index.mjs +1 -1
  6. package/dist/lib/browser/testing/index.mjs.map +1 -1
  7. package/dist/lib/node/index.cjs +29 -34
  8. package/dist/lib/node/index.cjs.map +2 -2
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/testing/index.cjs +136 -139
  11. package/dist/lib/node/testing/index.cjs.map +4 -4
  12. package/dist/types/src/db-host/snapshot-manager.d.ts.map +1 -1
  13. package/dist/types/src/db-host/snapshot-store.d.ts.map +1 -1
  14. package/dist/types/src/metadata/metadata-store.d.ts.map +1 -1
  15. package/dist/types/src/pipeline/pipeline.d.ts.map +1 -1
  16. package/dist/types/src/pipeline/timeframe-clock.d.ts.map +1 -1
  17. package/dist/types/src/space/space-manager.d.ts +2 -2
  18. package/dist/types/src/space/space-manager.d.ts.map +1 -1
  19. package/dist/types/src/space/space.d.ts +2 -2
  20. package/dist/types/src/space/space.d.ts.map +1 -1
  21. package/dist/types/src/testing/test-agent-builder.d.ts +1 -1
  22. package/dist/types/src/testing/test-agent-builder.d.ts.map +1 -1
  23. package/package.json +31 -31
  24. package/src/db-host/snapshot-manager.ts +1 -3
  25. package/src/db-host/snapshot-store.ts +1 -4
  26. package/src/metadata/metadata-store.ts +1 -4
  27. package/src/pipeline/pipeline-stress.test.ts +10 -3
  28. package/src/pipeline/pipeline.test.ts +1 -1
  29. package/src/pipeline/pipeline.ts +3 -4
  30. package/src/pipeline/timeframe-clock.ts +1 -4
  31. package/src/space/control-pipeline.test.ts +1 -1
  32. package/src/space/space-manager.ts +2 -2
  33. package/src/space/space-protocol.test.ts +1 -1
  34. package/src/space/space.ts +3 -3
  35. package/src/testing/test-agent-builder.ts +1 -1
  36. package/dist/lib/browser/chunk-YHBA7EZB.mjs.map +0 -7
@@ -55,15 +55,60 @@ var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip"
55
55
  var import_teleport_extension_object_sync2 = require("@dxos/teleport-extension-object-sync");
56
56
  var import_util10 = require("@dxos/util");
57
57
 
58
+ // packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts
59
+ var import_testing = require("@dxos/feed-store/testing");
60
+
61
+ // packages/core/echo/echo-pipeline/src/common/codec.ts
62
+ var import_hypercore = require("@dxos/hypercore");
63
+ var import_protocols = require("@dxos/protocols");
64
+ var codec = import_protocols.schema.getCodecForType("dxos.echo.feed.FeedMessage");
65
+ var valueEncoding = (0, import_hypercore.createCodecEncoding)(codec);
66
+
67
+ // packages/core/echo/echo-pipeline/src/common/feeds.ts
68
+ var import_invariant = require("@dxos/invariant");
69
+ var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/common/feeds.ts";
70
+ var createMappedFeedWriter = (mapper, writer) => {
71
+ (0, import_invariant.invariant)(mapper, void 0, {
72
+ F: __dxlog_file,
73
+ L: 16,
74
+ S: void 0,
75
+ A: [
76
+ "mapper",
77
+ ""
78
+ ]
79
+ });
80
+ (0, import_invariant.invariant)(writer, void 0, {
81
+ F: __dxlog_file,
82
+ L: 17,
83
+ S: void 0,
84
+ A: [
85
+ "writer",
86
+ ""
87
+ ]
88
+ });
89
+ return {
90
+ write: async (data, options) => await writer.write(await mapper(data), options)
91
+ };
92
+ };
93
+
94
+ // packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts
95
+ var TestFeedBuilder = class extends import_testing.TestBuilder {
96
+ constructor() {
97
+ super({
98
+ valueEncoding
99
+ });
100
+ }
101
+ };
102
+
58
103
  // packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts
59
104
  var import_codec_protobuf = require("@dxos/codec-protobuf");
60
105
  var import_context = require("@dxos/context");
61
106
  var import_echo_db = require("@dxos/echo-db");
62
- var import_invariant = require("@dxos/invariant");
107
+ var import_invariant2 = require("@dxos/invariant");
63
108
  var import_log = require("@dxos/log");
64
109
  var import_service = require("@dxos/protocols/proto/dxos/echo/service");
65
110
  var import_util = require("@dxos/util");
66
- var __dxlog_file = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts";
111
+ var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service-host.ts";
67
112
  var DataServiceHost = class {
68
113
  constructor(_itemManager, _itemDemuxer, _flush, _writeStream) {
69
114
  this._itemManager = _itemManager;
@@ -100,8 +145,8 @@ var DataServiceHost = class {
100
145
  });
101
146
  this._itemDemuxer.mutation.on(ctx, (message) => {
102
147
  const { batch, meta } = message;
103
- (0, import_invariant.invariant)(!meta.clientTag, "Unexpected client tag in mutation message", {
104
- F: __dxlog_file,
148
+ (0, import_invariant2.invariant)(!meta.clientTag, "Unexpected client tag in mutation message", {
149
+ F: __dxlog_file2,
105
150
  L: 69,
106
151
  S: this,
107
152
  A: [
@@ -113,7 +158,7 @@ var DataServiceHost = class {
113
158
  batch: batch.objects?.length,
114
159
  meta
115
160
  }, {
116
- F: __dxlog_file,
161
+ F: __dxlog_file2,
117
162
  L: 70,
118
163
  S: this,
119
164
  C: (f, a) => f(...a)
@@ -140,8 +185,8 @@ var DataServiceHost = class {
140
185
  });
141
186
  }
142
187
  async write(request) {
143
- (0, import_invariant.invariant)(!this._ctx.disposed, "Cannot write to closed DataServiceHost", {
144
- F: __dxlog_file,
188
+ (0, import_invariant2.invariant)(!this._ctx.disposed, "Cannot write to closed DataServiceHost", {
189
+ F: __dxlog_file2,
145
190
  L: 96,
146
191
  S: this,
147
192
  A: [
@@ -149,8 +194,8 @@ var DataServiceHost = class {
149
194
  "'Cannot write to closed DataServiceHost'"
150
195
  ]
151
196
  });
152
- (0, import_invariant.invariant)(this._writeStream, "Cannot write mutations in readonly mode", {
153
- F: __dxlog_file,
197
+ (0, import_invariant2.invariant)(this._writeStream, "Cannot write mutations in readonly mode", {
198
+ F: __dxlog_file2,
154
199
  L: 97,
155
200
  S: this,
156
201
  A: [
@@ -162,7 +207,7 @@ var DataServiceHost = class {
162
207
  clientTag: request.clientTag,
163
208
  objectCount: request.batch.objects?.length ?? 0
164
209
  }, {
165
- F: __dxlog_file,
210
+ F: __dxlog_file2,
166
211
  L: 99,
167
212
  S: this,
168
213
  C: (f, a) => f(...a)
@@ -176,7 +221,7 @@ var DataServiceHost = class {
176
221
  feedKey: receipt2.feedKey,
177
222
  seq: receipt2.seq
178
223
  }, {
179
- F: __dxlog_file,
224
+ F: __dxlog_file2,
180
225
  L: 108,
181
226
  S: this,
182
227
  C: (f, a) => f(...a)
@@ -243,7 +288,7 @@ var DatabaseHost = class {
243
288
  var import_async = require("@dxos/async");
244
289
  var import_context2 = require("@dxos/context");
245
290
  var import_keys = require("@dxos/keys");
246
- var import_protocols = require("@dxos/protocols");
291
+ var import_protocols2 = require("@dxos/protocols");
247
292
  var import_blob = require("@dxos/protocols/proto/dxos/echo/blob");
248
293
  function _ts_decorate(decorators, target, key, desc) {
249
294
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -255,9 +300,8 @@ function _ts_decorate(decorators, target, key, desc) {
255
300
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
256
301
  return c > 3 && r && Object.defineProperty(target, key, r), r;
257
302
  }
258
- var SpaceSnapshot = import_protocols.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
303
+ var SpaceSnapshot = import_protocols2.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
259
304
  var SnapshotManager = class SnapshotManager2 {
260
- // prettier-ignore
261
305
  constructor(_snapshotStore, _blobStore, _blobSync) {
262
306
  this._snapshotStore = _snapshotStore;
263
307
  this._blobStore = _blobStore;
@@ -292,10 +336,9 @@ SnapshotManager = _ts_decorate([
292
336
 
293
337
  // packages/core/echo/echo-pipeline/src/db-host/snapshot-store.ts
294
338
  var import_crypto = require("@dxos/crypto");
295
- var import_protocols2 = require("@dxos/protocols");
296
- var SpaceSnapshot2 = import_protocols2.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
339
+ var import_protocols3 = require("@dxos/protocols");
340
+ var SpaceSnapshot2 = import_protocols3.schema.getCodecForType("dxos.echo.snapshot.SpaceSnapshot");
297
341
  var SnapshotStore = class {
298
- // prettier-ignore
299
342
  constructor(_directory) {
300
343
  this._directory = _directory;
301
344
  }
@@ -338,11 +381,11 @@ var SnapshotStore = class {
338
381
 
339
382
  // packages/core/echo/echo-pipeline/src/db-host/data-service.ts
340
383
  var import_debug = require("@dxos/debug");
341
- var import_invariant2 = require("@dxos/invariant");
384
+ var import_invariant3 = require("@dxos/invariant");
342
385
  var import_keys2 = require("@dxos/keys");
343
386
  var import_log2 = require("@dxos/log");
344
387
  var import_util2 = require("@dxos/util");
345
- var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service.ts";
388
+ var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/db-host/data-service.ts";
346
389
  var DataServiceSubscriptions = class {
347
390
  constructor() {
348
391
  this._spaces = new import_util2.ComplexMap(import_keys2.PublicKey.hash);
@@ -354,13 +397,13 @@ var DataServiceSubscriptions = class {
354
397
  (0, import_log2.log)("Registering space", {
355
398
  spaceKey
356
399
  }, {
357
- F: __dxlog_file2,
400
+ F: __dxlog_file3,
358
401
  L: 31,
359
402
  S: this,
360
403
  C: (f, a) => f(...a)
361
404
  });
362
- (0, import_invariant2.invariant)(!this._spaces.has(spaceKey), void 0, {
363
- F: __dxlog_file2,
405
+ (0, import_invariant3.invariant)(!this._spaces.has(spaceKey), void 0, {
406
+ F: __dxlog_file3,
364
407
  L: 32,
365
408
  S: this,
366
409
  A: [
@@ -375,7 +418,7 @@ var DataServiceSubscriptions = class {
375
418
  (0, import_log2.log)("Unregistering space", {
376
419
  spaceKey
377
420
  }, {
378
- F: __dxlog_file2,
421
+ F: __dxlog_file3,
379
422
  L: 38,
380
423
  S: this,
381
424
  C: (f, a) => f(...a)
@@ -393,8 +436,8 @@ var DataServiceImpl = class {
393
436
  this._subscriptions = _subscriptions;
394
437
  }
395
438
  subscribe(request) {
396
- (0, import_invariant2.invariant)(request.spaceKey, void 0, {
397
- F: __dxlog_file2,
439
+ (0, import_invariant3.invariant)(request.spaceKey, void 0, {
440
+ F: __dxlog_file3,
398
441
  L: 57,
399
442
  S: this,
400
443
  A: [
@@ -406,8 +449,8 @@ var DataServiceImpl = class {
406
449
  return host.subscribe();
407
450
  }
408
451
  write(request) {
409
- (0, import_invariant2.invariant)(request.spaceKey, void 0, {
410
- F: __dxlog_file2,
452
+ (0, import_invariant3.invariant)(request.spaceKey, void 0, {
453
+ F: __dxlog_file3,
411
454
  L: 64,
412
455
  S: this,
413
456
  A: [
@@ -415,8 +458,8 @@ var DataServiceImpl = class {
415
458
  ""
416
459
  ]
417
460
  });
418
- (0, import_invariant2.invariant)(request.batch, void 0, {
419
- F: __dxlog_file2,
461
+ (0, import_invariant3.invariant)(request.batch, void 0, {
462
+ F: __dxlog_file3,
420
463
  L: 65,
421
464
  S: this,
422
465
  A: [
@@ -428,8 +471,8 @@ var DataServiceImpl = class {
428
471
  return host.write(request);
429
472
  }
430
473
  flush(request) {
431
- (0, import_invariant2.invariant)(request.spaceKey, void 0, {
432
- F: __dxlog_file2,
474
+ (0, import_invariant3.invariant)(request.spaceKey, void 0, {
475
+ F: __dxlog_file3,
433
476
  L: 72,
434
477
  S: this,
435
478
  A: [
@@ -445,10 +488,10 @@ var DataServiceImpl = class {
445
488
  // packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts
446
489
  var import_crc_32 = __toESM(require("crc-32"));
447
490
  var import_async2 = require("@dxos/async");
448
- var import_invariant3 = require("@dxos/invariant");
491
+ var import_invariant4 = require("@dxos/invariant");
449
492
  var import_keys3 = require("@dxos/keys");
450
493
  var import_log3 = require("@dxos/log");
451
- var import_protocols3 = require("@dxos/protocols");
494
+ var import_protocols4 = require("@dxos/protocols");
452
495
  var import_services = require("@dxos/protocols/proto/dxos/client/services");
453
496
  var import_util3 = require("@dxos/util");
454
497
  function _ts_decorate2(decorators, target, key, desc) {
@@ -461,18 +504,17 @@ function _ts_decorate2(decorators, target, key, desc) {
461
504
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
462
505
  return c > 3 && r && Object.defineProperty(target, key, r), r;
463
506
  }
464
- var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts";
507
+ var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/metadata/metadata-store.ts";
465
508
  var emptyEchoMetadata = () => ({
466
- version: import_protocols3.STORAGE_VERSION,
509
+ version: import_protocols4.STORAGE_VERSION,
467
510
  spaces: [],
468
511
  created: /* @__PURE__ */ new Date(),
469
512
  updated: /* @__PURE__ */ new Date()
470
513
  });
471
514
  var emptyLargeSpaceMetadata = () => ({});
472
- var EchoMetadata = import_protocols3.schema.getCodecForType("dxos.echo.metadata.EchoMetadata");
473
- var LargeSpaceMetadata = import_protocols3.schema.getCodecForType("dxos.echo.metadata.LargeSpaceMetadata");
515
+ var EchoMetadata = import_protocols4.schema.getCodecForType("dxos.echo.metadata.EchoMetadata");
516
+ var LargeSpaceMetadata = import_protocols4.schema.getCodecForType("dxos.echo.metadata.LargeSpaceMetadata");
474
517
  var MetadataStore = class {
475
- // prettier-ignore
476
518
  constructor(_directory) {
477
519
  this._directory = _directory;
478
520
  this._metadata = emptyEchoMetadata();
@@ -506,13 +548,13 @@ var MetadataStore = class {
506
548
  checksum,
507
549
  name: file.filename
508
550
  }, {
509
- F: __dxlog_file3,
510
- L: 81,
551
+ F: __dxlog_file4,
552
+ L: 78,
511
553
  S: this,
512
554
  C: (f, a) => f(...a)
513
555
  });
514
556
  if (fileLength < dataSize + 8) {
515
- throw new import_protocols3.DataCorruptionError("Metadata size is smaller than expected.", {
557
+ throw new import_protocols4.DataCorruptionError("Metadata size is smaller than expected.", {
516
558
  fileLength,
517
559
  dataSize
518
560
  });
@@ -520,7 +562,7 @@ var MetadataStore = class {
520
562
  const data = await file.read(8, dataSize);
521
563
  const calculatedChecksum = import_crc_32.default.buf(data);
522
564
  if (calculatedChecksum !== checksum) {
523
- throw new import_protocols3.DataCorruptionError("Metadata checksum is invalid.");
565
+ throw new import_protocols4.DataCorruptionError("Metadata checksum is invalid.");
524
566
  }
525
567
  return codec2.decode(data);
526
568
  } finally {
@@ -539,8 +581,8 @@ var MetadataStore = class {
539
581
  size: encoded.length,
540
582
  checksum
541
583
  }, {
542
- F: __dxlog_file3,
543
- L: 113,
584
+ F: __dxlog_file4,
585
+ L: 110,
544
586
  S: this,
545
587
  C: (f, a) => f(...a)
546
588
  });
@@ -571,8 +613,8 @@ var MetadataStore = class {
571
613
  import_log3.log.error("failed to load metadata", {
572
614
  err
573
615
  }, {
574
- F: __dxlog_file3,
575
- L: 144,
616
+ F: __dxlog_file4,
617
+ L: 141,
576
618
  S: this,
577
619
  C: (f, a) => f(...a)
578
620
  });
@@ -588,8 +630,8 @@ var MetadataStore = class {
588
630
  import_log3.log.error("failed to load space large metadata", {
589
631
  err
590
632
  }, {
591
- F: __dxlog_file3,
592
- L: 156,
633
+ F: __dxlog_file4,
634
+ L: 153,
593
635
  S: this,
594
636
  C: (f, a) => f(...a)
595
637
  });
@@ -599,7 +641,7 @@ var MetadataStore = class {
599
641
  async _save() {
600
642
  const data = {
601
643
  ...this._metadata,
602
- version: import_protocols3.STORAGE_VERSION,
644
+ version: import_protocols4.STORAGE_VERSION,
603
645
  created: this._metadata.created ?? /* @__PURE__ */ new Date(),
604
646
  updated: /* @__PURE__ */ new Date()
605
647
  };
@@ -618,8 +660,8 @@ var MetadataStore = class {
618
660
  import_log3.log.error("failed to load space large metadata", {
619
661
  err
620
662
  }, {
621
- F: __dxlog_file3,
622
- L: 185,
663
+ F: __dxlog_file4,
664
+ L: 182,
623
665
  S: this,
624
666
  C: (f, a) => f(...a)
625
667
  });
@@ -638,9 +680,9 @@ var MetadataStore = class {
638
680
  return this._metadata.identity.haloSpace;
639
681
  }
640
682
  const space = this.spaces.find((space2) => space2.key === spaceKey);
641
- (0, import_invariant3.invariant)(space, "Space not found", {
642
- F: __dxlog_file3,
643
- L: 207,
683
+ (0, import_invariant4.invariant)(space, "Space not found", {
684
+ F: __dxlog_file4,
685
+ L: 204,
644
686
  S: this,
645
687
  A: [
646
688
  "space",
@@ -663,8 +705,8 @@ var MetadataStore = class {
663
705
  */
664
706
  async clear() {
665
707
  (0, import_log3.log)("clearing all metadata", void 0, {
666
- F: __dxlog_file3,
667
- L: 226,
708
+ F: __dxlog_file4,
709
+ L: 223,
668
710
  S: this,
669
711
  C: (f, a) => f(...a)
670
712
  });
@@ -675,9 +717,9 @@ var MetadataStore = class {
675
717
  return this._metadata.identity;
676
718
  }
677
719
  async setIdentityRecord(record) {
678
- (0, import_invariant3.invariant)(!this._metadata.identity, "Cannot overwrite existing identity in metadata", {
679
- F: __dxlog_file3,
680
- L: 236,
720
+ (0, import_invariant4.invariant)(!this._metadata.identity, "Cannot overwrite existing identity in metadata", {
721
+ F: __dxlog_file4,
722
+ L: 233,
681
723
  S: this,
682
724
  A: [
683
725
  "!this._metadata.identity",
@@ -689,9 +731,9 @@ var MetadataStore = class {
689
731
  await this.flush();
690
732
  }
691
733
  async addSpace(record) {
692
- (0, import_invariant3.invariant)(!(this._metadata.spaces ?? []).find((space) => space.key === record.key), "Cannot overwrite existing space in metadata", {
693
- F: __dxlog_file3,
694
- L: 244,
734
+ (0, import_invariant4.invariant)(!(this._metadata.spaces ?? []).find((space) => space.key === record.key), "Cannot overwrite existing space in metadata", {
735
+ F: __dxlog_file4,
736
+ L: 241,
695
737
  S: this,
696
738
  A: [
697
739
  "!(this._metadata.spaces ?? []).find((space) => space.key === record.key)",
@@ -751,19 +793,19 @@ var fromBytesInt32 = (buf) => buf.readInt32LE(0);
751
793
  var import_async3 = require("@dxos/async");
752
794
  var import_context3 = require("@dxos/context");
753
795
  var import_crypto2 = require("@dxos/crypto");
754
- var import_invariant4 = require("@dxos/invariant");
796
+ var import_invariant5 = require("@dxos/invariant");
755
797
  var import_log4 = require("@dxos/log");
756
- var import_protocols4 = require("@dxos/protocols");
798
+ var import_protocols5 = require("@dxos/protocols");
757
799
  var import_teleport = require("@dxos/teleport");
758
- var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/auth.ts";
800
+ var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/space/auth.ts";
759
801
  var AuthExtension = class extends import_teleport.RpcExtension {
760
802
  constructor(_authParams) {
761
803
  super({
762
804
  requested: {
763
- AuthService: import_protocols4.schema.getService("dxos.mesh.teleport.auth.AuthService")
805
+ AuthService: import_protocols5.schema.getService("dxos.mesh.teleport.auth.AuthService")
764
806
  },
765
807
  exposed: {
766
- AuthService: import_protocols4.schema.getService("dxos.mesh.teleport.auth.AuthService")
808
+ AuthService: import_protocols5.schema.getService("dxos.mesh.teleport.auth.AuthService")
767
809
  },
768
810
  timeout: 60 * 1e3
769
811
  });
@@ -771,7 +813,7 @@ var AuthExtension = class extends import_teleport.RpcExtension {
771
813
  this._ctx = new import_context3.Context({
772
814
  onError: (err) => {
773
815
  import_log4.log.catch(err, void 0, {
774
- F: __dxlog_file4,
816
+ F: __dxlog_file5,
775
817
  L: 28,
776
818
  S: this,
777
819
  C: (f, a) => f(...a)
@@ -793,7 +835,7 @@ var AuthExtension = class extends import_teleport.RpcExtension {
793
835
  };
794
836
  } catch (err) {
795
837
  import_log4.log.error("failed to generate auth credentials", err, {
796
- F: __dxlog_file4,
838
+ F: __dxlog_file5,
797
839
  L: 55,
798
840
  S: this,
799
841
  C: (f, a) => f(...a)
@@ -812,8 +854,8 @@ var AuthExtension = class extends import_teleport.RpcExtension {
812
854
  const { credential } = await this.rpc.AuthService.authenticate({
813
855
  challenge
814
856
  });
815
- (0, import_invariant4.invariant)(credential?.length > 0, "invalid credential", {
816
- F: __dxlog_file4,
857
+ (0, import_invariant5.invariant)(credential?.length > 0, "invalid credential", {
858
+ F: __dxlog_file5,
817
859
  L: 69,
818
860
  S: this,
819
861
  A: [
@@ -822,8 +864,8 @@ var AuthExtension = class extends import_teleport.RpcExtension {
822
864
  ]
823
865
  });
824
866
  const success = await this._authParams.verifier(challenge, credential);
825
- (0, import_invariant4.invariant)(success, "credential not verified", {
826
- F: __dxlog_file4,
867
+ (0, import_invariant5.invariant)(success, "credential not verified", {
868
+ F: __dxlog_file5,
827
869
  L: 71,
828
870
  S: this,
829
871
  A: [
@@ -834,7 +876,7 @@ var AuthExtension = class extends import_teleport.RpcExtension {
834
876
  (0, import_async3.runInContext)(this._ctx, () => this._authParams.onAuthSuccess());
835
877
  } catch (err) {
836
878
  (0, import_log4.log)("auth failed", err, {
837
- F: __dxlog_file4,
879
+ F: __dxlog_file5,
838
880
  L: 74,
839
881
  S: this,
840
882
  C: (f, a) => f(...a)
@@ -884,39 +926,6 @@ var import_log7 = require("@dxos/log");
884
926
  var import_timeframe2 = require("@dxos/timeframe");
885
927
  var import_util4 = require("@dxos/util");
886
928
 
887
- // packages/core/echo/echo-pipeline/src/common/codec.ts
888
- var import_hypercore = require("@dxos/hypercore");
889
- var import_protocols5 = require("@dxos/protocols");
890
- var codec = import_protocols5.schema.getCodecForType("dxos.echo.feed.FeedMessage");
891
- var valueEncoding = (0, import_hypercore.createCodecEncoding)(codec);
892
-
893
- // packages/core/echo/echo-pipeline/src/common/feeds.ts
894
- var import_invariant5 = require("@dxos/invariant");
895
- var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/common/feeds.ts";
896
- var createMappedFeedWriter = (mapper, writer) => {
897
- (0, import_invariant5.invariant)(mapper, void 0, {
898
- F: __dxlog_file5,
899
- L: 16,
900
- S: void 0,
901
- A: [
902
- "mapper",
903
- ""
904
- ]
905
- });
906
- (0, import_invariant5.invariant)(writer, void 0, {
907
- F: __dxlog_file5,
908
- L: 17,
909
- S: void 0,
910
- A: [
911
- "writer",
912
- ""
913
- ]
914
- });
915
- return {
916
- write: async (data, options) => await writer.write(await mapper(data), options)
917
- };
918
- };
919
-
920
929
  // packages/core/echo/echo-pipeline/src/pipeline/message-selector.ts
921
930
  var import_invariant6 = require("@dxos/invariant");
922
931
  var import_log5 = require("@dxos/log");
@@ -972,7 +981,6 @@ var startAfter = (timeframe) => timeframe.frames().map(([feedKey, index]) => ({
972
981
  index: index + 1
973
982
  }));
974
983
  var TimeframeClock = class {
975
- // prettier-ignore
976
984
  constructor(_timeframe = new import_timeframe.Timeframe()) {
977
985
  this._timeframe = _timeframe;
978
986
  this.update = new import_async4.Event();
@@ -1018,7 +1026,7 @@ var TimeframeClock = class {
1018
1026
  current: this._timeframe
1019
1027
  }, {
1020
1028
  F: __dxlog_file7,
1021
- L: 73,
1029
+ L: 70,
1022
1030
  S: this,
1023
1031
  C: (f, a) => f(...a)
1024
1032
  });
@@ -1029,7 +1037,7 @@ var TimeframeClock = class {
1029
1037
  deps: import_timeframe.Timeframe.dependencies(target, this._timeframe)
1030
1038
  }, {
1031
1039
  F: __dxlog_file7,
1032
- L: 75,
1040
+ L: 72,
1033
1041
  S: this,
1034
1042
  C: (f, a) => f(...a)
1035
1043
  });
@@ -1054,7 +1062,6 @@ function _ts_decorate4(decorators, target, key, desc) {
1054
1062
  }
1055
1063
  var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/core/echo/echo-pipeline/src/pipeline/pipeline.ts";
1056
1064
  var PipelineState = class {
1057
- // prettier-ignore
1058
1065
  constructor(_feeds, _timeframeClock) {
1059
1066
  this._feeds = _feeds;
1060
1067
  this._timeframeClock = _timeframeClock;
@@ -1113,7 +1120,7 @@ var PipelineState = class {
1113
1120
  target: this.targetTimeframe
1114
1121
  }, {
1115
1122
  F: __dxlog_file8,
1116
- L: 134,
1123
+ L: 133,
1117
1124
  S: this,
1118
1125
  C: (f, a) => f(...a)
1119
1126
  });
@@ -1145,7 +1152,7 @@ var PipelineState = class {
1145
1152
  dependencies: import_timeframe2.Timeframe.dependencies(this.targetTimeframe, this.timeframe)
1146
1153
  }, {
1147
1154
  F: __dxlog_file8,
1148
- L: 162,
1155
+ L: 161,
1149
1156
  S: this,
1150
1157
  C: (f, a) => f(...a)
1151
1158
  });
@@ -1178,7 +1185,7 @@ var Pipeline = class {
1178
1185
  get writer() {
1179
1186
  (0, import_invariant7.invariant)(this._writer, "Writer not set.", {
1180
1187
  F: __dxlog_file8,
1181
- L: 243,
1188
+ L: 242,
1182
1189
  S: this,
1183
1190
  A: [
1184
1191
  "this._writer",
@@ -1207,7 +1214,7 @@ var Pipeline = class {
1207
1214
  setWriteFeed(feed) {
1208
1215
  (0, import_invariant7.invariant)(!this._writer, "Writer already set.", {
1209
1216
  F: __dxlog_file8,
1210
- L: 270,
1217
+ L: 269,
1211
1218
  S: this,
1212
1219
  A: [
1213
1220
  "!this._writer",
@@ -1216,7 +1223,7 @@ var Pipeline = class {
1216
1223
  });
1217
1224
  (0, import_invariant7.invariant)(feed.properties.writable, "Feed must be writable.", {
1218
1225
  F: __dxlog_file8,
1219
- L: 271,
1226
+ L: 270,
1220
1227
  S: this,
1221
1228
  A: [
1222
1229
  "feed.properties.writable",
@@ -1231,7 +1238,7 @@ var Pipeline = class {
1231
1238
  async start() {
1232
1239
  (0, import_invariant7.invariant)(!this._isStarted, "Pipeline is already started.", {
1233
1240
  F: __dxlog_file8,
1234
- L: 284,
1241
+ L: 283,
1235
1242
  S: this,
1236
1243
  A: [
1237
1244
  "!this._isStarted",
@@ -1240,7 +1247,7 @@ var Pipeline = class {
1240
1247
  });
1241
1248
  (0, import_log7.log)("starting...", void 0, {
1242
1249
  F: __dxlog_file8,
1243
- L: 285,
1250
+ L: 284,
1244
1251
  S: this,
1245
1252
  C: (f, a) => f(...a)
1246
1253
  });
@@ -1249,7 +1256,7 @@ var Pipeline = class {
1249
1256
  this._isStarted = true;
1250
1257
  (0, import_log7.log)("started", void 0, {
1251
1258
  F: __dxlog_file8,
1252
- L: 289,
1259
+ L: 288,
1253
1260
  S: this,
1254
1261
  C: (f, a) => f(...a)
1255
1262
  });
@@ -1262,7 +1269,7 @@ var Pipeline = class {
1262
1269
  async stop() {
1263
1270
  (0, import_log7.log)("stopping...", void 0, {
1264
1271
  F: __dxlog_file8,
1265
- L: 300,
1272
+ L: 299,
1266
1273
  S: this,
1267
1274
  C: (f, a) => f(...a)
1268
1275
  });
@@ -1280,7 +1287,7 @@ var Pipeline = class {
1280
1287
  this._isStarted = false;
1281
1288
  (0, import_log7.log)("stopped", void 0, {
1282
1289
  F: __dxlog_file8,
1283
- L: 313,
1290
+ L: 312,
1284
1291
  S: this,
1285
1292
  C: (f, a) => f(...a)
1286
1293
  });
@@ -1292,7 +1299,7 @@ var Pipeline = class {
1292
1299
  async setCursor(timeframe) {
1293
1300
  (0, import_invariant7.invariant)(!this._isStarted || this._isPaused, "Invalid state.", {
1294
1301
  F: __dxlog_file8,
1295
- L: 322,
1302
+ L: 321,
1296
1303
  S: this,
1297
1304
  A: [
1298
1305
  "!this._isStarted || this._isPaused",
@@ -1321,7 +1328,7 @@ var Pipeline = class {
1321
1328
  async unpause() {
1322
1329
  (0, import_invariant7.invariant)(this._isPaused, "Pipeline is not paused.", {
1323
1330
  F: __dxlog_file8,
1324
- L: 351,
1331
+ L: 350,
1325
1332
  S: this,
1326
1333
  A: [
1327
1334
  "this._isPaused",
@@ -1341,7 +1348,7 @@ var Pipeline = class {
1341
1348
  async *consume() {
1342
1349
  (0, import_invariant7.invariant)(!this._isBeingConsumed, "Pipeline is already being consumed.", {
1343
1350
  F: __dxlog_file8,
1344
- L: 366,
1351
+ L: 365,
1345
1352
  S: this,
1346
1353
  A: [
1347
1354
  "!this._isBeingConsumed",
@@ -1351,7 +1358,7 @@ var Pipeline = class {
1351
1358
  this._isBeingConsumed = true;
1352
1359
  (0, import_invariant7.invariant)(this._feedSetIterator, "Iterator not initialized.", {
1353
1360
  F: __dxlog_file8,
1354
- L: 369,
1361
+ L: 368,
1355
1362
  S: this,
1356
1363
  A: [
1357
1364
  "this._feedSetIterator",
@@ -1365,7 +1372,7 @@ var Pipeline = class {
1365
1372
  if (lastFeedSetIterator !== this._feedSetIterator) {
1366
1373
  (0, import_invariant7.invariant)(this._feedSetIterator, "Iterator not initialized.", {
1367
1374
  F: __dxlog_file8,
1368
- L: 378,
1375
+ L: 377,
1369
1376
  S: this,
1370
1377
  A: [
1371
1378
  "this._feedSetIterator",
@@ -1400,7 +1407,7 @@ var Pipeline = class {
1400
1407
  length: feed.length
1401
1408
  }, {
1402
1409
  F: __dxlog_file8,
1403
- L: 407,
1410
+ L: 406,
1404
1411
  S: this,
1405
1412
  C: (f, a) => f(...a)
1406
1413
  });
@@ -1414,7 +1421,7 @@ var Pipeline = class {
1414
1421
  data
1415
1422
  }, {
1416
1423
  F: __dxlog_file8,
1417
- L: 412,
1424
+ L: 411,
1418
1425
  S: this,
1419
1426
  C: (f, a) => f(...a)
1420
1427
  });
@@ -1430,7 +1437,7 @@ var Pipeline = class {
1430
1437
  this._feedSetIterator.stalled.on((iterator) => {
1431
1438
  import_log7.log.warn(`Stalled after ${iterator.options.stallTimeout}ms with ${iterator.size} feeds.`, void 0, {
1432
1439
  F: __dxlog_file8,
1433
- L: 426,
1440
+ L: 425,
1434
1441
  S: this,
1435
1442
  C: (f, a) => f(...a)
1436
1443
  });
@@ -2701,16 +2708,6 @@ SpaceManager = _ts_decorate9([
2701
2708
  (0, import_async9.trackLeaks)("open", "close")
2702
2709
  ], SpaceManager);
2703
2710
 
2704
- // packages/core/echo/echo-pipeline/src/testing/test-feed-builder.ts
2705
- var import_testing = require("@dxos/feed-store/testing");
2706
- var TestFeedBuilder = class extends import_testing.TestBuilder {
2707
- constructor() {
2708
- super({
2709
- valueEncoding
2710
- });
2711
- }
2712
- };
2713
-
2714
2711
  // packages/core/echo/echo-pipeline/src/testing/test-agent-builder.ts
2715
2712
  var MemoryNetworkManagerProvider = (signalContext) => () => new import_network_manager2.NetworkManager({
2716
2713
  signalManager: new import_messaging.MemorySignalManager(signalContext),