@dxos/client-services 0.8.1 → 0.8.2-main.12df754

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-MHDASPY5.mjs → chunk-GCPSASQQ.mjs} +59 -69
  2. package/dist/lib/browser/chunk-GCPSASQQ.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/node/{chunk-A2WCOW6P.cjs → chunk-BAW7EMSB.cjs} +231 -241
  7. package/dist/lib/node/chunk-BAW7EMSB.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +47 -47
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/testing/index.cjs +8 -8
  11. package/dist/lib/node-esm/{chunk-SK52YZK7.mjs → chunk-NDJKR4OF.mjs} +59 -69
  12. package/dist/lib/node-esm/chunk-NDJKR4OF.mjs.map +7 -0
  13. package/dist/lib/node-esm/index.mjs +1 -1
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/testing/index.mjs +1 -1
  16. package/dist/types/src/packlets/agents/edge-agent-service.d.ts +1 -1
  17. package/dist/types/src/packlets/agents/edge-agent-service.d.ts.map +1 -1
  18. package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
  19. package/dist/types/src/packlets/network/network-service.d.ts +3 -1
  20. package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
  21. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  22. package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
  23. package/dist/types/src/version.d.ts +1 -1
  24. package/dist/types/src/version.d.ts.map +1 -1
  25. package/package.json +38 -38
  26. package/src/packlets/agents/edge-agent-service.ts +8 -11
  27. package/src/packlets/devices/devices-service.ts +5 -3
  28. package/src/packlets/identity/identity.test.ts +9 -6
  29. package/src/packlets/network/network-service.ts +9 -15
  30. package/src/packlets/services/service-host.ts +5 -1
  31. package/src/packlets/spaces/edge-feed-replicator.test.ts +2 -1
  32. package/src/packlets/spaces/edge-feed-replicator.ts +2 -1
  33. package/src/version.ts +1 -5
  34. package/dist/lib/browser/chunk-MHDASPY5.mjs.map +0 -7
  35. package/dist/lib/node/chunk-A2WCOW6P.cjs.map +0 -7
  36. package/dist/lib/node-esm/chunk-SK52YZK7.mjs.map +0 -7
@@ -32,7 +32,7 @@ __export(testing_exports, {
32
32
  sanitizeInvitation: () => sanitizeInvitation
33
33
  });
34
34
  module.exports = __toCommonJS(testing_exports);
35
- var import_chunk_A2WCOW6P = require("../chunk-A2WCOW6P.cjs");
35
+ var import_chunk_BAW7EMSB = require("../chunk-BAW7EMSB.cjs");
36
36
  var import_credentials = require("@dxos/credentials");
37
37
  var import_keys = require("@dxos/keys");
38
38
  var import_async = require("@dxos/async");
@@ -235,7 +235,7 @@ var createInvitation = async (host, options) => {
235
235
  authMethod: import_services.Invitation.AuthMethod.NONE,
236
236
  ...options ?? {}
237
237
  };
238
- if (host instanceof import_chunk_A2WCOW6P.ServiceContext) {
238
+ if (host instanceof import_chunk_BAW7EMSB.ServiceContext) {
239
239
  return host.invitationsManager.createInvitation({
240
240
  kind: import_services.Invitation.Kind.SPACE,
241
241
  ...options
@@ -245,7 +245,7 @@ var createInvitation = async (host, options) => {
245
245
  };
246
246
  var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
247
247
  invitation = sanitizeInvitation(invitation);
248
- if (guest instanceof import_chunk_A2WCOW6P.ServiceContext) {
248
+ if (guest instanceof import_chunk_BAW7EMSB.ServiceContext) {
249
249
  return guest.invitationsManager.acceptInvitation({
250
250
  invitation,
251
251
  deviceProfile: guestDeviceProfile
@@ -255,7 +255,7 @@ var acceptInvitation = (guest, invitation, guestDeviceProfile) => {
255
255
  };
256
256
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/test-builder.ts";
257
257
  var createServiceHost = (config, signalManagerContext) => {
258
- return new import_chunk_A2WCOW6P.ClientServicesHost({
258
+ return new import_chunk_BAW7EMSB.ClientServicesHost({
259
259
  config,
260
260
  signalManager: new import_messaging.MemorySignalManager(signalManagerContext),
261
261
  transportFactory: import_network_manager.MemoryTransportFactory
@@ -274,7 +274,7 @@ var createServiceContext = async ({ signalManagerFactory = async () => {
274
274
  });
275
275
  const level = (0, import_testing.createTestLevel)();
276
276
  await level.open();
277
- return new import_chunk_A2WCOW6P.ServiceContext(storage, level, networkManager, signalManager, void 0, void 0, {
277
+ return new import_chunk_BAW7EMSB.ServiceContext(storage, level, networkManager, signalManager, void 0, void 0, {
278
278
  invitationConnectionDefaultParams: {
279
279
  teleport: {
280
280
  controlHeartbeatInterval: 200
@@ -385,7 +385,7 @@ var TestPeer = class {
385
385
  return this._props.meshEchoReplicator ??= new import_echo_pipeline.MeshEchoReplicator();
386
386
  }
387
387
  get dataSpaceManager() {
388
- return this._props.dataSpaceManager ??= new import_chunk_A2WCOW6P.DataSpaceManager({
388
+ return this._props.dataSpaceManager ??= new import_chunk_BAW7EMSB.DataSpaceManager({
389
389
  spaceManager: this.spaceManager,
390
390
  metadataStore: this.metadataStore,
391
391
  keyring: this.keyring,
@@ -400,9 +400,9 @@ var TestPeer = class {
400
400
  });
401
401
  }
402
402
  get invitationsManager() {
403
- return this._props.invitationsManager ??= new import_chunk_A2WCOW6P.InvitationsManager(new import_chunk_A2WCOW6P.InvitationsHandler(this.networkManager), (invitation) => {
403
+ return this._props.invitationsManager ??= new import_chunk_BAW7EMSB.InvitationsManager(new import_chunk_BAW7EMSB.InvitationsHandler(this.networkManager), (invitation) => {
404
404
  if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
405
- return new import_chunk_A2WCOW6P.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
405
+ return new import_chunk_BAW7EMSB.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
406
406
  } else {
407
407
  throw new Error("not implemented");
408
408
  }
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
397
397
  import { TRACE_PROCESSOR } from "@dxos/tracing";
398
398
 
399
399
  // packages/sdk/client-services/src/version.ts
400
- var DXOS_VERSION = "0.8.1";
400
+ var DXOS_VERSION = "0.8.2-main.12df754";
401
401
 
402
402
  // packages/sdk/client-services/src/packlets/services/platform.ts
403
403
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -739,6 +739,7 @@ import { log as log3, logInfo } from "@dxos/log";
739
739
  import { EdgeService } from "@dxos/protocols";
740
740
  import { buf } from "@dxos/protocols/buf";
741
741
  import { MessageSchema as RouterMessageSchema } from "@dxos/protocols/buf/dxos/edge/messenger_pb";
742
+ import { EdgeStatus } from "@dxos/protocols/proto/dxos/client/services";
742
743
  import { ComplexMap as ComplexMap2, arrayToBuffer, bufferToArray, defaultMap, rangeFromTo } from "@dxos/util";
743
744
  function _ts_decorate(decorators, target, key, desc) {
744
745
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -829,7 +830,7 @@ var EdgeFeedReplicator = class extends Resource {
829
830
  async _open() {
830
831
  log3("open", void 0, {
831
832
  F: __dxlog_file5,
832
- L: 56,
833
+ L: 57,
833
834
  S: this,
834
835
  C: (f, a) => f(...a)
835
836
  });
@@ -848,7 +849,7 @@ var EdgeFeedReplicator = class extends Resource {
848
849
  _spaceId: this._spaceId
849
850
  }, {
850
851
  F: __dxlog_file5,
851
- L: 70,
852
+ L: 71,
852
853
  S: this,
853
854
  C: (f, a) => f(...a)
854
855
  });
@@ -861,7 +862,7 @@ var EdgeFeedReplicator = class extends Resource {
861
862
  type: payload.type
862
863
  }, {
863
864
  F: __dxlog_file5,
864
- L: 75,
865
+ L: 76,
865
866
  S: this,
866
867
  C: (f, a) => f(...a)
867
868
  });
@@ -873,14 +874,14 @@ var EdgeFeedReplicator = class extends Resource {
873
874
  }
874
875
  async _handleReconnect() {
875
876
  await this._resetConnection();
876
- if (this._messenger.isConnected) {
877
+ if (this._messenger.status === EdgeStatus.CONNECTED) {
877
878
  this._startReplication();
878
879
  }
879
880
  }
880
881
  async _close() {
881
882
  log3("close", void 0, {
882
883
  F: __dxlog_file5,
883
- L: 95,
884
+ L: 96,
884
885
  S: this,
885
886
  C: (f, a) => f(...a)
886
887
  });
@@ -892,7 +893,7 @@ var EdgeFeedReplicator = class extends Resource {
892
893
  this._connectionCtx = connectionCtx;
893
894
  log3("connection context created", void 0, {
894
895
  F: __dxlog_file5,
895
- L: 103,
896
+ L: 104,
896
897
  S: this,
897
898
  C: (f, a) => f(...a)
898
899
  });
@@ -905,7 +906,7 @@ var EdgeFeedReplicator = class extends Resource {
905
906
  async _resetConnection() {
906
907
  log3("resetConnection", void 0, {
907
908
  F: __dxlog_file5,
908
- L: 112,
909
+ L: 113,
909
910
  S: this,
910
911
  C: (f, a) => f(...a)
911
912
  });
@@ -921,7 +922,7 @@ var EdgeFeedReplicator = class extends Resource {
921
922
  hasConnectionCtx: !!this._connectionCtx
922
923
  }, {
923
924
  F: __dxlog_file5,
924
- L: 120,
925
+ L: 121,
925
926
  S: this,
926
927
  C: (f, a) => f(...a)
927
928
  });
@@ -938,7 +939,7 @@ var EdgeFeedReplicator = class extends Resource {
938
939
  key: feed.key
939
940
  }, {
940
941
  F: __dxlog_file5,
941
- L: 133,
942
+ L: 134,
942
943
  S: this,
943
944
  C: (f, a) => f(...a)
944
945
  });
@@ -954,7 +955,7 @@ var EdgeFeedReplicator = class extends Resource {
954
955
  if (!this._connectionCtx) {
955
956
  log3("message dropped because connection was disposed", void 0, {
956
957
  F: __dxlog_file5,
957
- L: 146,
958
+ L: 147,
958
959
  S: this,
959
960
  C: (f, a) => f(...a)
960
961
  });
@@ -966,14 +967,14 @@ var EdgeFeedReplicator = class extends Resource {
966
967
  blocks: message.blocks.map((b) => b.index)
967
968
  }, {
968
969
  F: __dxlog_file5,
969
- L: 151,
970
+ L: 152,
970
971
  S: this,
971
972
  C: (f, a) => f(...a)
972
973
  });
973
974
  }
974
975
  invariant2(message.feedKey, void 0, {
975
976
  F: __dxlog_file5,
976
- L: 157,
977
+ L: 158,
977
978
  S: this,
978
979
  A: [
979
980
  "message.feedKey",
@@ -985,7 +986,7 @@ var EdgeFeedReplicator = class extends Resource {
985
986
  type: message.type
986
987
  }, {
987
988
  F: __dxlog_file5,
988
- L: 160,
989
+ L: 161,
989
990
  S: this,
990
991
  C: (f, a) => f(...a)
991
992
  });
@@ -1004,7 +1005,7 @@ var EdgeFeedReplicator = class extends Resource {
1004
1005
  if (!this._connectionCtx) {
1005
1006
  log3.warn("received message after connection context was disposed", void 0, {
1006
1007
  F: __dxlog_file5,
1007
- L: 175,
1008
+ L: 176,
1008
1009
  S: this,
1009
1010
  C: (f, a) => f(...a)
1010
1011
  });
@@ -1022,7 +1023,7 @@ var EdgeFeedReplicator = class extends Resource {
1022
1023
  feedKey
1023
1024
  }, {
1024
1025
  F: __dxlog_file5,
1025
- L: 184,
1026
+ L: 185,
1026
1027
  S: this,
1027
1028
  C: (f, a) => f(...a)
1028
1029
  });
@@ -1038,7 +1039,7 @@ var EdgeFeedReplicator = class extends Resource {
1038
1039
  if (message.length > feed.length) {
1039
1040
  log3("requesting missing blocks", logMeta, {
1040
1041
  F: __dxlog_file5,
1041
- L: 194,
1042
+ L: 195,
1042
1043
  S: this,
1043
1044
  C: (f, a) => f(...a)
1044
1045
  });
@@ -1053,7 +1054,7 @@ var EdgeFeedReplicator = class extends Resource {
1053
1054
  } else if (message.length < feed.length) {
1054
1055
  log3("pushing blocks to remote", logMeta, {
1055
1056
  F: __dxlog_file5,
1056
- L: 202,
1057
+ L: 203,
1057
1058
  S: this,
1058
1059
  C: (f, a) => f(...a)
1059
1060
  });
@@ -1072,7 +1073,7 @@ var EdgeFeedReplicator = class extends Resource {
1072
1073
  blocks: message.blocks.map((b) => b.index)
1073
1074
  }, {
1074
1075
  F: __dxlog_file5,
1075
- L: 211,
1076
+ L: 212,
1076
1077
  S: this,
1077
1078
  C: (f, a) => f(...a)
1078
1079
  });
@@ -1083,7 +1084,7 @@ var EdgeFeedReplicator = class extends Resource {
1083
1084
  feedKey
1084
1085
  }, {
1085
1086
  F: __dxlog_file5,
1086
- L: 216,
1087
+ L: 217,
1087
1088
  S: this,
1088
1089
  C: (f, a) => f(...a)
1089
1090
  });
@@ -1097,7 +1098,7 @@ var EdgeFeedReplicator = class extends Resource {
1097
1098
  ...message
1098
1099
  }, {
1099
1100
  F: __dxlog_file5,
1100
- L: 225,
1101
+ L: 226,
1101
1102
  S: this,
1102
1103
  C: (f, a) => f(...a)
1103
1104
  });
@@ -1112,7 +1113,7 @@ var EdgeFeedReplicator = class extends Resource {
1112
1113
  to
1113
1114
  }, {
1114
1115
  F: __dxlog_file5,
1115
- L: 232,
1116
+ L: 233,
1116
1117
  S: this,
1117
1118
  C: (f, a) => f(...a)
1118
1119
  });
@@ -1122,7 +1123,7 @@ var EdgeFeedReplicator = class extends Resource {
1122
1123
  });
1123
1124
  invariant2(data instanceof Uint8Array, void 0, {
1124
1125
  F: __dxlog_file5,
1125
- L: 237,
1126
+ L: 238,
1126
1127
  S: this,
1127
1128
  A: [
1128
1129
  "data instanceof Uint8Array",
@@ -1150,7 +1151,7 @@ var EdgeFeedReplicator = class extends Resource {
1150
1151
  blocks: blocks.length
1151
1152
  }, {
1152
1153
  F: __dxlog_file5,
1153
- L: 258,
1154
+ L: 259,
1154
1155
  S: this,
1155
1156
  C: (f, a) => f(...a)
1156
1157
  });
@@ -1172,7 +1173,7 @@ var EdgeFeedReplicator = class extends Resource {
1172
1173
  if (!this._remoteLength.has(feed.key)) {
1173
1174
  log3("blocks not pushed because remote length is unknown", void 0, {
1174
1175
  F: __dxlog_file5,
1175
- L: 279,
1176
+ L: 280,
1176
1177
  S: this,
1177
1178
  C: (f, a) => f(...a)
1178
1179
  });
@@ -1197,7 +1198,7 @@ var EdgeFeedReplicator = class extends Resource {
1197
1198
  if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
1198
1199
  log3("resetting on reconnect", void 0, {
1199
1200
  F: __dxlog_file5,
1200
- L: 296,
1201
+ L: 297,
1201
1202
  S: this,
1202
1203
  C: (f, a) => f(...a)
1203
1204
  });
@@ -1208,7 +1209,7 @@ var EdgeFeedReplicator = class extends Resource {
1208
1209
  }
1209
1210
  }, {
1210
1211
  F: __dxlog_file5,
1211
- L: 290
1212
+ L: 291
1212
1213
  });
1213
1214
  return connectionCtx;
1214
1215
  }
@@ -7503,28 +7504,22 @@ _ts_decorate9([
7503
7504
  // packages/sdk/client-services/src/packlets/agents/edge-agent-service.ts
7504
7505
  import { Stream as Stream11 } from "@dxos/codec-protobuf/stream";
7505
7506
  import { EdgeAgentStatus as EdgeAgentStatus2 } from "@dxos/protocols";
7506
- import { QueryAgentStatusResponse, QueryEdgeStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
7507
+ import { QueryAgentStatusResponse, EdgeStatus as EdgeStatus2 } from "@dxos/protocols/proto/dxos/client/services";
7507
7508
  var EdgeAgentServiceImpl = class {
7508
7509
  constructor(_agentManagerProvider, _edgeConnection) {
7509
7510
  this._agentManagerProvider = _agentManagerProvider;
7510
7511
  this._edgeConnection = _edgeConnection;
7511
7512
  }
7513
+ // TODO(mykola): Reconcile with NetworkService.queryStatus.
7512
7514
  queryEdgeStatus() {
7513
7515
  return new Stream11(({ ctx, next }) => {
7514
- next({
7515
- status: QueryEdgeStatusResponse.EdgeStatus.NOT_CONNECTED
7516
- });
7517
- if (!this._edgeConnection) {
7518
- return;
7519
- }
7520
- ctx.onDispose(
7521
- // TODO(wittjosiah): EdgeConnection should include a disconnected event as well.
7522
- this._edgeConnection.onReconnected(() => {
7523
- next({
7524
- status: QueryEdgeStatusResponse.EdgeStatus.CONNECTED
7525
- });
7526
- })
7527
- );
7516
+ const update = () => {
7517
+ next({
7518
+ status: this._edgeConnection?.status ?? EdgeStatus2.NOT_CONNECTED
7519
+ });
7520
+ };
7521
+ this._edgeConnection?.statusChanged.on(ctx, update);
7522
+ update();
7528
7523
  });
7529
7524
  }
7530
7525
  async createAgent() {
@@ -8516,7 +8511,7 @@ import { WebsocketRpcClient } from "@dxos/websocket-rpc";
8516
8511
  import { SubscriptionList as SubscriptionList3 } from "@dxos/async";
8517
8512
  import { Stream as Stream12 } from "@dxos/codec-protobuf/stream";
8518
8513
  import { invariant as invariant25 } from "@dxos/invariant";
8519
- import { Device as Device2, DeviceKind as DeviceKind2 } from "@dxos/protocols/proto/dxos/client/services";
8514
+ import { Device as Device2, DeviceKind as DeviceKind2, EdgeStatus as EdgeStatus3 } from "@dxos/protocols/proto/dxos/client/services";
8520
8515
  var __dxlog_file30 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
8521
8516
  var DevicesServiceImpl = class {
8522
8517
  constructor(_identityManager, _edgeConnection) {
@@ -8537,7 +8532,7 @@ var DevicesServiceImpl = class {
8537
8532
  } else {
8538
8533
  invariant25(this._identityManager.identity?.presence, "presence not present", {
8539
8534
  F: __dxlog_file30,
8540
- L: 36,
8535
+ L: 37,
8541
8536
  S: this,
8542
8537
  A: [
8543
8538
  "this._identityManager.identity?.presence",
@@ -8552,7 +8547,7 @@ var DevicesServiceImpl = class {
8552
8547
  if (isMe) {
8553
8548
  presence = Device2.PresenceState.ONLINE;
8554
8549
  } else if (profile.os?.toUpperCase() === "EDGE") {
8555
- presence = this._edgeConnection?.isConnected ? Device2.PresenceState.ONLINE : Device2.PresenceState.OFFLINE;
8550
+ presence = this._edgeConnection?.status === EdgeStatus3.CONNECTED ? Device2.PresenceState.ONLINE : Device2.PresenceState.OFFLINE;
8556
8551
  } else {
8557
8552
  presence = peers.some((peer) => peer.identityKey.equals(key)) ? Device2.PresenceState.ONLINE : Device2.PresenceState.OFFLINE;
8558
8553
  }
@@ -8812,12 +8807,13 @@ var LOG_PROCESSING = 0;
8812
8807
  // packages/sdk/client-services/src/packlets/network/network-service.ts
8813
8808
  import { Stream as Stream15 } from "@dxos/codec-protobuf/stream";
8814
8809
  var NetworkServiceImpl = class {
8815
- constructor(networkManager, signalManager) {
8810
+ constructor(networkManager, signalManager, edgeConnection) {
8816
8811
  this.networkManager = networkManager;
8817
8812
  this.signalManager = signalManager;
8813
+ this.edgeConnection = edgeConnection;
8818
8814
  }
8819
8815
  queryStatus() {
8820
- return new Stream15(({ next }) => {
8816
+ return new Stream15(({ ctx, next }) => {
8821
8817
  const update = () => {
8822
8818
  next({
8823
8819
  swarm: this.networkManager.connectionState,
@@ -8828,13 +8824,9 @@ var NetworkServiceImpl = class {
8828
8824
  }))
8829
8825
  });
8830
8826
  };
8831
- const unsubscribeSwarm = this.networkManager.connectionStateChanged.on(() => update());
8832
- const unsubscribeSignal = this.signalManager.statusChanged?.on(() => update());
8827
+ this.networkManager.connectionStateChanged.on(ctx, () => update());
8828
+ this.signalManager.statusChanged?.on(ctx, () => update());
8833
8829
  update();
8834
- return () => {
8835
- unsubscribeSwarm();
8836
- unsubscribeSignal?.();
8837
- };
8838
8830
  });
8839
8831
  }
8840
8832
  async updateConfig(request) {
@@ -8850,26 +8842,24 @@ var NetworkServiceImpl = class {
8850
8842
  return this.signalManager.query(request);
8851
8843
  }
8852
8844
  subscribeSwarmState(request) {
8853
- return new Stream15(({ next }) => {
8854
- const unsubscribe = this.signalManager.swarmState?.on((state) => {
8845
+ return new Stream15(({ ctx, next }) => {
8846
+ this.signalManager.swarmState?.on(ctx, (state) => {
8855
8847
  if (request.topic.equals(state.swarmKey)) {
8856
8848
  next(state);
8857
8849
  }
8858
8850
  });
8859
- return unsubscribe;
8860
8851
  });
8861
8852
  }
8862
8853
  async sendMessage(message) {
8863
8854
  return this.signalManager.sendMessage(message);
8864
8855
  }
8865
8856
  subscribeMessages(peer) {
8866
- return new Stream15(({ next }) => {
8867
- const unsubscribe = this.signalManager.onMessage.on((message) => {
8857
+ return new Stream15(({ ctx, next }) => {
8858
+ this.signalManager.onMessage.on(ctx, (message) => {
8868
8859
  if (message.recipient.peerKey === peer.peerKey) {
8869
8860
  next(message);
8870
8861
  }
8871
8862
  });
8872
- return unsubscribe;
8873
8863
  });
8874
8864
  }
8875
8865
  };
@@ -9194,7 +9184,7 @@ var ClientServicesHost = class {
9194
9184
  SpacesService: new SpacesServiceImpl(this._serviceContext.identityManager, this._serviceContext.spaceManager, dataSpaceManagerProvider),
9195
9185
  DataService: this._serviceContext.echoHost.dataService,
9196
9186
  QueryService: this._serviceContext.echoHost.queryService,
9197
- NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager),
9187
+ NetworkService: new NetworkServiceImpl(this._serviceContext.networkManager, this._serviceContext.signalManager, this._edgeConnection),
9198
9188
  LoggingService: this._loggingService,
9199
9189
  TracingService: this._tracingService,
9200
9190
  // TODO(burdon): Move to new protobuf definitions.
@@ -9226,7 +9216,7 @@ var ClientServicesHost = class {
9226
9216
  deviceKey
9227
9217
  }, {
9228
9218
  F: __dxlog_file31,
9229
- L: 366,
9219
+ L: 370,
9230
9220
  S: this,
9231
9221
  C: (f, a) => f(...a)
9232
9222
  });
@@ -9234,7 +9224,7 @@ var ClientServicesHost = class {
9234
9224
  id: traceId
9235
9225
  }), {
9236
9226
  F: __dxlog_file31,
9237
- L: 367,
9227
+ L: 371,
9238
9228
  S: this,
9239
9229
  C: (f, a) => f(...a)
9240
9230
  });
@@ -9248,7 +9238,7 @@ var ClientServicesHost = class {
9248
9238
  deviceKey
9249
9239
  }, {
9250
9240
  F: __dxlog_file31,
9251
- L: 378,
9241
+ L: 382,
9252
9242
  S: this,
9253
9243
  C: (f, a) => f(...a)
9254
9244
  });
@@ -9266,7 +9256,7 @@ var ClientServicesHost = class {
9266
9256
  deviceKey
9267
9257
  }, {
9268
9258
  F: __dxlog_file31,
9269
- L: 387,
9259
+ L: 391,
9270
9260
  S: this,
9271
9261
  C: (f, a) => f(...a)
9272
9262
  });
@@ -9277,13 +9267,13 @@ var ClientServicesHost = class {
9277
9267
  id: traceId
9278
9268
  }), {
9279
9269
  F: __dxlog_file31,
9280
- L: 392,
9270
+ L: 396,
9281
9271
  S: this,
9282
9272
  C: (f, a) => f(...a)
9283
9273
  });
9284
9274
  log27.info("resetting...", void 0, {
9285
9275
  F: __dxlog_file31,
9286
- L: 394,
9276
+ L: 398,
9287
9277
  S: this,
9288
9278
  C: (f, a) => f(...a)
9289
9279
  });
@@ -9293,7 +9283,7 @@ var ClientServicesHost = class {
9293
9283
  await this._storage.reset();
9294
9284
  log27.info("reset", void 0, {
9295
9285
  F: __dxlog_file31,
9296
- L: 401,
9286
+ L: 405,
9297
9287
  S: this,
9298
9288
  C: (f, a) => f(...a)
9299
9289
  });
@@ -9301,7 +9291,7 @@ var ClientServicesHost = class {
9301
9291
  id: traceId
9302
9292
  }), {
9303
9293
  F: __dxlog_file31,
9304
- L: 402,
9294
+ L: 406,
9305
9295
  S: this,
9306
9296
  C: (f, a) => f(...a)
9307
9297
  });
@@ -9379,4 +9369,4 @@ export {
9379
9369
  importProfileData,
9380
9370
  ClientServicesHost
9381
9371
  };
9382
- //# sourceMappingURL=chunk-SK52YZK7.mjs.map
9372
+ //# sourceMappingURL=chunk-NDJKR4OF.mjs.map