@dxos/client-services 0.7.4 → 0.7.5-main.9cb18ac

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 (30) hide show
  1. package/dist/lib/browser/{chunk-423GRVVV.mjs → chunk-2VSGKKFD.mjs} +103 -89
  2. package/dist/lib/browser/chunk-2VSGKKFD.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-ZS24HRVA.cjs → chunk-B64P5OCZ.cjs} +106 -92
  7. package/dist/lib/node/chunk-B64P5OCZ.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-OQOXRHWF.mjs → chunk-C3BNCKWT.mjs} +103 -89
  12. package/dist/lib/node-esm/chunk-C3BNCKWT.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/services/service-context.d.ts.map +1 -1
  17. package/dist/types/src/packlets/spaces/edge-feed-replicator.d.ts.map +1 -1
  18. package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +3 -0
  19. package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
  20. package/dist/types/src/version.d.ts +1 -1
  21. package/dist/types/src/version.d.ts.map +1 -1
  22. package/dist/types/tsconfig.tsbuildinfo +1 -0
  23. package/package.json +38 -38
  24. package/src/packlets/services/service-context.ts +3 -1
  25. package/src/packlets/spaces/edge-feed-replicator.ts +11 -5
  26. package/src/packlets/spaces/notarization-plugin.ts +32 -17
  27. package/src/version.ts +1 -5
  28. package/dist/lib/browser/chunk-423GRVVV.mjs.map +0 -7
  29. package/dist/lib/node/chunk-ZS24HRVA.cjs.map +0 -7
  30. package/dist/lib/node-esm/chunk-OQOXRHWF.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_ZS24HRVA = require("../chunk-ZS24HRVA.cjs");
35
+ var import_chunk_B64P5OCZ = require("../chunk-B64P5OCZ.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_ZS24HRVA.ServiceContext) {
238
+ if (host instanceof import_chunk_B64P5OCZ.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_ZS24HRVA.ServiceContext) {
248
+ if (guest instanceof import_chunk_B64P5OCZ.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_ZS24HRVA.ClientServicesHost({
258
+ return new import_chunk_B64P5OCZ.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_ZS24HRVA.ServiceContext(storage, level, networkManager, signalManager, void 0, void 0, {
277
+ return new import_chunk_B64P5OCZ.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_ZS24HRVA.DataSpaceManager({
388
+ return this._props.dataSpaceManager ??= new import_chunk_B64P5OCZ.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_ZS24HRVA.InvitationsManager(new import_chunk_ZS24HRVA.InvitationsHandler(this.networkManager), (invitation) => {
403
+ return this._props.invitationsManager ??= new import_chunk_B64P5OCZ.InvitationsManager(new import_chunk_B64P5OCZ.InvitationsHandler(this.networkManager), (invitation) => {
404
404
  if (invitation.kind === import_services2.Invitation.Kind.SPACE) {
405
- return new import_chunk_ZS24HRVA.SpaceInvitationProtocol(this.dataSpaceManager, this.identity, this.keyring, invitation.spaceKey);
405
+ return new import_chunk_B64P5OCZ.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.7.4";
400
+ var DXOS_VERSION = "0.7.5-main.9cb18ac";
401
401
 
402
402
  // packages/sdk/client-services/src/packlets/services/platform.ts
403
403
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -958,21 +958,20 @@ var EdgeFeedReplicator = class extends Resource {
958
958
  });
959
959
  return;
960
960
  }
961
- const logPayload = message.type === "data" ? {
962
- feedKey: message.feedKey,
963
- blocks: message.blocks.map((b) => b.index)
964
- } : {
965
- message
966
- };
967
- log3.info("sending message", logPayload, {
968
- F: __dxlog_file5,
969
- L: 152,
970
- S: this,
971
- C: (f, a) => f(...a)
972
- });
961
+ if (message.type === "data") {
962
+ log3.info("sending blocks", {
963
+ feedKey: message.feedKey,
964
+ blocks: message.blocks.map((b) => b.index)
965
+ }, {
966
+ F: __dxlog_file5,
967
+ L: 151,
968
+ S: this,
969
+ C: (f, a) => f(...a)
970
+ });
971
+ }
973
972
  invariant2(message.feedKey, void 0, {
974
973
  F: __dxlog_file5,
975
- L: 154,
974
+ L: 157,
976
975
  S: this,
977
976
  A: [
978
977
  "message.feedKey",
@@ -984,7 +983,7 @@ var EdgeFeedReplicator = class extends Resource {
984
983
  type: message.type
985
984
  }, {
986
985
  F: __dxlog_file5,
987
- L: 157,
986
+ L: 160,
988
987
  S: this,
989
988
  C: (f, a) => f(...a)
990
989
  });
@@ -1003,7 +1002,7 @@ var EdgeFeedReplicator = class extends Resource {
1003
1002
  if (!this._connectionCtx) {
1004
1003
  log3.warn("received message after connection context was disposed", void 0, {
1005
1004
  F: __dxlog_file5,
1006
- L: 172,
1005
+ L: 175,
1007
1006
  S: this,
1008
1007
  C: (f, a) => f(...a)
1009
1008
  });
@@ -1014,14 +1013,6 @@ var EdgeFeedReplicator = class extends Resource {
1014
1013
  case "metadata": {
1015
1014
  try {
1016
1015
  var _usingCtx = _using_ctx();
1017
- log3.info("received metadata", {
1018
- message
1019
- }, {
1020
- F: __dxlog_file5,
1021
- L: 178,
1022
- S: this,
1023
- C: (f, a) => f(...a)
1024
- });
1025
1016
  const feedKey = PublicKey3.fromHex(message.feedKey);
1026
1017
  const feed = this._feeds.get(feedKey);
1027
1018
  if (!feed) {
@@ -1029,7 +1020,7 @@ var EdgeFeedReplicator = class extends Resource {
1029
1020
  feedKey
1030
1021
  }, {
1031
1022
  F: __dxlog_file5,
1032
- L: 183,
1023
+ L: 184,
1033
1024
  S: this,
1034
1025
  C: (f, a) => f(...a)
1035
1026
  });
@@ -1037,7 +1028,18 @@ var EdgeFeedReplicator = class extends Resource {
1037
1028
  }
1038
1029
  const _guard = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
1039
1030
  this._remoteLength.set(feedKey, message.length);
1031
+ const logMeta = {
1032
+ localLength: feed.length,
1033
+ remoteLength: message.length,
1034
+ feedKey
1035
+ };
1040
1036
  if (message.length > feed.length) {
1037
+ log3.info("requesting missing blocks", logMeta, {
1038
+ F: __dxlog_file5,
1039
+ L: 194,
1040
+ S: this,
1041
+ C: (f, a) => f(...a)
1042
+ });
1041
1043
  await this._sendMessage({
1042
1044
  type: "request",
1043
1045
  feedKey: feedKey.toHex(),
@@ -1047,6 +1049,12 @@ var EdgeFeedReplicator = class extends Resource {
1047
1049
  }
1048
1050
  });
1049
1051
  } else if (message.length < feed.length) {
1052
+ log3.info("pushing blocks to remote", logMeta, {
1053
+ F: __dxlog_file5,
1054
+ L: 202,
1055
+ S: this,
1056
+ C: (f, a) => f(...a)
1057
+ });
1050
1058
  await this._pushBlocks(feed, message.length, feed.length);
1051
1059
  }
1052
1060
  break;
@@ -1062,7 +1070,7 @@ var EdgeFeedReplicator = class extends Resource {
1062
1070
  blocks: message.blocks.map((b) => b.index)
1063
1071
  }, {
1064
1072
  F: __dxlog_file5,
1065
- L: 205,
1073
+ L: 211,
1066
1074
  S: this,
1067
1075
  C: (f, a) => f(...a)
1068
1076
  });
@@ -1073,7 +1081,7 @@ var EdgeFeedReplicator = class extends Resource {
1073
1081
  feedKey
1074
1082
  }, {
1075
1083
  F: __dxlog_file5,
1076
- L: 210,
1084
+ L: 216,
1077
1085
  S: this,
1078
1086
  C: (f, a) => f(...a)
1079
1087
  });
@@ -1087,7 +1095,7 @@ var EdgeFeedReplicator = class extends Resource {
1087
1095
  ...message
1088
1096
  }, {
1089
1097
  F: __dxlog_file5,
1090
- L: 219,
1098
+ L: 225,
1091
1099
  S: this,
1092
1100
  C: (f, a) => f(...a)
1093
1101
  });
@@ -1102,7 +1110,7 @@ var EdgeFeedReplicator = class extends Resource {
1102
1110
  to
1103
1111
  }, {
1104
1112
  F: __dxlog_file5,
1105
- L: 226,
1113
+ L: 232,
1106
1114
  S: this,
1107
1115
  C: (f, a) => f(...a)
1108
1116
  });
@@ -1112,7 +1120,7 @@ var EdgeFeedReplicator = class extends Resource {
1112
1120
  });
1113
1121
  invariant2(data instanceof Uint8Array, void 0, {
1114
1122
  F: __dxlog_file5,
1115
- L: 231,
1123
+ L: 237,
1116
1124
  S: this,
1117
1125
  A: [
1118
1126
  "data instanceof Uint8Array",
@@ -1140,7 +1148,7 @@ var EdgeFeedReplicator = class extends Resource {
1140
1148
  blocks: blocks.length
1141
1149
  }, {
1142
1150
  F: __dxlog_file5,
1143
- L: 252,
1151
+ L: 258,
1144
1152
  S: this,
1145
1153
  C: (f, a) => f(...a)
1146
1154
  });
@@ -1162,7 +1170,7 @@ var EdgeFeedReplicator = class extends Resource {
1162
1170
  if (!this._remoteLength.has(feed.key)) {
1163
1171
  log3("blocks not pushed because remote length is unknown", void 0, {
1164
1172
  F: __dxlog_file5,
1165
- L: 273,
1173
+ L: 279,
1166
1174
  S: this,
1167
1175
  C: (f, a) => f(...a)
1168
1176
  });
@@ -1187,7 +1195,7 @@ var EdgeFeedReplicator = class extends Resource {
1187
1195
  if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
1188
1196
  log3("resetting on reconnect", void 0, {
1189
1197
  F: __dxlog_file5,
1190
- L: 290,
1198
+ L: 296,
1191
1199
  S: this,
1192
1200
  C: (f, a) => f(...a)
1193
1201
  });
@@ -1198,7 +1206,7 @@ var EdgeFeedReplicator = class extends Resource {
1198
1206
  }
1199
1207
  }, {
1200
1208
  F: __dxlog_file5,
1201
- L: 284
1209
+ L: 290
1202
1210
  });
1203
1211
  return connectionCtx;
1204
1212
  }
@@ -1365,6 +1373,7 @@ var NotarizationPlugin = class extends Resource3 {
1365
1373
  this._processedCredentials = new ComplexSet(PublicKey4.hash);
1366
1374
  this._processCredentialsTriggers = new ComplexMap3(PublicKey4.hash);
1367
1375
  this._activeEdgePollingIntervalHandle = void 0;
1376
+ this._activeEdgePollingEnabled = false;
1368
1377
  this._spaceId = params.spaceId;
1369
1378
  this._activeEdgePollingInterval = params.activeEdgePollingInterval ?? DEFAULT_ACTIVE_EDGE_POLLING_INTERVAL;
1370
1379
  if (params.edgeClient && params.edgeFeatures?.feedReplicator) {
@@ -1372,15 +1381,6 @@ var NotarizationPlugin = class extends Resource3 {
1372
1381
  }
1373
1382
  }
1374
1383
  setActiveEdgePollingEnabled(enabled) {
1375
- invariant4(this.isOpen, void 0, {
1376
- F: __dxlog_file7,
1377
- L: 109,
1378
- S: this,
1379
- A: [
1380
- "this.isOpen",
1381
- ""
1382
- ]
1383
- });
1384
1384
  const client = this._edgeClient;
1385
1385
  invariant4(client, void 0, {
1386
1386
  F: __dxlog_file7,
@@ -1391,30 +1391,30 @@ var NotarizationPlugin = class extends Resource3 {
1391
1391
  ""
1392
1392
  ]
1393
1393
  });
1394
- if (enabled && !this._activeEdgePollingIntervalHandle) {
1395
- this._activeEdgePollingIntervalHandle = setInterval(() => {
1396
- if (this._writer) {
1397
- this._notarizePendingEdgeCredentials(client, this._writer);
1398
- }
1399
- }, this._activeEdgePollingInterval);
1400
- } else if (!enabled && this._activeEdgePollingIntervalHandle) {
1401
- clearInterval(this._activeEdgePollingIntervalHandle);
1402
- this._activeEdgePollingIntervalHandle = void 0;
1394
+ this._activeEdgePollingEnabled = enabled;
1395
+ if (this.isOpen) {
1396
+ if (enabled && !this._activeEdgePollingIntervalHandle) {
1397
+ this._startPeriodicEdgePolling(client);
1398
+ } else if (!enabled && this._activeEdgePollingIntervalHandle) {
1399
+ this._stopPeriodicEdgePolling();
1400
+ }
1403
1401
  }
1404
1402
  }
1405
1403
  get hasWriter() {
1406
1404
  return !!this._writer;
1407
1405
  }
1408
1406
  async _open() {
1409
- if (this._edgeClient && this._writer) {
1410
- this._notarizePendingEdgeCredentials(this._edgeClient, this._writer);
1407
+ if (this._edgeClient) {
1408
+ if (this._activeEdgePollingEnabled) {
1409
+ this._startPeriodicEdgePolling(this._edgeClient);
1410
+ }
1411
+ if (this._writer) {
1412
+ this._notarizePendingEdgeCredentials(this._edgeClient, this._writer);
1413
+ }
1411
1414
  }
1412
1415
  }
1413
1416
  async _close() {
1414
- if (this._activeEdgePollingIntervalHandle) {
1415
- clearInterval(this._activeEdgePollingIntervalHandle);
1416
- this._activeEdgePollingIntervalHandle = void 0;
1417
- }
1417
+ this._stopPeriodicEdgePolling();
1418
1418
  await this._ctx.dispose();
1419
1419
  }
1420
1420
  /**
@@ -1592,10 +1592,23 @@ var NotarizationPlugin = class extends Resource3 {
1592
1592
  ]
1593
1593
  });
1594
1594
  this._writer = writer;
1595
- if (this._edgeClient) {
1595
+ if (this._edgeClient && this.isOpen) {
1596
1596
  this._notarizePendingEdgeCredentials(this._edgeClient, writer);
1597
1597
  }
1598
1598
  }
1599
+ _startPeriodicEdgePolling(client) {
1600
+ this._activeEdgePollingIntervalHandle = setInterval(() => {
1601
+ if (this._writer) {
1602
+ this._notarizePendingEdgeCredentials(client, this._writer);
1603
+ }
1604
+ }, this._activeEdgePollingInterval);
1605
+ }
1606
+ _stopPeriodicEdgePolling() {
1607
+ if (this._activeEdgePollingIntervalHandle) {
1608
+ clearInterval(this._activeEdgePollingIntervalHandle);
1609
+ this._activeEdgePollingIntervalHandle = void 0;
1610
+ }
1611
+ }
1599
1612
  /**
1600
1613
  * The method is used only for adding agent feeds to spaces.
1601
1614
  * When an agent is created we can admit them into all the existing spaces. In case the operation fails
@@ -1614,7 +1627,7 @@ var NotarizationPlugin = class extends Resource3 {
1614
1627
  if (!credentials.length) {
1615
1628
  log4("edge did not return credentials for notarization", void 0, {
1616
1629
  F: __dxlog_file7,
1617
- L: 296,
1630
+ L: 311,
1618
1631
  S: this,
1619
1632
  C: (f, a) => f(...a)
1620
1633
  });
@@ -1624,7 +1637,7 @@ var NotarizationPlugin = class extends Resource3 {
1624
1637
  count: credentials.length
1625
1638
  }, {
1626
1639
  F: __dxlog_file7,
1627
- L: 300,
1640
+ L: 315,
1628
1641
  S: this,
1629
1642
  C: (f, a) => f(...a)
1630
1643
  });
@@ -1637,7 +1650,7 @@ var NotarizationPlugin = class extends Resource3 {
1637
1650
  count: decodedCredentials.length
1638
1651
  }, {
1639
1652
  F: __dxlog_file7,
1640
- L: 309,
1653
+ L: 324,
1641
1654
  S: this,
1642
1655
  C: (f, a) => f(...a)
1643
1656
  });
@@ -1665,7 +1678,7 @@ var NotarizationPlugin = class extends Resource3 {
1665
1678
  for (const credential of credentials) {
1666
1679
  invariant4(credential.id, "Credential must have an id", {
1667
1680
  F: __dxlog_file7,
1668
- L: 335,
1681
+ L: 350,
1669
1682
  S: this,
1670
1683
  A: [
1671
1684
  "credential.id",
@@ -1689,7 +1702,7 @@ var NotarizationPlugin = class extends Resource3 {
1689
1702
  peer: extension.localPeerId
1690
1703
  }, {
1691
1704
  F: __dxlog_file7,
1692
- L: 350,
1705
+ L: 365,
1693
1706
  S: this,
1694
1707
  C: (f, a) => f(...a)
1695
1708
  });
@@ -1701,7 +1714,7 @@ var NotarizationPlugin = class extends Resource3 {
1701
1714
  peer: extension.localPeerId
1702
1715
  }, {
1703
1716
  F: __dxlog_file7,
1704
- L: 355,
1717
+ L: 370,
1705
1718
  S: this,
1706
1719
  C: (f, a) => f(...a)
1707
1720
  });
@@ -1718,7 +1731,7 @@ var NotarizationPlugin = class extends Resource3 {
1718
1731
  peers: Array.from(this._extensions).map((extension) => extension.remotePeerId)
1719
1732
  }, {
1720
1733
  F: __dxlog_file7,
1721
- L: 367,
1734
+ L: 382,
1722
1735
  S: this,
1723
1736
  C: (f, a) => f(...a)
1724
1737
  });
@@ -1734,7 +1747,7 @@ var handleEdgeError = (error) => {
1734
1747
  if (!(error instanceof EdgeCallFailedError) || error.errorData) {
1735
1748
  log4.catch(error, void 0, {
1736
1749
  F: __dxlog_file7,
1737
- L: 381,
1750
+ L: 396,
1738
1751
  S: void 0,
1739
1752
  C: (f, a) => f(...a)
1740
1753
  });
@@ -1743,7 +1756,7 @@ var handleEdgeError = (error) => {
1743
1756
  reason: error.reason
1744
1757
  }, {
1745
1758
  F: __dxlog_file7,
1746
- L: 383,
1759
+ L: 398,
1747
1760
  S: void 0,
1748
1761
  C: (f, a) => f(...a)
1749
1762
  });
@@ -7479,7 +7492,8 @@ var ServiceContext = class extends Resource7 {
7479
7492
  this.recoveryManager = new EdgeIdentityRecoveryManager(this.keyring, this._edgeHttpClient, () => this.identityManager.identity, this._acceptIdentity.bind(this));
7480
7493
  this.echoHost = new EchoHost({
7481
7494
  kv: this.level,
7482
- peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex()
7495
+ peerIdProvider: () => this.identityManager.identity?.deviceKey?.toHex(),
7496
+ getSpaceKeyByRootDocumentId: (documentId) => this.spaceManager.findSpaceByRootDocumentId(documentId)?.key
7483
7497
  });
7484
7498
  this._meshReplicator = new MeshEchoReplicator();
7485
7499
  this.invitations = new InvitationsHandler(this.networkManager, this._edgeHttpClient, _runtimeParams?.invitationConnectionDefaultParams);
@@ -7498,7 +7512,7 @@ var ServiceContext = class extends Resource7 {
7498
7512
  await this._checkStorageVersion();
7499
7513
  log23("opening...", void 0, {
7500
7514
  F: __dxlog_file27,
7501
- L: 198,
7515
+ L: 199,
7502
7516
  S: this,
7503
7517
  C: (f, a) => f(...a)
7504
7518
  });
@@ -7506,7 +7520,7 @@ var ServiceContext = class extends Resource7 {
7506
7520
  id: this._instanceId
7507
7521
  }), {
7508
7522
  F: __dxlog_file27,
7509
- L: 199,
7523
+ L: 200,
7510
7524
  S: this,
7511
7525
  C: (f, a) => f(...a)
7512
7526
  });
@@ -7533,7 +7547,7 @@ var ServiceContext = class extends Resource7 {
7533
7547
  count: loadedInvitations.invitations?.length
7534
7548
  }, {
7535
7549
  F: __dxlog_file27,
7536
- L: 227,
7550
+ L: 228,
7537
7551
  S: this,
7538
7552
  C: (f, a) => f(...a)
7539
7553
  });
@@ -7541,13 +7555,13 @@ var ServiceContext = class extends Resource7 {
7541
7555
  id: this._instanceId
7542
7556
  }), {
7543
7557
  F: __dxlog_file27,
7544
- L: 229,
7558
+ L: 230,
7545
7559
  S: this,
7546
7560
  C: (f, a) => f(...a)
7547
7561
  });
7548
7562
  log23("opened", void 0, {
7549
7563
  F: __dxlog_file27,
7550
- L: 230,
7564
+ L: 231,
7551
7565
  S: this,
7552
7566
  C: (f, a) => f(...a)
7553
7567
  });
@@ -7555,7 +7569,7 @@ var ServiceContext = class extends Resource7 {
7555
7569
  async _close(ctx) {
7556
7570
  log23("closing...", void 0, {
7557
7571
  F: __dxlog_file27,
7558
- L: 234,
7572
+ L: 235,
7559
7573
  S: this,
7560
7574
  C: (f, a) => f(...a)
7561
7575
  });
@@ -7574,7 +7588,7 @@ var ServiceContext = class extends Resource7 {
7574
7588
  await this._edgeConnection?.close();
7575
7589
  log23("closed", void 0, {
7576
7590
  F: __dxlog_file27,
7577
- L: 250,
7591
+ L: 251,
7578
7592
  S: this,
7579
7593
  C: (f, a) => f(...a)
7580
7594
  });
@@ -7585,7 +7599,7 @@ var ServiceContext = class extends Resource7 {
7585
7599
  await identity.joinNetwork();
7586
7600
  await this._initialize(new Context9(void 0, {
7587
7601
  F: __dxlog_file27,
7588
- L: 257
7602
+ L: 258
7589
7603
  }));
7590
7604
  return identity;
7591
7605
  }
@@ -7596,7 +7610,7 @@ var ServiceContext = class extends Resource7 {
7596
7610
  const factory = this._handlerFactories.get(invitation.kind);
7597
7611
  invariant21(factory, `Unknown invitation kind: ${invitation.kind}`, {
7598
7612
  F: __dxlog_file27,
7599
- L: 266,
7613
+ L: 267,
7600
7614
  S: this,
7601
7615
  A: [
7602
7616
  "factory",
@@ -7622,7 +7636,7 @@ var ServiceContext = class extends Resource7 {
7622
7636
  await this.identityManager.acceptIdentity(identity, identityRecord, params.deviceProfile);
7623
7637
  await this._initialize(new Context9(void 0, {
7624
7638
  F: __dxlog_file27,
7625
- L: 285
7639
+ L: 286
7626
7640
  }));
7627
7641
  return identity;
7628
7642
  }
@@ -7636,7 +7650,7 @@ var ServiceContext = class extends Resource7 {
7636
7650
  async _initialize(ctx) {
7637
7651
  log23("initializing spaces...", void 0, {
7638
7652
  F: __dxlog_file27,
7639
- L: 300,
7653
+ L: 301,
7640
7654
  S: this,
7641
7655
  C: (f, a) => f(...a)
7642
7656
  });
@@ -7675,7 +7689,7 @@ var ServiceContext = class extends Resource7 {
7675
7689
  this._handlerFactories.set(Invitation10.Kind.SPACE, (invitation) => {
7676
7690
  invariant21(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
7677
7691
  F: __dxlog_file27,
7678
- L: 338,
7692
+ L: 339,
7679
7693
  S: this,
7680
7694
  A: [
7681
7695
  "this.dataSpaceManager",
@@ -7699,7 +7713,7 @@ var ServiceContext = class extends Resource7 {
7699
7713
  details: assertion
7700
7714
  }, {
7701
7715
  F: __dxlog_file27,
7702
- L: 354,
7716
+ L: 355,
7703
7717
  S: this,
7704
7718
  C: (f, a) => f(...a)
7705
7719
  });
@@ -7710,7 +7724,7 @@ var ServiceContext = class extends Resource7 {
7710
7724
  details: assertion
7711
7725
  }, {
7712
7726
  F: __dxlog_file27,
7713
- L: 358,
7727
+ L: 359,
7714
7728
  S: this,
7715
7729
  C: (f, a) => f(...a)
7716
7730
  });
@@ -7721,7 +7735,7 @@ var ServiceContext = class extends Resource7 {
7721
7735
  details: assertion
7722
7736
  }, {
7723
7737
  F: __dxlog_file27,
7724
- L: 363,
7738
+ L: 364,
7725
7739
  S: this,
7726
7740
  C: (f, a) => f(...a)
7727
7741
  });
@@ -7732,7 +7746,7 @@ var ServiceContext = class extends Resource7 {
7732
7746
  } catch (err) {
7733
7747
  log23.catch(err, void 0, {
7734
7748
  F: __dxlog_file27,
7735
- L: 369,
7749
+ L: 370,
7736
7750
  S: this,
7737
7751
  C: (f, a) => f(...a)
7738
7752
  });
@@ -7748,12 +7762,12 @@ var ServiceContext = class extends Resource7 {
7748
7762
  let edgeIdentity;
7749
7763
  const identity = this.identityManager.identity;
7750
7764
  if (identity) {
7751
- log23.info("Setting identity on edge connection", {
7765
+ log23("setting identity on edge connection", {
7752
7766
  identity: identity.identityKey.toHex(),
7753
7767
  swarms: this.networkManager.topics
7754
7768
  }, {
7755
7769
  F: __dxlog_file27,
7756
- L: 383,
7770
+ L: 384,
7757
7771
  S: this,
7758
7772
  C: (f, a) => f(...a)
7759
7773
  });
@@ -7767,7 +7781,7 @@ var ServiceContext = class extends Resource7 {
7767
7781
  });
7768
7782
  invariant21(identity.deviceCredentialChain, void 0, {
7769
7783
  F: __dxlog_file27,
7770
- L: 401,
7784
+ L: 403,
7771
7785
  S: this,
7772
7786
  A: [
7773
7787
  "identity.deviceCredentialChain",
@@ -8910,4 +8924,4 @@ export {
8910
8924
  importProfileData,
8911
8925
  ClientServicesHost
8912
8926
  };
8913
- //# sourceMappingURL=chunk-OQOXRHWF.mjs.map
8927
+ //# sourceMappingURL=chunk-C3BNCKWT.mjs.map