@dxos/client-services 0.3.11-main.86514dd → 0.3.11-main.8a122b0

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-JVKBYAG7.mjs → chunk-AIYZPFSH.mjs} +87 -52
  2. package/dist/lib/browser/chunk-AIYZPFSH.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/packlets/testing/index.mjs +4 -11
  6. package/dist/lib/browser/packlets/testing/index.mjs.map +3 -3
  7. package/dist/lib/node/{chunk-T44RBEZ6.cjs → chunk-ORVXDSPU.cjs} +147 -112
  8. package/dist/lib/node/chunk-ORVXDSPU.cjs.map +7 -0
  9. package/dist/lib/node/index.cjs +37 -37
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node/packlets/testing/index.cjs +11 -18
  12. package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
  13. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +2 -0
  14. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
  15. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +28 -3
  16. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
  17. package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
  18. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +2 -0
  19. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  20. package/dist/types/src/packlets/services/diagnostics.d.ts +4 -0
  21. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  22. package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
  23. package/dist/types/src/version.d.ts +1 -1
  24. package/package.json +35 -35
  25. package/src/packlets/invitations/device-invitation-protocol.test.ts +14 -0
  26. package/src/packlets/invitations/device-invitation-protocol.ts +14 -0
  27. package/src/packlets/invitations/invitation-protocol.ts +44 -6
  28. package/src/packlets/invitations/invitations-handler.ts +19 -17
  29. package/src/packlets/invitations/space-invitation-protocol.test.ts +28 -0
  30. package/src/packlets/invitations/space-invitation-protocol.ts +11 -0
  31. package/src/packlets/services/diagnostics.ts +18 -0
  32. package/src/packlets/spaces/spaces-service.ts +1 -1
  33. package/src/packlets/testing/invitation-utils.ts +2 -10
  34. package/src/version.ts +1 -1
  35. package/dist/lib/browser/chunk-JVKBYAG7.mjs.map +0 -7
  36. package/dist/lib/node/chunk-T44RBEZ6.cjs.map +0 -7
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_T44RBEZ6_exports = {};
30
- __export(chunk_T44RBEZ6_exports, {
29
+ var chunk_ORVXDSPU_exports = {};
30
+ __export(chunk_ORVXDSPU_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -60,7 +60,7 @@ __export(chunk_T44RBEZ6_exports, {
60
60
  subscribeToSpaces: () => subscribeToSpaces,
61
61
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
62
62
  });
63
- module.exports = __toCommonJS(chunk_T44RBEZ6_exports);
63
+ module.exports = __toCommonJS(chunk_ORVXDSPU_exports);
64
64
  var import_async = require("@dxos/async");
65
65
  var import_codec_protobuf = require("@dxos/codec-protobuf");
66
66
  var import_feed_store = require("@dxos/feed-store");
@@ -108,6 +108,7 @@ var import_credentials6 = require("@dxos/credentials");
108
108
  var import_debug2 = require("@dxos/debug");
109
109
  var import_invariant3 = require("@dxos/invariant");
110
110
  var import_invariant4 = require("@dxos/invariant");
111
+ var import_protocols3 = require("@dxos/protocols");
111
112
  var import_services = require("@dxos/protocols/proto/dxos/client/services");
112
113
  var import_async7 = require("@dxos/async");
113
114
  var import_client_protocol2 = require("@dxos/client-protocol");
@@ -117,7 +118,7 @@ var import_invariant5 = require("@dxos/invariant");
117
118
  var import_keys5 = require("@dxos/keys");
118
119
  var import_log4 = require("@dxos/log");
119
120
  var import_network_manager = require("@dxos/network-manager");
120
- var import_protocols3 = require("@dxos/protocols");
121
+ var import_protocols4 = require("@dxos/protocols");
121
122
  var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
122
123
  var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
123
124
  var import_async8 = require("@dxos/async");
@@ -125,7 +126,7 @@ var import_context5 = require("@dxos/context");
125
126
  var import_invariant6 = require("@dxos/invariant");
126
127
  var import_keys6 = require("@dxos/keys");
127
128
  var import_log5 = require("@dxos/log");
128
- var import_protocols4 = require("@dxos/protocols");
129
+ var import_protocols5 = require("@dxos/protocols");
129
130
  var import_services3 = require("@dxos/protocols/proto/dxos/client/services");
130
131
  var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations");
131
132
  var import_teleport = require("@dxos/teleport");
@@ -138,6 +139,7 @@ var import_credentials8 = require("@dxos/credentials");
138
139
  var import_feed_store3 = require("@dxos/feed-store");
139
140
  var import_invariant8 = require("@dxos/invariant");
140
141
  var import_log7 = require("@dxos/log");
142
+ var import_protocols6 = require("@dxos/protocols");
141
143
  var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
142
144
  var import_codec_protobuf9 = require("@dxos/codec-protobuf");
143
145
  var import_debug3 = require("@dxos/debug");
@@ -149,7 +151,7 @@ var import_document_model = require("@dxos/document-model");
149
151
  var import_echo_db = require("@dxos/echo-db");
150
152
  var import_invariant9 = require("@dxos/invariant");
151
153
  var import_log8 = require("@dxos/log");
152
- var import_protocols5 = require("@dxos/protocols");
154
+ var import_protocols7 = require("@dxos/protocols");
153
155
  var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
154
156
  var import_async10 = require("@dxos/async");
155
157
  var import_client_protocol3 = require("@dxos/client-protocol");
@@ -158,7 +160,7 @@ var import_debug4 = require("@dxos/debug");
158
160
  var import_echo_pipeline = require("@dxos/echo-pipeline");
159
161
  var import_keys7 = require("@dxos/keys");
160
162
  var import_log9 = require("@dxos/log");
161
- var import_protocols6 = require("@dxos/protocols");
163
+ var import_protocols8 = require("@dxos/protocols");
162
164
  var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
163
165
  var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
164
166
  var import_timeframe2 = require("@dxos/timeframe");
@@ -170,7 +172,7 @@ var import_context7 = require("@dxos/context");
170
172
  var import_invariant10 = require("@dxos/invariant");
171
173
  var import_keys8 = require("@dxos/keys");
172
174
  var import_log10 = require("@dxos/log");
173
- var import_protocols7 = require("@dxos/protocols");
175
+ var import_protocols9 = require("@dxos/protocols");
174
176
  var import_teleport2 = require("@dxos/teleport");
175
177
  var import_util5 = require("@dxos/util");
176
178
  var import_async12 = require("@dxos/async");
@@ -179,7 +181,7 @@ var import_credentials12 = require("@dxos/credentials");
179
181
  var import_invariant11 = require("@dxos/invariant");
180
182
  var import_keys9 = require("@dxos/keys");
181
183
  var import_log11 = require("@dxos/log");
182
- var import_protocols8 = require("@dxos/protocols");
184
+ var import_protocols10 = require("@dxos/protocols");
183
185
  var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
184
186
  var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
185
187
  var import_util6 = require("@dxos/util");
@@ -192,7 +194,7 @@ var import_codec_protobuf11 = require("@dxos/codec-protobuf");
192
194
  var import_debug6 = require("@dxos/debug");
193
195
  var import_invariant12 = require("@dxos/invariant");
194
196
  var import_log12 = require("@dxos/log");
195
- var import_protocols9 = require("@dxos/protocols");
197
+ var import_protocols11 = require("@dxos/protocols");
196
198
  var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
197
199
  var import_async14 = require("@dxos/async");
198
200
  var import_context9 = require("@dxos/context");
@@ -204,7 +206,7 @@ var import_invariant13 = require("@dxos/invariant");
204
206
  var import_keyring = require("@dxos/keyring");
205
207
  var import_keys10 = require("@dxos/keys");
206
208
  var import_log13 = require("@dxos/log");
207
- var import_protocols10 = require("@dxos/protocols");
209
+ var import_protocols12 = require("@dxos/protocols");
208
210
  var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
209
211
  var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
210
212
  var import_tracing5 = require("@dxos/tracing");
@@ -213,7 +215,7 @@ var import_invariant14 = require("@dxos/invariant");
213
215
  var import_lock_file = require("@dxos/lock-file");
214
216
  var import_log14 = require("@dxos/log");
215
217
  var import_client_protocol4 = require("@dxos/client-protocol");
216
- var import_protocols11 = require("@dxos/protocols");
218
+ var import_protocols13 = require("@dxos/protocols");
217
219
  var import_config = require("@dxos/protocols/proto/dxos/config");
218
220
  var import_random_access_storage = require("@dxos/random-access-storage");
219
221
  var import_util8 = require("@dxos/util");
@@ -229,7 +231,7 @@ var import_log15 = require("@dxos/log");
229
231
  var import_messaging = require("@dxos/messaging");
230
232
  var import_model_factory = require("@dxos/model-factory");
231
233
  var import_network_manager2 = require("@dxos/network-manager");
232
- var import_protocols12 = require("@dxos/protocols");
234
+ var import_protocols14 = require("@dxos/protocols");
233
235
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
234
236
  var import_text_model = require("@dxos/text-model");
235
237
  var import_tracing6 = require("@dxos/tracing");
@@ -1282,7 +1284,7 @@ var DeviceInvitationProtocol = class {
1282
1284
  async admit(request) {
1283
1285
  (0, import_invariant4.invariant)(request.device, void 0, {
1284
1286
  F: __dxlog_file5,
1285
- L: 35,
1287
+ L: 36,
1286
1288
  S: this,
1287
1289
  A: [
1288
1290
  "request.device",
@@ -1300,6 +1302,15 @@ var DeviceInvitationProtocol = class {
1300
1302
  }
1301
1303
  };
1302
1304
  }
1305
+ checkInvitation(invitation) {
1306
+ try {
1307
+ const identity = this._getIdentity();
1308
+ if (identity) {
1309
+ return new import_protocols3.AlreadyJoinedError("Currently only one identity per client is supported.");
1310
+ }
1311
+ } catch {
1312
+ }
1313
+ }
1303
1314
  createIntroduction() {
1304
1315
  return {};
1305
1316
  }
@@ -1318,7 +1329,7 @@ var DeviceInvitationProtocol = class {
1318
1329
  async accept(response, request) {
1319
1330
  (0, import_invariant4.invariant)(response.device, void 0, {
1320
1331
  F: __dxlog_file5,
1321
- L: 68,
1332
+ L: 80,
1322
1333
  S: this,
1323
1334
  A: [
1324
1335
  "response.device",
@@ -1328,7 +1339,7 @@ var DeviceInvitationProtocol = class {
1328
1339
  const { identityKey, haloSpaceKey, genesisFeedKey, controlTimeframe } = response.device;
1329
1340
  (0, import_invariant4.invariant)(request.device, void 0, {
1330
1341
  F: __dxlog_file5,
1331
- L: 71,
1342
+ L: 83,
1332
1343
  S: this,
1333
1344
  A: [
1334
1345
  "request.device",
@@ -1357,10 +1368,10 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1357
1368
  constructor(_callbacks) {
1358
1369
  super({
1359
1370
  requested: {
1360
- InvitationHostService: import_protocols4.schema.getService("dxos.halo.invitations.InvitationHostService")
1371
+ InvitationHostService: import_protocols5.schema.getService("dxos.halo.invitations.InvitationHostService")
1361
1372
  },
1362
1373
  exposed: {
1363
- InvitationHostService: import_protocols4.schema.getService("dxos.halo.invitations.InvitationHostService")
1374
+ InvitationHostService: import_protocols5.schema.getService("dxos.halo.invitations.InvitationHostService")
1364
1375
  }
1365
1376
  });
1366
1377
  this._callbacks = _callbacks;
@@ -1393,7 +1404,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1393
1404
  introduce: async (request) => {
1394
1405
  const { profile, invitationId } = request;
1395
1406
  const traceId = import_keys6.PublicKey.random().toHex();
1396
- import_log5.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols4.trace.begin({
1407
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols5.trace.begin({
1397
1408
  id: traceId
1398
1409
  }), {
1399
1410
  F: __dxlog_file6,
@@ -1430,7 +1441,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1430
1441
  ...this.invitation,
1431
1442
  state: import_services3.Invitation.State.READY_FOR_AUTHENTICATION
1432
1443
  });
1433
- import_log5.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols4.trace.end({
1444
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols5.trace.end({
1434
1445
  id: traceId
1435
1446
  }), {
1436
1447
  F: __dxlog_file6,
@@ -1444,7 +1455,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1444
1455
  },
1445
1456
  authenticate: async ({ authCode: code }) => {
1446
1457
  const traceId = import_keys6.PublicKey.random().toHex();
1447
- import_log5.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols4.trace.begin({
1458
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols5.trace.begin({
1448
1459
  id: traceId
1449
1460
  }), {
1450
1461
  F: __dxlog_file6,
@@ -1507,7 +1518,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1507
1518
  break;
1508
1519
  }
1509
1520
  }
1510
- import_log5.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols4.trace.end({
1521
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols5.trace.end({
1511
1522
  id: traceId,
1512
1523
  data: {
1513
1524
  status
@@ -1524,7 +1535,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1524
1535
  },
1525
1536
  admit: async (request) => {
1526
1537
  const traceId = import_keys6.PublicKey.random().toHex();
1527
- import_log5.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols4.trace.begin({
1538
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols5.trace.begin({
1528
1539
  id: traceId
1529
1540
  }), {
1530
1541
  F: __dxlog_file6,
@@ -1546,7 +1557,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1546
1557
  throw new Error("Not authenticated");
1547
1558
  }
1548
1559
  const response = await this._callbacks.admit(request);
1549
- import_log5.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols4.trace.end({
1560
+ import_log5.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols5.trace.end({
1550
1561
  id: traceId
1551
1562
  }), {
1552
1563
  F: __dxlog_file6,
@@ -1573,7 +1584,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1573
1584
  timeout: OPTIONS_TIMEOUT
1574
1585
  }));
1575
1586
  if (this._remoteOptions?.role !== import_invitations2.Options.Role.GUEST) {
1576
- throw new import_protocols4.InvalidInvitationExtensionRoleError(void 0, {
1587
+ throw new import_protocols5.InvalidInvitationExtensionRoleError(void 0, {
1577
1588
  expected: import_invitations2.Options.Role.GUEST,
1578
1589
  remoteOptions: this._remoteOptions
1579
1590
  });
@@ -1591,10 +1602,10 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1591
1602
  constructor(_callbacks) {
1592
1603
  super({
1593
1604
  requested: {
1594
- InvitationHostService: import_protocols4.schema.getService("dxos.halo.invitations.InvitationHostService")
1605
+ InvitationHostService: import_protocols5.schema.getService("dxos.halo.invitations.InvitationHostService")
1595
1606
  },
1596
1607
  exposed: {
1597
- InvitationHostService: import_protocols4.schema.getService("dxos.halo.invitations.InvitationHostService")
1608
+ InvitationHostService: import_protocols5.schema.getService("dxos.halo.invitations.InvitationHostService")
1598
1609
  }
1599
1610
  });
1600
1611
  this._callbacks = _callbacks;
@@ -1651,7 +1662,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1651
1662
  C: (f, a) => f(...a)
1652
1663
  });
1653
1664
  if (this._remoteOptions?.role !== import_invitations2.Options.Role.HOST) {
1654
- throw new import_protocols4.InvalidInvitationExtensionRoleError(void 0, {
1665
+ throw new import_protocols5.InvalidInvitationExtensionRoleError(void 0, {
1655
1666
  expected: import_invitations2.Options.Role.HOST,
1656
1667
  remoteOptions: this._remoteOptions
1657
1668
  });
@@ -1764,7 +1775,7 @@ var InvitationsHandler = class {
1764
1775
  (0, import_async7.scheduleTask)(ctx, async () => {
1765
1776
  const traceId = import_keys5.PublicKey.random().toHex();
1766
1777
  try {
1767
- import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols3.trace.begin({
1778
+ import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.begin({
1768
1779
  id: traceId
1769
1780
  }), {
1770
1781
  F: __dxlog_file7,
@@ -1800,7 +1811,7 @@ var InvitationsHandler = class {
1800
1811
  ...invitation,
1801
1812
  state: import_services2.Invitation.State.SUCCESS
1802
1813
  });
1803
- import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols3.trace.end({
1814
+ import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.end({
1804
1815
  id: traceId
1805
1816
  }), {
1806
1817
  F: __dxlog_file7,
@@ -1831,7 +1842,7 @@ var InvitationsHandler = class {
1831
1842
  });
1832
1843
  stream.error(err);
1833
1844
  }
1834
- import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols3.trace.error({
1845
+ import_log4.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.error({
1835
1846
  id: traceId,
1836
1847
  error: err
1837
1848
  }), {
@@ -1849,7 +1860,7 @@ var InvitationsHandler = class {
1849
1860
  });
1850
1861
  },
1851
1862
  onError: (err) => {
1852
- if (err instanceof import_protocols3.InvalidInvitationExtensionRoleError) {
1863
+ if (err instanceof import_protocols4.InvalidInvitationExtensionRoleError) {
1853
1864
  return;
1854
1865
  }
1855
1866
  if (err instanceof import_async7.TimeoutError) {
@@ -1997,7 +2008,7 @@ var InvitationsHandler = class {
1997
2008
  (0, import_async7.scheduleTask)(ctx, async () => {
1998
2009
  const traceId = import_keys5.PublicKey.random().toHex();
1999
2010
  try {
2000
- import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols3.trace.begin({
2011
+ import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.begin({
2001
2012
  id: traceId
2002
2013
  }), {
2003
2014
  F: __dxlog_file7,
@@ -2084,16 +2095,12 @@ var InvitationsHandler = class {
2084
2095
  }
2085
2096
  }
2086
2097
  }
2087
- } else {
2088
- setState({
2089
- state: import_services2.Invitation.State.READY_FOR_AUTHENTICATION
2090
- });
2091
2098
  }
2092
2099
  (0, import_log4.log)("request admission", {
2093
2100
  ...protocol.toJSON()
2094
2101
  }, {
2095
2102
  F: __dxlog_file7,
2096
- L: 312,
2103
+ L: 309,
2097
2104
  S: this,
2098
2105
  C: (f, a) => f(...a)
2099
2106
  });
@@ -2105,7 +2112,7 @@ var InvitationsHandler = class {
2105
2112
  ...protocol.toJSON()
2106
2113
  }, {
2107
2114
  F: __dxlog_file7,
2108
- L: 323,
2115
+ L: 320,
2109
2116
  S: this,
2110
2117
  C: (f, a) => f(...a)
2111
2118
  });
@@ -2114,11 +2121,11 @@ var InvitationsHandler = class {
2114
2121
  target: invitation.target,
2115
2122
  state: import_services2.Invitation.State.SUCCESS
2116
2123
  });
2117
- import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols3.trace.end({
2124
+ import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.end({
2118
2125
  id: traceId
2119
2126
  }), {
2120
2127
  F: __dxlog_file7,
2121
- L: 325,
2128
+ L: 322,
2122
2129
  S: this,
2123
2130
  C: (f, a) => f(...a)
2124
2131
  });
@@ -2128,7 +2135,7 @@ var InvitationsHandler = class {
2128
2135
  ...protocol.toJSON()
2129
2136
  }, {
2130
2137
  F: __dxlog_file7,
2131
- L: 328,
2138
+ L: 325,
2132
2139
  S: this,
2133
2140
  C: (f, a) => f(...a)
2134
2141
  });
@@ -2138,18 +2145,18 @@ var InvitationsHandler = class {
2138
2145
  } else {
2139
2146
  (0, import_log4.log)("auth failed", err, {
2140
2147
  F: __dxlog_file7,
2141
- L: 331,
2148
+ L: 328,
2142
2149
  S: this,
2143
2150
  C: (f, a) => f(...a)
2144
2151
  });
2145
2152
  stream.error(err);
2146
2153
  }
2147
- import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols3.trace.error({
2154
+ import_log4.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.error({
2148
2155
  id: traceId,
2149
2156
  error: err
2150
2157
  }), {
2151
2158
  F: __dxlog_file7,
2152
- L: 334,
2159
+ L: 331,
2153
2160
  S: this,
2154
2161
  C: (f, a) => f(...a)
2155
2162
  });
@@ -2159,7 +2166,7 @@ var InvitationsHandler = class {
2159
2166
  });
2160
2167
  },
2161
2168
  onError: (err) => {
2162
- if (err instanceof import_protocols3.InvalidInvitationExtensionRoleError) {
2169
+ if (err instanceof import_protocols4.InvalidInvitationExtensionRoleError) {
2163
2170
  return;
2164
2171
  }
2165
2172
  if (err instanceof import_async7.TimeoutError) {
@@ -2167,7 +2174,7 @@ var InvitationsHandler = class {
2167
2174
  ...protocol.toJSON()
2168
2175
  }, {
2169
2176
  F: __dxlog_file7,
2170
- L: 345,
2177
+ L: 342,
2171
2178
  S: this,
2172
2179
  C: (f, a) => f(...a)
2173
2180
  });
@@ -2177,7 +2184,7 @@ var InvitationsHandler = class {
2177
2184
  } else {
2178
2185
  (0, import_log4.log)("auth failed", err, {
2179
2186
  F: __dxlog_file7,
2180
- L: 348,
2187
+ L: 345,
2181
2188
  S: this,
2182
2189
  C: (f, a) => f(...a)
2183
2190
  });
@@ -2188,29 +2195,34 @@ var InvitationsHandler = class {
2188
2195
  return extension;
2189
2196
  };
2190
2197
  (0, import_async7.scheduleTask)(ctx, async () => {
2191
- (0, import_invariant5.invariant)(invitation.swarmKey, void 0, {
2192
- F: __dxlog_file7,
2193
- L: 358,
2194
- S: this,
2195
- A: [
2196
- "invitation.swarmKey",
2197
- ""
2198
- ]
2199
- });
2200
- const topic = invitation.swarmKey;
2201
- const swarmConnection = await this._networkManager.joinSwarm({
2202
- topic,
2203
- peerId: import_keys5.PublicKey.random(),
2204
- protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
2205
- teleport.addExtension("dxos.halo.invitations", createExtension());
2206
- }),
2207
- topology: new import_network_manager.StarTopology(topic),
2208
- label: "invitation guest"
2209
- });
2210
- ctx.onDispose(() => swarmConnection.close());
2211
- setState({
2212
- state: import_services2.Invitation.State.CONNECTING
2213
- });
2198
+ const error = protocol.checkInvitation(invitation);
2199
+ if (error) {
2200
+ stream.error(error);
2201
+ } else {
2202
+ (0, import_invariant5.invariant)(invitation.swarmKey, void 0, {
2203
+ F: __dxlog_file7,
2204
+ L: 359,
2205
+ S: this,
2206
+ A: [
2207
+ "invitation.swarmKey",
2208
+ ""
2209
+ ]
2210
+ });
2211
+ const topic = invitation.swarmKey;
2212
+ const swarmConnection = await this._networkManager.joinSwarm({
2213
+ topic,
2214
+ peerId: import_keys5.PublicKey.random(),
2215
+ protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
2216
+ teleport.addExtension("dxos.halo.invitations", createExtension());
2217
+ }),
2218
+ topology: new import_network_manager.StarTopology(topic),
2219
+ label: "invitation guest"
2220
+ });
2221
+ ctx.onDispose(() => swarmConnection.close());
2222
+ setState({
2223
+ state: import_services2.Invitation.State.CONNECTING
2224
+ });
2225
+ }
2214
2226
  });
2215
2227
  const observable = new import_client_protocol2.AuthenticatingInvitation({
2216
2228
  initialInvitation: invitation,
@@ -2426,7 +2438,7 @@ var SpaceInvitationProtocol = class {
2426
2438
  async admit(request, guestProfile) {
2427
2439
  (0, import_invariant8.invariant)(this._spaceKey, void 0, {
2428
2440
  F: __dxlog_file9,
2429
- L: 46,
2441
+ L: 47,
2430
2442
  S: this,
2431
2443
  A: [
2432
2444
  "this._spaceKey",
@@ -2436,7 +2448,7 @@ var SpaceInvitationProtocol = class {
2436
2448
  const space = await this._spaceManager.spaces.get(this._spaceKey);
2437
2449
  (0, import_invariant8.invariant)(space, void 0, {
2438
2450
  F: __dxlog_file9,
2439
- L: 48,
2451
+ L: 49,
2440
2452
  S: this,
2441
2453
  A: [
2442
2454
  "space",
@@ -2445,7 +2457,7 @@ var SpaceInvitationProtocol = class {
2445
2457
  });
2446
2458
  (0, import_invariant8.invariant)(request.space, void 0, {
2447
2459
  F: __dxlog_file9,
2448
- L: 50,
2460
+ L: 51,
2449
2461
  S: this,
2450
2462
  A: [
2451
2463
  "request.space",
@@ -2458,14 +2470,14 @@ var SpaceInvitationProtocol = class {
2458
2470
  guest: deviceKey
2459
2471
  }, {
2460
2472
  F: __dxlog_file9,
2461
- L: 53,
2473
+ L: 54,
2462
2474
  S: this,
2463
2475
  C: (f, a) => f(...a)
2464
2476
  });
2465
2477
  const credentials = await (0, import_credentials8.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, guestProfile);
2466
2478
  (0, import_invariant8.invariant)(credentials[0].credential, void 0, {
2467
2479
  F: __dxlog_file9,
2468
- L: 64,
2480
+ L: 65,
2469
2481
  S: this,
2470
2482
  A: [
2471
2483
  "credentials[0].credential",
@@ -2475,7 +2487,7 @@ var SpaceInvitationProtocol = class {
2475
2487
  const spaceMemberCredential = credentials[0].credential.credential;
2476
2488
  (0, import_invariant8.invariant)((0, import_credentials8.getCredentialAssertion)(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
2477
2489
  F: __dxlog_file9,
2478
- L: 66,
2490
+ L: 67,
2479
2491
  S: this,
2480
2492
  A: [
2481
2493
  "getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2491,6 +2503,11 @@ var SpaceInvitationProtocol = class {
2491
2503
  }
2492
2504
  };
2493
2505
  }
2506
+ checkInvitation(invitation) {
2507
+ if (invitation.spaceKey && this._spaceManager.spaces.has(invitation.spaceKey)) {
2508
+ return new import_protocols6.AlreadyJoinedError("Already joined space.");
2509
+ }
2510
+ }
2494
2511
  createIntroduction() {
2495
2512
  return {
2496
2513
  profile: this._signingContext.getProfile()
@@ -2511,7 +2528,7 @@ var SpaceInvitationProtocol = class {
2511
2528
  async accept(response) {
2512
2529
  (0, import_invariant8.invariant)(response.space, void 0, {
2513
2530
  F: __dxlog_file9,
2514
- L: 101,
2531
+ L: 108,
2515
2532
  S: this,
2516
2533
  A: [
2517
2534
  "response.space",
@@ -2522,7 +2539,7 @@ var SpaceInvitationProtocol = class {
2522
2539
  const assertion = (0, import_credentials8.getCredentialAssertion)(credential);
2523
2540
  (0, import_invariant8.invariant)(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
2524
2541
  F: __dxlog_file9,
2525
- L: 104,
2542
+ L: 111,
2526
2543
  S: this,
2527
2544
  A: [
2528
2545
  "assertion['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2531,13 +2548,16 @@ var SpaceInvitationProtocol = class {
2531
2548
  });
2532
2549
  (0, import_invariant8.invariant)(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
2533
2550
  F: __dxlog_file9,
2534
- L: 105,
2551
+ L: 112,
2535
2552
  S: this,
2536
2553
  A: [
2537
2554
  "credential.subject.id.equals(this._signingContext.identityKey)",
2538
2555
  ""
2539
2556
  ]
2540
2557
  });
2558
+ if (this._spaceManager.spaces.has(assertion.spaceKey)) {
2559
+ throw new import_protocols6.AlreadyJoinedError("Already joined space.");
2560
+ }
2541
2561
  await this._spaceManager.acceptSpace({
2542
2562
  spaceKey: assertion.spaceKey,
2543
2563
  genesisFeedKey: assertion.genesisFeedKey,
@@ -2651,7 +2671,7 @@ var getPlatform = () => {
2651
2671
  };
2652
2672
  }
2653
2673
  };
2654
- var DXOS_VERSION = "0.3.11-main.86514dd";
2674
+ var DXOS_VERSION = "0.3.11-main.8a122b0";
2655
2675
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2656
2676
  var DEFAULT_TIMEOUT = 1e3;
2657
2677
  var createDiagnostics = async (clientServices, serviceContext, config) => {
@@ -2661,14 +2681,14 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2661
2681
  client: {
2662
2682
  version: DXOS_VERSION,
2663
2683
  storage: {
2664
- version: import_protocols5.STORAGE_VERSION
2684
+ version: import_protocols7.STORAGE_VERSION
2665
2685
  }
2666
2686
  }
2667
2687
  };
2668
2688
  {
2669
2689
  (0, import_invariant9.invariant)(clientServices.LoggingService, "SystemService is not available.", {
2670
2690
  F: __dxlog_file10,
2671
- L: 92,
2691
+ L: 93,
2672
2692
  S: void 0,
2673
2693
  A: [
2674
2694
  "clientServices.LoggingService",
@@ -2679,6 +2699,21 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2679
2699
  timeout: DEFAULT_TIMEOUT
2680
2700
  }).catch(() => void 0);
2681
2701
  }
2702
+ if (typeof navigator !== "undefined" && navigator.storage) {
2703
+ const map = /* @__PURE__ */ new Map();
2704
+ const dir = await navigator.storage.getDirectory();
2705
+ for await (const filename of dir?.keys()) {
2706
+ const idx = filename.indexOf("-", filename.indexOf("-") + 1);
2707
+ if (idx === -1) {
2708
+ continue;
2709
+ }
2710
+ map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
2711
+ }
2712
+ diagnostics.storage = Array.from(map.entries()).sort((a, b) => b[1] - a[1]).map(([file, count]) => ({
2713
+ file,
2714
+ count
2715
+ }));
2716
+ }
2682
2717
  const identity = serviceContext.identityManager.identity;
2683
2718
  if (identity) {
2684
2719
  diagnostics.identity = {
@@ -2719,7 +2754,7 @@ var getProperties = (space) => {
2719
2754
  } catch (err) {
2720
2755
  import_log8.log.warn(err.message, void 0, {
2721
2756
  F: __dxlog_file10,
2722
- L: 160,
2757
+ L: 178,
2723
2758
  S: void 0,
2724
2759
  C: (f, a) => f(...a)
2725
2760
  });
@@ -3020,10 +3055,10 @@ var NotarizationTeleportExtension = class extends import_teleport2.RpcExtension
3020
3055
  constructor(_params) {
3021
3056
  super({
3022
3057
  requested: {
3023
- NotarizationService: import_protocols7.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
3058
+ NotarizationService: import_protocols9.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
3024
3059
  },
3025
3060
  exposed: {
3026
- NotarizationService: import_protocols7.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
3061
+ NotarizationService: import_protocols9.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
3027
3062
  }
3028
3063
  });
3029
3064
  this._params = _params;
@@ -3183,7 +3218,7 @@ var DataSpace = class {
3183
3218
  this.metrics.pipelineInitBegin = /* @__PURE__ */ new Date();
3184
3219
  await this.initializeDataPipeline();
3185
3220
  } catch (err) {
3186
- if (err instanceof import_protocols6.CancelledError) {
3221
+ if (err instanceof import_protocols8.CancelledError) {
3187
3222
  (0, import_log9.log)("data pipeline initialization cancelled", err, {
3188
3223
  F: __dxlog_file12,
3189
3224
  L: 236,
@@ -3216,7 +3251,7 @@ var DataSpace = class {
3216
3251
  }
3217
3252
  async initializeDataPipeline() {
3218
3253
  if (this._state !== import_services7.SpaceState.CONTROL_ONLY) {
3219
- throw new import_protocols6.SystemError("Invalid operation");
3254
+ throw new import_protocols8.SystemError("Invalid operation");
3220
3255
  }
3221
3256
  this._state = import_services7.SpaceState.INITIALIZING;
3222
3257
  (0, import_log9.log)("new state", {
@@ -3549,7 +3584,7 @@ var DataSpaceManager = class {
3549
3584
  S: this,
3550
3585
  C: (f, a) => f(...a)
3551
3586
  });
3552
- import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols8.trace.begin({
3587
+ import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols10.trace.begin({
3553
3588
  id: this._instanceId
3554
3589
  }), {
3555
3590
  F: __dxlog_file13,
@@ -3595,7 +3630,7 @@ var DataSpaceManager = class {
3595
3630
  space.initializeDataPipelineAsync();
3596
3631
  }
3597
3632
  }
3598
- import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols8.trace.end({
3633
+ import_log11.log.trace("dxos.echo.data-space-manager.open", import_protocols10.trace.end({
3599
3634
  id: this._instanceId
3600
3635
  }), {
3601
3636
  F: __dxlog_file13,
@@ -3857,7 +3892,7 @@ var SpacesServiceImpl = class {
3857
3892
  }
3858
3893
  async createSpace() {
3859
3894
  if (!this._identityManager.identity) {
3860
- throw new Error("This device has no HALO identity available. See https://docs.dxos.org/guide/halo");
3895
+ throw new Error("This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo");
3861
3896
  }
3862
3897
  const dataSpaceManager = await this._getDataSpaceManager();
3863
3898
  const space = await dataSpaceManager.createSpace();
@@ -3865,7 +3900,7 @@ var SpacesServiceImpl = class {
3865
3900
  }
3866
3901
  async updateSpace({ spaceKey, state }) {
3867
3902
  const dataSpaceManager = await this._getDataSpaceManager();
3868
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
3903
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3869
3904
  if (state) {
3870
3905
  switch (state) {
3871
3906
  case import_services9.SpaceState.ACTIVE:
@@ -3875,7 +3910,7 @@ var SpacesServiceImpl = class {
3875
3910
  await space.deactivate();
3876
3911
  break;
3877
3912
  default:
3878
- throw new import_protocols9.ApiError("Invalid space state");
3913
+ throw new import_protocols11.ApiError("Invalid space state");
3879
3914
  }
3880
3915
  }
3881
3916
  }
@@ -3930,14 +3965,14 @@ var SpacesServiceImpl = class {
3930
3965
  }
3931
3966
  async postMessage({ spaceKey, channel, message }) {
3932
3967
  const dataSpaceManager = await this._getDataSpaceManager();
3933
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
3968
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3934
3969
  await space.postMessage(getChannelId(channel), message);
3935
3970
  }
3936
3971
  subscribeMessages({ spaceKey, channel }) {
3937
3972
  return new import_codec_protobuf11.Stream(({ ctx, next }) => {
3938
3973
  (0, import_async13.scheduleTask)(ctx, async () => {
3939
3974
  const dataSpaceManager = await this._getDataSpaceManager();
3940
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
3975
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3941
3976
  const handle = space.listen(getChannelId(channel), (message) => {
3942
3977
  next(message);
3943
3978
  });
@@ -3947,7 +3982,7 @@ var SpacesServiceImpl = class {
3947
3982
  }
3948
3983
  queryCredentials({ spaceKey, noTail }) {
3949
3984
  return new import_codec_protobuf11.Stream(({ ctx, next, close }) => {
3950
- const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
3985
+ const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3951
3986
  const processor = {
3952
3987
  processCredential: async (credential) => {
3953
3988
  next(credential);
@@ -3963,7 +3998,7 @@ var SpacesServiceImpl = class {
3963
3998
  });
3964
3999
  }
3965
4000
  async writeCredentials({ spaceKey, credentials }) {
3966
- const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
4001
+ const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3967
4002
  for (const credential of credentials ?? []) {
3968
4003
  if (credential.proof) {
3969
4004
  await space.controlPipeline.writer.write({
@@ -4014,14 +4049,14 @@ var SpacesServiceImpl = class {
4014
4049
  }
4015
4050
  async createEpoch({ spaceKey }) {
4016
4051
  const dataSpaceManager = await this._getDataSpaceManager();
4017
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols9.SpaceNotFoundError(spaceKey));
4052
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
4018
4053
  await space.createEpoch();
4019
4054
  }
4020
4055
  _serializeSpace(space) {
4021
4056
  return {
4022
4057
  spaceKey: space.key,
4023
4058
  state: space.state,
4024
- error: space.error ? (0, import_protocols9.encodeError)(space.error) : void 0,
4059
+ error: space.error ? (0, import_protocols11.encodeError)(space.error) : void 0,
4025
4060
  pipeline: {
4026
4061
  currentEpoch: space.dataPipeline.currentEpoch,
4027
4062
  appliedEpoch: space.dataPipeline.appliedEpoch,
@@ -4115,7 +4150,7 @@ var ServiceContext = class {
4115
4150
  S: this,
4116
4151
  C: (f, a) => f(...a)
4117
4152
  });
4118
- import_log13.log.trace("dxos.sdk.service-context.open", import_protocols10.trace.begin({
4153
+ import_log13.log.trace("dxos.sdk.service-context.open", import_protocols12.trace.begin({
4119
4154
  id: this._instanceId
4120
4155
  }), {
4121
4156
  F: __dxlog_file15,
@@ -4131,7 +4166,7 @@ var ServiceContext = class {
4131
4166
  if (this.identityManager.identity) {
4132
4167
  await this._initialize(ctx);
4133
4168
  }
4134
- import_log13.log.trace("dxos.sdk.service-context.open", import_protocols10.trace.end({
4169
+ import_log13.log.trace("dxos.sdk.service-context.open", import_protocols12.trace.end({
4135
4170
  id: this._instanceId
4136
4171
  }), {
4137
4172
  F: __dxlog_file15,
@@ -4205,8 +4240,8 @@ var ServiceContext = class {
4205
4240
  }
4206
4241
  async _checkStorageVersion() {
4207
4242
  await this.metadataStore.load();
4208
- if (this.metadataStore.version !== import_protocols10.STORAGE_VERSION) {
4209
- throw new import_protocols10.InvalidStorageVersionError(import_protocols10.STORAGE_VERSION, this.metadataStore.version);
4243
+ if (this.metadataStore.version !== import_protocols12.STORAGE_VERSION) {
4244
+ throw new import_protocols12.InvalidStorageVersionError(import_protocols12.STORAGE_VERSION, this.metadataStore.version);
4210
4245
  }
4211
4246
  }
4212
4247
  // Called when identity is created.
@@ -4393,16 +4428,16 @@ var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
4393
4428
  var createStorageObjects = (config) => {
4394
4429
  const { persistent = false, keyStore, dataStore, dataRoot = (0, import_util8.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage" } = config ?? {};
4395
4430
  if (persistent && dataStore === StorageDriver.RAM) {
4396
- throw new import_protocols11.InvalidConfigError("RAM storage cannot be used in persistent mode.");
4431
+ throw new import_protocols13.InvalidConfigError("RAM storage cannot be used in persistent mode.");
4397
4432
  }
4398
4433
  if (!persistent && dataStore !== void 0 && dataStore !== StorageDriver.RAM) {
4399
- throw new import_protocols11.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
4434
+ throw new import_protocols13.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
4400
4435
  }
4401
4436
  if (persistent && keyStore === StorageDriver.RAM) {
4402
- throw new import_protocols11.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
4437
+ throw new import_protocols13.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
4403
4438
  }
4404
4439
  if (!persistent && keyStore !== StorageDriver.RAM && keyStore !== void 0) {
4405
- throw new import_protocols11.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
4440
+ throw new import_protocols13.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
4406
4441
  }
4407
4442
  return {
4408
4443
  storage: (0, import_random_access_storage.createStorage)({
@@ -4828,7 +4863,7 @@ var ClientServicesHost = class {
4828
4863
  return;
4829
4864
  }
4830
4865
  const traceId = import_keys11.PublicKey.random().toHex();
4831
- import_log15.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
4866
+ import_log15.log.trace("dxos.client-services.host.open", import_protocols14.trace.begin({
4832
4867
  id: traceId
4833
4868
  }), {
4834
4869
  F: __dxlog_file17,
@@ -4927,7 +4962,7 @@ var ClientServicesHost = class {
4927
4962
  S: this,
4928
4963
  C: (f, a) => f(...a)
4929
4964
  });
4930
- import_log15.log.trace("dxos.client-services.host.open", import_protocols12.trace.end({
4965
+ import_log15.log.trace("dxos.client-services.host.open", import_protocols14.trace.end({
4931
4966
  id: traceId
4932
4967
  }), {
4933
4968
  F: __dxlog_file17,
@@ -4968,7 +5003,7 @@ var ClientServicesHost = class {
4968
5003
  }
4969
5004
  async reset() {
4970
5005
  const traceId = import_keys11.PublicKey.random().toHex();
4971
- import_log15.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
5006
+ import_log15.log.trace("dxos.sdk.client-services-host.reset", import_protocols14.trace.begin({
4972
5007
  id: traceId
4973
5008
  }), {
4974
5009
  F: __dxlog_file17,
@@ -4990,7 +5025,7 @@ var ClientServicesHost = class {
4990
5025
  S: this,
4991
5026
  C: (f, a) => f(...a)
4992
5027
  });
4993
- import_log15.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.end({
5028
+ import_log15.log.trace("dxos.sdk.client-services-host.reset", import_protocols14.trace.end({
4994
5029
  id: traceId
4995
5030
  }), {
4996
5031
  F: __dxlog_file17,
@@ -5092,4 +5127,4 @@ ClientServicesHost = _ts_decorate8([
5092
5127
  subscribeToSpaces,
5093
5128
  subscribeToSwarmInfo
5094
5129
  });
5095
- //# sourceMappingURL=chunk-T44RBEZ6.cjs.map
5130
+ //# sourceMappingURL=chunk-ORVXDSPU.cjs.map