@dxos/client-services 0.3.2-main.4164ba3 → 0.3.2-main.428886c

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 (27) hide show
  1. package/dist/lib/browser/{chunk-TI3I2ZZI.mjs → chunk-7ILC5J66.mjs} +141 -78
  2. package/dist/lib/browser/chunk-7ILC5J66.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 +1 -1
  6. package/dist/lib/node/index.cjs +200 -137
  7. package/dist/lib/node/index.cjs.map +3 -3
  8. package/dist/lib/node/meta.json +1 -1
  9. package/dist/lib/node/packlets/testing/index.cjs +174 -111
  10. package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
  11. package/dist/types/src/packlets/devices/devices-service.d.ts +1 -1
  12. package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
  13. package/dist/types/src/packlets/identity/identity-manager.d.ts +4 -0
  14. package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
  15. package/dist/types/src/packlets/identity/identity.d.ts +2 -2
  16. package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
  17. package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
  18. package/dist/types/src/version.d.ts +1 -1
  19. package/package.json +35 -35
  20. package/src/packlets/devices/devices-service.ts +16 -3
  21. package/src/packlets/identity/identity-manager.test.ts +11 -0
  22. package/src/packlets/identity/identity-manager.ts +20 -0
  23. package/src/packlets/identity/identity.test.ts +2 -2
  24. package/src/packlets/identity/identity.ts +5 -3
  25. package/src/packlets/invitations/invitations-service.ts +0 -2
  26. package/src/version.ts +1 -1
  27. package/dist/lib/browser/chunk-TI3I2ZZI.mjs.map +0 -7
@@ -52,7 +52,7 @@ var createMockCredential = async ({ signer, issuer }) => (0, import_credentials.
52
52
 
53
53
  // packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
54
54
  var import_async18 = require("@dxos/async");
55
- var import_invariant16 = require("@dxos/invariant");
55
+ var import_invariant17 = require("@dxos/invariant");
56
56
  var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
57
57
 
58
58
  // packages/sdk/client-services/src/packlets/services/client-rpc-server.ts
@@ -99,7 +99,7 @@ var getPlatform = () => {
99
99
  };
100
100
 
101
101
  // packages/sdk/client-services/src/version.ts
102
- var DXOS_VERSION = "0.3.2-main.4164ba3";
102
+ var DXOS_VERSION = "0.3.2-main.428886c";
103
103
 
104
104
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
105
105
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -228,13 +228,13 @@ var import_echo_pipeline2 = require("@dxos/echo-pipeline");
228
228
  var import_feed_store3 = require("@dxos/feed-store");
229
229
  var import_invariant13 = require("@dxos/invariant");
230
230
  var import_keyring = require("@dxos/keyring");
231
- var import_keys8 = require("@dxos/keys");
231
+ var import_keys9 = require("@dxos/keys");
232
232
  var import_log13 = require("@dxos/log");
233
233
  var import_protocols10 = require("@dxos/protocols");
234
234
  var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
235
235
  var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
236
236
  var import_tracing4 = require("@dxos/tracing");
237
- var import_util5 = require("@dxos/util");
237
+ var import_util6 = require("@dxos/util");
238
238
 
239
239
  // packages/sdk/client-services/src/packlets/identity/authenticator.ts
240
240
  var import_async = require("@dxos/async");
@@ -358,9 +358,11 @@ var import_credentials4 = require("@dxos/credentials");
358
358
  var import_debug2 = require("@dxos/debug");
359
359
  var import_feed_store = require("@dxos/feed-store");
360
360
  var import_invariant2 = require("@dxos/invariant");
361
+ var import_keys2 = require("@dxos/keys");
361
362
  var import_log3 = require("@dxos/log");
362
363
  var import_credentials5 = require("@dxos/protocols/proto/dxos/halo/credentials");
363
364
  var import_tracing = require("@dxos/tracing");
365
+ var import_util = require("@dxos/util");
364
366
  function _ts_decorate(decorators, target, key, desc) {
365
367
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
366
368
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -379,6 +381,14 @@ var Identity = class Identity2 {
379
381
  this._signer = signer;
380
382
  this.identityKey = identityKey;
381
383
  this.deviceKey = deviceKey;
384
+ import_log3.log.trace("dxos.halo.device", {
385
+ deviceKey
386
+ }, {
387
+ F: __dxlog_file3,
388
+ L: 60,
389
+ S: this,
390
+ C: (f, a) => f(...a)
391
+ });
382
392
  this._deviceStateMachine = new import_credentials4.DeviceStateMachine({
383
393
  identityKey: this.identityKey,
384
394
  deviceKey: this.deviceKey,
@@ -389,7 +399,7 @@ var Identity = class Identity2 {
389
399
  onUpdate: () => this.stateUpdate.emit()
390
400
  });
391
401
  this.authVerifier = new TrustedKeySetAuthVerifier({
392
- trustedKeysProvider: () => this.authorizedDeviceKeys,
402
+ trustedKeysProvider: () => new import_util.ComplexSet(import_keys2.PublicKey.hash, this.authorizedDeviceKeys.keys()),
393
403
  update: this.stateUpdate,
394
404
  authTimeout: import_client_protocol.AUTH_TIMEOUT
395
405
  });
@@ -447,7 +457,7 @@ var Identity = class Identity2 {
447
457
  getIdentityCredentialSigner() {
448
458
  (0, import_invariant2.invariant)(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
449
459
  F: __dxlog_file3,
450
- L: 139,
460
+ L: 141,
451
461
  S: this,
452
462
  A: [
453
463
  "this._deviceStateMachine.deviceCredentialChain",
@@ -471,7 +481,7 @@ var Identity = class Identity2 {
471
481
  dataFeedKey
472
482
  }, {
473
483
  F: __dxlog_file3,
474
- L: 155,
484
+ L: 157,
475
485
  S: this,
476
486
  C: (f, a) => f(...a)
477
487
  });
@@ -527,13 +537,13 @@ var import_async3 = require("@dxos/async");
527
537
  var import_context2 = require("@dxos/context");
528
538
  var import_credentials6 = require("@dxos/credentials");
529
539
  var import_invariant3 = require("@dxos/invariant");
530
- var import_keys2 = require("@dxos/keys");
540
+ var import_keys3 = require("@dxos/keys");
531
541
  var import_log4 = require("@dxos/log");
532
542
  var import_protocols3 = require("@dxos/protocols");
533
543
  var import_credentials7 = require("@dxos/protocols/proto/dxos/halo/credentials");
534
544
  var import_timeframe = require("@dxos/timeframe");
535
545
  var import_tracing2 = require("@dxos/tracing");
536
- var import_util = require("@dxos/util");
546
+ var import_util2 = require("@dxos/util");
537
547
  function _ts_decorate2(decorators, target, key, desc) {
538
548
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
539
549
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -559,7 +569,7 @@ var IdentityManager = class IdentityManager2 {
559
569
  return this._identity;
560
570
  }
561
571
  async open(ctx) {
562
- const traceId = import_keys2.PublicKey.random().toHex();
572
+ const traceId = import_keys3.PublicKey.random().toHex();
563
573
  import_log4.log.trace("dxos.halo.identity-manager.open", import_protocols3.trace.begin({
564
574
  id: traceId
565
575
  }), {
@@ -789,10 +799,51 @@ var IdentityManager = class IdentityManager2 {
789
799
  this.stateUpdate.emit();
790
800
  return profile;
791
801
  }
802
+ async updateDevice({ deviceKey, profile }) {
803
+ (0, import_invariant3.invariant)(this._identity, "Identity not initialized.", {
804
+ F: __dxlog_file4,
805
+ L: 216,
806
+ S: this,
807
+ A: [
808
+ "this._identity",
809
+ "'Identity not initialized.'"
810
+ ]
811
+ });
812
+ (0, import_invariant3.invariant)(this._identity.authorizedDeviceKeys.has(deviceKey), "Device not authorized.", {
813
+ F: __dxlog_file4,
814
+ L: 218,
815
+ S: this,
816
+ A: [
817
+ "this._identity.authorizedDeviceKeys.has(deviceKey)",
818
+ "'Device not authorized.'"
819
+ ]
820
+ });
821
+ const credential = await this._identity.getIdentityCredentialSigner().createCredential({
822
+ subject: this._identity.identityKey,
823
+ assertion: {
824
+ "@type": "dxos.halo.credentials.DeviceProfile",
825
+ deviceKey,
826
+ profile
827
+ }
828
+ });
829
+ const receipt = await this._identity.controlPipeline.writer.write({
830
+ credential: {
831
+ credential
832
+ }
833
+ });
834
+ await this._identity.controlPipeline.state.waitUntilTimeframe(new import_timeframe.Timeframe([
835
+ [
836
+ receipt.feedKey,
837
+ receipt.seq
838
+ ]
839
+ ]));
840
+ this.stateUpdate.emit();
841
+ return profile;
842
+ }
792
843
  async _constructIdentity(identityRecord) {
793
844
  (0, import_invariant3.invariant)(!this._identity, void 0, {
794
845
  F: __dxlog_file4,
795
- L: 216,
846
+ L: 236,
796
847
  S: this,
797
848
  A: [
798
849
  "!this._identity",
@@ -803,13 +854,13 @@ var IdentityManager = class IdentityManager2 {
803
854
  identityRecord
804
855
  }, {
805
856
  F: __dxlog_file4,
806
- L: 217,
857
+ L: 237,
807
858
  S: this,
808
859
  C: (f, a) => f(...a)
809
860
  });
810
861
  (0, import_invariant3.invariant)(identityRecord.haloSpace.controlFeedKey, void 0, {
811
862
  F: __dxlog_file4,
812
- L: 220,
863
+ L: 240,
813
864
  S: this,
814
865
  A: [
815
866
  "identityRecord.haloSpace.controlFeedKey",
@@ -821,7 +872,7 @@ var IdentityManager = class IdentityManager2 {
821
872
  });
822
873
  (0, import_invariant3.invariant)(identityRecord.haloSpace.dataFeedKey, void 0, {
823
874
  F: __dxlog_file4,
824
- L: 224,
875
+ L: 244,
825
876
  S: this,
826
877
  A: [
827
878
  "identityRecord.haloSpace.dataFeedKey",
@@ -837,7 +888,7 @@ var IdentityManager = class IdentityManager2 {
837
888
  swarmIdentity: {
838
889
  peerKey: identityRecord.deviceKey,
839
890
  credentialProvider: createAuthProvider((0, import_credentials6.createCredentialSignerWithKey)(this._keyring, identityRecord.deviceKey)),
840
- credentialAuthenticator: (0, import_util.deferFunction)(() => identity.authVerifier.verifier)
891
+ credentialAuthenticator: (0, import_util2.deferFunction)(() => identity.authVerifier.verifier)
841
892
  },
842
893
  identityKey: identityRecord.identityKey
843
894
  });
@@ -853,7 +904,7 @@ var IdentityManager = class IdentityManager2 {
853
904
  identityKey: identityRecord.identityKey
854
905
  }, {
855
906
  F: __dxlog_file4,
856
- L: 248,
907
+ L: 268,
857
908
  S: this,
858
909
  C: (f, a) => f(...a)
859
910
  });
@@ -874,7 +925,7 @@ var IdentityManager = class IdentityManager2 {
874
925
  onAuthFailure: () => {
875
926
  import_log4.log.warn("auth failure", void 0, {
876
927
  F: __dxlog_file4,
877
- L: 267,
928
+ L: 287,
878
929
  S: this,
879
930
  C: (f, a) => f(...a)
880
931
  });
@@ -1059,7 +1110,7 @@ var import_client_protocol2 = require("@dxos/client-protocol");
1059
1110
  var import_context4 = require("@dxos/context");
1060
1111
  var import_credentials9 = require("@dxos/credentials");
1061
1112
  var import_invariant7 = require("@dxos/invariant");
1062
- var import_keys4 = require("@dxos/keys");
1113
+ var import_keys5 = require("@dxos/keys");
1063
1114
  var import_log6 = require("@dxos/log");
1064
1115
  var import_network_manager = require("@dxos/network-manager");
1065
1116
  var import_protocols5 = require("@dxos/protocols");
@@ -1070,7 +1121,7 @@ var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations")
1070
1121
  var import_async4 = require("@dxos/async");
1071
1122
  var import_context3 = require("@dxos/context");
1072
1123
  var import_invariant6 = require("@dxos/invariant");
1073
- var import_keys3 = require("@dxos/keys");
1124
+ var import_keys4 = require("@dxos/keys");
1074
1125
  var import_log5 = require("@dxos/log");
1075
1126
  var import_protocols4 = require("@dxos/protocols");
1076
1127
  var import_services3 = require("@dxos/protocols/proto/dxos/client/services");
@@ -1118,7 +1169,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1118
1169
  },
1119
1170
  introduce: async (request) => {
1120
1171
  const { profile, invitationId } = request;
1121
- const traceId = import_keys3.PublicKey.random().toHex();
1172
+ const traceId = import_keys4.PublicKey.random().toHex();
1122
1173
  import_log5.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols4.trace.begin({
1123
1174
  id: traceId
1124
1175
  }), {
@@ -1170,7 +1221,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1170
1221
  };
1171
1222
  },
1172
1223
  authenticate: async ({ authCode: code }) => {
1173
- const traceId = import_keys3.PublicKey.random().toHex();
1224
+ const traceId = import_keys4.PublicKey.random().toHex();
1174
1225
  import_log5.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols4.trace.begin({
1175
1226
  id: traceId
1176
1227
  }), {
@@ -1250,7 +1301,7 @@ var InvitationHostExtension = class extends import_teleport.RpcExtension {
1250
1301
  };
1251
1302
  },
1252
1303
  admit: async (request) => {
1253
- const traceId = import_keys3.PublicKey.random().toHex();
1304
+ const traceId = import_keys4.PublicKey.random().toHex();
1254
1305
  import_log5.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols4.trace.begin({
1255
1306
  id: traceId
1256
1307
  }), {
@@ -1416,7 +1467,7 @@ var InvitationsHandler = class {
1416
1467
  this._networkManager = _networkManager;
1417
1468
  }
1418
1469
  createInvitation(protocol, options) {
1419
- const { invitationId = import_keys4.PublicKey.random().toHex(), type = import_services4.Invitation.Type.INTERACTIVE, authMethod = import_services4.Invitation.AuthMethod.SHARED_SECRET, state = import_services4.Invitation.State.INIT, timeout = import_client_protocol2.INVITATION_TIMEOUT, swarmKey = import_keys4.PublicKey.random() } = options ?? {};
1470
+ const { invitationId = import_keys5.PublicKey.random().toHex(), type = import_services4.Invitation.Type.INTERACTIVE, authMethod = import_services4.Invitation.AuthMethod.SHARED_SECRET, state = import_services4.Invitation.State.INIT, timeout = import_client_protocol2.INVITATION_TIMEOUT, swarmKey = import_keys5.PublicKey.random() } = options ?? {};
1420
1471
  const authCode = options?.authCode ?? (authMethod === import_services4.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials9.generatePasscode)(import_client_protocol2.AUTHENTICATION_CODE_LENGTH) : void 0);
1421
1472
  (0, import_invariant7.invariant)(protocol, void 0, {
1422
1473
  F: __dxlog_file8,
@@ -1491,7 +1542,7 @@ var InvitationsHandler = class {
1491
1542
  },
1492
1543
  onOpen: () => {
1493
1544
  (0, import_async5.scheduleTask)(ctx, async () => {
1494
- const traceId = import_keys4.PublicKey.random().toHex();
1545
+ const traceId = import_keys5.PublicKey.random().toHex();
1495
1546
  try {
1496
1547
  import_log6.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols5.trace.begin({
1497
1548
  id: traceId
@@ -1724,7 +1775,7 @@ var InvitationsHandler = class {
1724
1775
  }
1725
1776
  });
1726
1777
  (0, import_async5.scheduleTask)(ctx, async () => {
1727
- const traceId = import_keys4.PublicKey.random().toHex();
1778
+ const traceId = import_keys5.PublicKey.random().toHex();
1728
1779
  try {
1729
1780
  import_log6.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols5.trace.begin({
1730
1781
  id: traceId
@@ -1931,7 +1982,7 @@ var InvitationsHandler = class {
1931
1982
  const topic = invitation.swarmKey;
1932
1983
  const swarmConnection = await this._networkManager.joinSwarm({
1933
1984
  topic,
1934
- peerId: import_keys4.PublicKey.random(),
1985
+ peerId: import_keys5.PublicKey.random(),
1935
1986
  protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
1936
1987
  teleport.addExtension("dxos.halo.invitations", createExtension());
1937
1988
  }),
@@ -2088,15 +2139,6 @@ var InvitationsServiceImpl = class {
2088
2139
  await accepted.cancel();
2089
2140
  this._acceptInvitations.delete(invitationId);
2090
2141
  this._removedAccepted.emit(accepted.get());
2091
- } else {
2092
- import_log7.log.warn("invalid invitation", {
2093
- invitationId
2094
- }, {
2095
- F: __dxlog_file9,
2096
- L: 132,
2097
- S: this,
2098
- C: (f, a) => f(...a)
2099
- });
2100
2142
  }
2101
2143
  }
2102
2144
  queryInvitations() {
@@ -2310,12 +2352,12 @@ var import_async9 = require("@dxos/async");
2310
2352
  var import_context7 = require("@dxos/context");
2311
2353
  var import_credentials14 = require("@dxos/credentials");
2312
2354
  var import_invariant11 = require("@dxos/invariant");
2313
- var import_keys7 = require("@dxos/keys");
2355
+ var import_keys8 = require("@dxos/keys");
2314
2356
  var import_log11 = require("@dxos/log");
2315
2357
  var import_protocols8 = require("@dxos/protocols");
2316
2358
  var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
2317
2359
  var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
2318
- var import_util4 = require("@dxos/util");
2360
+ var import_util5 = require("@dxos/util");
2319
2361
 
2320
2362
  // packages/sdk/client-services/src/packlets/spaces/data-space.ts
2321
2363
  var import_async8 = require("@dxos/async");
@@ -2323,24 +2365,24 @@ var import_client_protocol3 = require("@dxos/client-protocol");
2323
2365
  var import_context6 = require("@dxos/context");
2324
2366
  var import_debug4 = require("@dxos/debug");
2325
2367
  var import_echo_pipeline = require("@dxos/echo-pipeline");
2326
- var import_keys6 = require("@dxos/keys");
2368
+ var import_keys7 = require("@dxos/keys");
2327
2369
  var import_log10 = require("@dxos/log");
2328
2370
  var import_protocols7 = require("@dxos/protocols");
2329
2371
  var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
2330
2372
  var import_credentials11 = require("@dxos/protocols/proto/dxos/halo/credentials");
2331
2373
  var import_timeframe2 = require("@dxos/timeframe");
2332
2374
  var import_tracing3 = require("@dxos/tracing");
2333
- var import_util3 = require("@dxos/util");
2375
+ var import_util4 = require("@dxos/util");
2334
2376
 
2335
2377
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
2336
2378
  var import_async7 = require("@dxos/async");
2337
2379
  var import_context5 = require("@dxos/context");
2338
2380
  var import_invariant10 = require("@dxos/invariant");
2339
- var import_keys5 = require("@dxos/keys");
2381
+ var import_keys6 = require("@dxos/keys");
2340
2382
  var import_log9 = require("@dxos/log");
2341
2383
  var import_protocols6 = require("@dxos/protocols");
2342
2384
  var import_teleport2 = require("@dxos/teleport");
2343
- var import_util2 = require("@dxos/util");
2385
+ var import_util3 = require("@dxos/util");
2344
2386
  var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2345
2387
  var DEFAULT_RETRY_TIMEOUT = 1e3;
2346
2388
  var DEFAULT_SUCCESS_DELAY = 1e3;
@@ -2351,8 +2393,8 @@ var NotarizationPlugin = class {
2351
2393
  this._ctx = new import_context5.Context();
2352
2394
  this._extensionOpened = new import_async7.Event();
2353
2395
  this._extensions = /* @__PURE__ */ new Set();
2354
- this._processedCredentials = new import_util2.ComplexSet(import_keys5.PublicKey.hash);
2355
- this._processCredentialsTriggers = new import_util2.ComplexMap(import_keys5.PublicKey.hash);
2396
+ this._processedCredentials = new import_util3.ComplexSet(import_keys6.PublicKey.hash);
2397
+ this._processCredentialsTriggers = new import_util3.ComplexMap(import_keys6.PublicKey.hash);
2356
2398
  }
2357
2399
  get hasWriter() {
2358
2400
  return !!this._writer;
@@ -2514,7 +2556,7 @@ var NotarizationPlugin = class {
2514
2556
  if (this._processedCredentials.has(id)) {
2515
2557
  return;
2516
2558
  }
2517
- await (0, import_util2.entry)(this._processCredentialsTriggers, id).orInsert(new import_async7.Trigger()).value.wait();
2559
+ await (0, import_util3.entry)(this._processCredentialsTriggers, id).orInsert(new import_async7.Trigger()).value.wait();
2518
2560
  }
2519
2561
  /**
2520
2562
  * Requests from other peers to notarize credentials.
@@ -2634,7 +2676,7 @@ var DataSpace = class DataSpace2 {
2634
2676
  this._signingContext = params.signingContext;
2635
2677
  this._callbacks = params.callbacks ?? {};
2636
2678
  this.authVerifier = new TrustedKeySetAuthVerifier({
2637
- trustedKeysProvider: () => new import_util3.ComplexSet(import_keys6.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
2679
+ trustedKeysProvider: () => new import_util4.ComplexSet(import_keys7.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
2638
2680
  update: this._inner.stateUpdate,
2639
2681
  authTimeout: import_client_protocol3.AUTH_TIMEOUT
2640
2682
  });
@@ -3053,9 +3095,9 @@ var DataSpaceManager = class DataSpaceManager2 {
3053
3095
  this._feedStore = _feedStore;
3054
3096
  this._ctx = new import_context7.Context();
3055
3097
  this.updated = new import_async9.Event();
3056
- this._spaces = new import_util4.ComplexMap(import_keys7.PublicKey.hash);
3098
+ this._spaces = new import_util5.ComplexMap(import_keys8.PublicKey.hash);
3057
3099
  this._isOpen = false;
3058
- this._instanceId = import_keys7.PublicKey.random().toHex();
3100
+ this._instanceId = import_keys8.PublicKey.random().toHex();
3059
3101
  }
3060
3102
  // TODO(burdon): Remove.
3061
3103
  get spaces() {
@@ -3084,7 +3126,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3084
3126
  S: this,
3085
3127
  C: (f, a) => f(...a)
3086
3128
  });
3087
- await (0, import_util4.forEachAsync)(this._metadataStore.spaces, async (spaceMetadata) => {
3129
+ await (0, import_util5.forEachAsync)(this._metadataStore.spaces, async (spaceMetadata) => {
3088
3130
  try {
3089
3131
  (0, import_log11.log)("load space", {
3090
3132
  spaceMetadata
@@ -3266,7 +3308,7 @@ var DataSpaceManager = class DataSpaceManager2 {
3266
3308
  swarmIdentity: {
3267
3309
  peerKey: this._signingContext.deviceKey,
3268
3310
  credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
3269
- credentialAuthenticator: (0, import_util4.deferFunction)(() => dataSpace.authVerifier.verifier)
3311
+ credentialAuthenticator: (0, import_util5.deferFunction)(() => dataSpace.authVerifier.verifier)
3270
3312
  },
3271
3313
  onNetworkConnection: (session) => {
3272
3314
  session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
@@ -3606,7 +3648,7 @@ var ServiceContext = class ServiceContext2 {
3606
3648
  this.initialized = new import_async11.Trigger();
3607
3649
  this.dataServiceSubscriptions = new import_echo_pipeline2.DataServiceSubscriptions();
3608
3650
  this._handlerFactories = /* @__PURE__ */ new Map();
3609
- this._instanceId = import_keys8.PublicKey.random().toHex();
3651
+ this._instanceId = import_keys9.PublicKey.random().toHex();
3610
3652
  this.metadataStore = new import_echo_pipeline2.MetadataStore(storage.createDirectory("metadata"));
3611
3653
  this.snapshotStore = new import_echo_pipeline2.SnapshotStore(storage.createDirectory("snapshots"));
3612
3654
  this.blobStore = new import_teleport_extension_object_sync.BlobStore(storage.createDirectory("blobs"));
@@ -3827,7 +3869,7 @@ _ts_decorate5([
3827
3869
  import_tracing4.trace.span()
3828
3870
  ], ServiceContext.prototype, "_initialize", null);
3829
3871
  ServiceContext = _ts_decorate5([
3830
- (0, import_util5.safeInstanceof)("dxos.client-services.ServiceContext"),
3872
+ (0, import_util6.safeInstanceof)("dxos.client-services.ServiceContext"),
3831
3873
  import_tracing4.trace.resource()
3832
3874
  ], ServiceContext);
3833
3875
 
@@ -3838,8 +3880,8 @@ var import_context10 = require("@dxos/context");
3838
3880
  var import_document_model2 = require("@dxos/document-model");
3839
3881
  var import_echo_pipeline3 = require("@dxos/echo-pipeline");
3840
3882
  var import_echo_schema = require("@dxos/echo-schema");
3841
- var import_invariant15 = require("@dxos/invariant");
3842
- var import_keys12 = require("@dxos/keys");
3883
+ var import_invariant16 = require("@dxos/invariant");
3884
+ var import_keys13 = require("@dxos/keys");
3843
3885
  var import_log16 = require("@dxos/log");
3844
3886
  var import_messaging = require("@dxos/messaging");
3845
3887
  var import_model_factory = require("@dxos/model-factory");
@@ -3877,13 +3919,33 @@ var ServiceRegistry = class {
3877
3919
  // packages/sdk/client-services/src/packlets/devices/devices-service.ts
3878
3920
  var import_async12 = require("@dxos/async");
3879
3921
  var import_codec_protobuf6 = require("@dxos/codec-protobuf");
3922
+ var import_invariant14 = require("@dxos/invariant");
3880
3923
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
3924
+ var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/devices/devices-service.ts";
3881
3925
  var DevicesServiceImpl = class {
3882
3926
  constructor(_identityManager) {
3883
3927
  this._identityManager = _identityManager;
3884
3928
  }
3885
- updateDevice(request) {
3886
- throw new Error("Method not implemented.");
3929
+ async updateDevice(profile) {
3930
+ (0, import_invariant14.invariant)(this._identityManager.identity, "Identity not initialized", {
3931
+ F: __dxlog_file16,
3932
+ L: 17,
3933
+ S: this,
3934
+ A: [
3935
+ "this._identityManager.identity",
3936
+ "'Identity not initialized'"
3937
+ ]
3938
+ });
3939
+ const deviceKey = this._identityManager.identity.deviceKey;
3940
+ await this._identityManager.updateDevice({
3941
+ deviceKey,
3942
+ profile
3943
+ });
3944
+ return {
3945
+ deviceKey,
3946
+ kind: import_services11.DeviceKind.CURRENT,
3947
+ profile
3948
+ };
3887
3949
  }
3888
3950
  queryDevices() {
3889
3951
  return new import_codec_protobuf6.Stream(({ next }) => {
@@ -3895,9 +3957,10 @@ var DevicesServiceImpl = class {
3895
3957
  });
3896
3958
  } else {
3897
3959
  next({
3898
- devices: Array.from(deviceKeys.values()).map((key) => ({
3960
+ devices: Array.from(deviceKeys.entries()).map(([key, profile]) => ({
3899
3961
  deviceKey: key,
3900
- kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services11.DeviceKind.CURRENT : import_services11.DeviceKind.TRUSTED
3962
+ kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services11.DeviceKind.CURRENT : import_services11.DeviceKind.TRUSTED,
3963
+ profile
3901
3964
  }))
3902
3965
  });
3903
3966
  }
@@ -3925,12 +3988,12 @@ var import_codec_protobuf12 = require("@dxos/codec-protobuf");
3925
3988
  var import_async13 = require("@dxos/async");
3926
3989
  var import_codec_protobuf7 = require("@dxos/codec-protobuf");
3927
3990
  var import_feed_store4 = require("@dxos/feed-store");
3928
- var import_keys9 = require("@dxos/keys");
3929
- var import_util6 = require("@dxos/util");
3991
+ var import_keys10 = require("@dxos/keys");
3992
+ var import_util7 = require("@dxos/util");
3930
3993
  var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
3931
3994
  return new import_codec_protobuf7.Stream(({ next }) => {
3932
3995
  const subscriptions = new import_async13.EventSubscriptions();
3933
- const feedMap = new import_util6.ComplexMap(import_keys9.PublicKey.hash);
3996
+ const feedMap = new import_util7.ComplexMap(import_keys10.PublicKey.hash);
3934
3997
  const update = () => {
3935
3998
  const { feeds } = feedStore;
3936
3999
  feeds.filter((feed) => !feedKeys?.length || feedKeys.some((feedKey) => feedKey.equals(feed.key))).forEach((feed) => {
@@ -4022,7 +4085,7 @@ var subscribeToMetadata = ({ context }) => new import_codec_protobuf9.Stream(({
4022
4085
  // packages/sdk/client-services/src/packlets/devtools/network.ts
4023
4086
  var import_codec_protobuf10 = require("@dxos/codec-protobuf");
4024
4087
  var import_context9 = require("@dxos/context");
4025
- var import_keys10 = require("@dxos/keys");
4088
+ var import_keys11 = require("@dxos/keys");
4026
4089
  var subscribeToNetworkStatus = ({ signalManager }) => new import_codec_protobuf10.Stream(({ next, close }) => {
4027
4090
  const update = () => {
4028
4091
  try {
@@ -4226,7 +4289,7 @@ var DevtoolsServiceImpl = class {
4226
4289
  };
4227
4290
 
4228
4291
  // packages/sdk/client-services/src/packlets/locks/node.ts
4229
- var import_invariant14 = require("@dxos/invariant");
4292
+ var import_invariant15 = require("@dxos/invariant");
4230
4293
  var import_lock_file = require("@dxos/lock-file");
4231
4294
  var import_log14 = require("@dxos/log");
4232
4295
  function _ts_decorate6(decorators, target, key, desc) {
@@ -4239,7 +4302,7 @@ function _ts_decorate6(decorators, target, key, desc) {
4239
4302
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4240
4303
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4241
4304
  }
4242
- var __dxlog_file16 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
4305
+ var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/locks/node.ts";
4243
4306
  var Lock = class {
4244
4307
  constructor({ lockKey: lockPath, onAcquire, onRelease }) {
4245
4308
  this._lockPath = lockPath;
@@ -4251,7 +4314,7 @@ var Lock = class {
4251
4314
  }
4252
4315
  async acquire() {
4253
4316
  (0, import_log14.log)("acquiring lock...", void 0, {
4254
- F: __dxlog_file16,
4317
+ F: __dxlog_file17,
4255
4318
  L: 32,
4256
4319
  S: this,
4257
4320
  C: (f, a) => f(...a)
@@ -4259,7 +4322,7 @@ var Lock = class {
4259
4322
  this._fileHandle = await import_lock_file.LockFile.acquire(this._lockPath);
4260
4323
  await this._onAcquire?.();
4261
4324
  (0, import_log14.log)("acquired lock", void 0, {
4262
- F: __dxlog_file16,
4325
+ F: __dxlog_file17,
4263
4326
  L: 37,
4264
4327
  S: this,
4265
4328
  C: (f, a) => f(...a)
@@ -4267,8 +4330,8 @@ var Lock = class {
4267
4330
  }
4268
4331
  async release() {
4269
4332
  await this._onRelease?.();
4270
- (0, import_invariant14.invariant)(this._fileHandle, "Lock is not acquired", {
4271
- F: __dxlog_file16,
4333
+ (0, import_invariant15.invariant)(this._fileHandle, "Lock is not acquired", {
4334
+ F: __dxlog_file17,
4272
4335
  L: 42,
4273
4336
  S: this,
4274
4337
  A: [
@@ -4288,7 +4351,7 @@ var import_async16 = require("@dxos/async");
4288
4351
  var import_codec_protobuf13 = require("@dxos/codec-protobuf");
4289
4352
  var import_log15 = require("@dxos/log");
4290
4353
  var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
4291
- var import_util7 = require("@dxos/util");
4354
+ var import_util8 = require("@dxos/util");
4292
4355
  var LoggingServiceImpl = class {
4293
4356
  constructor() {
4294
4357
  this._logs = new import_async16.Event();
@@ -4306,15 +4369,15 @@ var LoggingServiceImpl = class {
4306
4369
  }
4307
4370
  async controlMetrics({ reset, record }) {
4308
4371
  if (reset) {
4309
- import_util7.tracer.clear();
4372
+ import_util8.tracer.clear();
4310
4373
  }
4311
4374
  if (record === true) {
4312
- import_util7.tracer.start();
4375
+ import_util8.tracer.start();
4313
4376
  } else if (record === false) {
4314
- import_util7.tracer.stop();
4377
+ import_util8.tracer.stop();
4315
4378
  }
4316
4379
  return {
4317
- recording: import_util7.tracer.recording
4380
+ recording: import_util8.tracer.recording
4318
4381
  };
4319
4382
  }
4320
4383
  /**
@@ -4322,10 +4385,10 @@ var LoggingServiceImpl = class {
4322
4385
  */
4323
4386
  queryMetrics({ interval = 5e3 }) {
4324
4387
  const getNumericalValues = (key) => {
4325
- const events = import_util7.tracer.get(key) ?? [];
4388
+ const events = import_util8.tracer.get(key) ?? [];
4326
4389
  return {
4327
4390
  key,
4328
- stats: (0, import_util7.numericalValues)(events, "duration")
4391
+ stats: (0, import_util8.numericalValues)(events, "duration")
4329
4392
  };
4330
4393
  };
4331
4394
  return new import_codec_protobuf13.Stream(({ next }) => {
@@ -4363,7 +4426,7 @@ var LoggingServiceImpl = class {
4363
4426
  }
4364
4427
  const record = {
4365
4428
  ...entry2,
4366
- context: (0, import_util7.jsonify)((0, import_log15.getContextFromEntry)(entry2)),
4429
+ context: (0, import_util8.jsonify)((0, import_log15.getContextFromEntry)(entry2)),
4367
4430
  timestamp: /* @__PURE__ */ new Date(),
4368
4431
  meta: {
4369
4432
  // TODO(dmaretskyi): Fix proto.
@@ -4437,10 +4500,10 @@ var import_client_protocol4 = require("@dxos/client-protocol");
4437
4500
  var import_protocols11 = require("@dxos/protocols");
4438
4501
  var import_config = require("@dxos/protocols/proto/dxos/config");
4439
4502
  var import_random_access_storage = require("@dxos/random-access-storage");
4440
- var import_util8 = require("@dxos/util");
4503
+ var import_util9 = require("@dxos/util");
4441
4504
  var StorageDriver = import_config.Runtime.Client.Storage.StorageDriver;
4442
4505
  var createStorageObjects = (config) => {
4443
- const { persistent = false, keyStore, dataStore, dataRoot = (0, import_util8.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage" } = config ?? {};
4506
+ const { persistent = false, keyStore, dataStore, dataRoot = (0, import_util9.isNode)() ? import_client_protocol4.DX_DATA : "dxos/storage" } = config ?? {};
4444
4507
  if (persistent && dataStore === StorageDriver.RAM) {
4445
4508
  throw new import_protocols11.InvalidConfigError("RAM storage cannot be used in persistent mode.");
4446
4509
  }
@@ -4484,7 +4547,7 @@ var toStorageType = (type) => {
4484
4547
  // packages/sdk/client-services/src/packlets/system/system-service.ts
4485
4548
  var import_codec_protobuf15 = require("@dxos/codec-protobuf");
4486
4549
  var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
4487
- var import_util9 = require("@dxos/util");
4550
+ var import_util10 = require("@dxos/util");
4488
4551
  var SystemServiceImpl = class {
4489
4552
  constructor({ config, statusUpdate, getDiagnostics, onUpdateStatus, getCurrentStatus, onReset }) {
4490
4553
  this._config = config;
@@ -4504,7 +4567,7 @@ var SystemServiceImpl = class {
4504
4567
  const diagnostics = await this._getDiagnostics();
4505
4568
  return {
4506
4569
  timestamp: /* @__PURE__ */ new Date(),
4507
- diagnostics: JSON.parse(JSON.stringify(diagnostics, (0, import_util9.jsonKeyReplacer)({
4570
+ diagnostics: JSON.parse(JSON.stringify(diagnostics, (0, import_util10.jsonKeyReplacer)({
4508
4571
  truncate: keys === import_services13.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE,
4509
4572
  humanize: keys === import_services13.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE
4510
4573
  })))
@@ -4546,7 +4609,7 @@ function _ts_decorate7(decorators, target, key, desc) {
4546
4609
  r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4547
4610
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4548
4611
  }
4549
- var __dxlog_file17 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4612
+ var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/service-host.ts";
4550
4613
  var createDefaultModelFactory = () => {
4551
4614
  return new import_model_factory.ModelFactory().registerModel(import_document_model2.DocumentModel).registerModel(import_text_model.TextModel);
4552
4615
  };
@@ -4646,8 +4709,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4646
4709
  * Can only be called once.
4647
4710
  */
4648
4711
  initialize({ config, ...options }) {
4649
- (0, import_invariant15.invariant)(!this._open, "service host is open", {
4650
- F: __dxlog_file17,
4712
+ (0, import_invariant16.invariant)(!this._open, "service host is open", {
4713
+ F: __dxlog_file18,
4651
4714
  L: 201,
4652
4715
  S: this,
4653
4716
  A: [
@@ -4656,14 +4719,14 @@ var ClientServicesHost = class ClientServicesHost2 {
4656
4719
  ]
4657
4720
  });
4658
4721
  (0, import_log16.log)("initializing...", void 0, {
4659
- F: __dxlog_file17,
4722
+ F: __dxlog_file18,
4660
4723
  L: 202,
4661
4724
  S: this,
4662
4725
  C: (f, a) => f(...a)
4663
4726
  });
4664
4727
  if (config) {
4665
- (0, import_invariant15.invariant)(!this._config, "config already set", {
4666
- F: __dxlog_file17,
4728
+ (0, import_invariant16.invariant)(!this._config, "config already set", {
4729
+ F: __dxlog_file18,
4667
4730
  L: 205,
4668
4731
  S: this,
4669
4732
  A: [
@@ -4680,8 +4743,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4680
4743
  iceServers: this._config?.get("runtime.services.ice")
4681
4744
  }), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
4682
4745
  this._signalManager = signalManager;
4683
- (0, import_invariant15.invariant)(!this._networkManager, "network manager already set", {
4684
- F: __dxlog_file17,
4746
+ (0, import_invariant16.invariant)(!this._networkManager, "network manager already set", {
4747
+ F: __dxlog_file18,
4685
4748
  L: 221,
4686
4749
  S: this,
4687
4750
  A: [
@@ -4695,7 +4758,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4695
4758
  signalManager
4696
4759
  });
4697
4760
  (0, import_log16.log)("initialized", void 0, {
4698
- F: __dxlog_file17,
4761
+ F: __dxlog_file18,
4699
4762
  L: 228,
4700
4763
  S: this,
4701
4764
  C: (f, a) => f(...a)
@@ -4705,17 +4768,17 @@ var ClientServicesHost = class ClientServicesHost2 {
4705
4768
  if (this._open) {
4706
4769
  return;
4707
4770
  }
4708
- const traceId = import_keys12.PublicKey.random().toHex();
4771
+ const traceId = import_keys13.PublicKey.random().toHex();
4709
4772
  import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.begin({
4710
4773
  id: traceId
4711
4774
  }), {
4712
- F: __dxlog_file17,
4775
+ F: __dxlog_file18,
4713
4776
  L: 239,
4714
4777
  S: this,
4715
4778
  C: (f, a) => f(...a)
4716
4779
  });
4717
- (0, import_invariant15.invariant)(this._config, "config not set", {
4718
- F: __dxlog_file17,
4780
+ (0, import_invariant16.invariant)(this._config, "config not set", {
4781
+ F: __dxlog_file18,
4719
4782
  L: 241,
4720
4783
  S: this,
4721
4784
  A: [
@@ -4723,8 +4786,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4723
4786
  "'config not set'"
4724
4787
  ]
4725
4788
  });
4726
- (0, import_invariant15.invariant)(this._storage, "storage not set", {
4727
- F: __dxlog_file17,
4789
+ (0, import_invariant16.invariant)(this._storage, "storage not set", {
4790
+ F: __dxlog_file18,
4728
4791
  L: 242,
4729
4792
  S: this,
4730
4793
  A: [
@@ -4732,8 +4795,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4732
4795
  "'storage not set'"
4733
4796
  ]
4734
4797
  });
4735
- (0, import_invariant15.invariant)(this._signalManager, "signal manager not set", {
4736
- F: __dxlog_file17,
4798
+ (0, import_invariant16.invariant)(this._signalManager, "signal manager not set", {
4799
+ F: __dxlog_file18,
4737
4800
  L: 243,
4738
4801
  S: this,
4739
4802
  A: [
@@ -4741,8 +4804,8 @@ var ClientServicesHost = class ClientServicesHost2 {
4741
4804
  "'signal manager not set'"
4742
4805
  ]
4743
4806
  });
4744
- (0, import_invariant15.invariant)(this._networkManager, "network manager not set", {
4745
- F: __dxlog_file17,
4807
+ (0, import_invariant16.invariant)(this._networkManager, "network manager not set", {
4808
+ F: __dxlog_file18,
4746
4809
  L: 244,
4747
4810
  S: this,
4748
4811
  A: [
@@ -4754,7 +4817,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4754
4817
  (0, import_log16.log)("opening...", {
4755
4818
  lockKey: this._resourceLock?.lockKey
4756
4819
  }, {
4757
- F: __dxlog_file17,
4820
+ F: __dxlog_file18,
4758
4821
  L: 247,
4759
4822
  S: this,
4760
4823
  C: (f, a) => f(...a)
@@ -4800,7 +4863,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4800
4863
  (0, import_log16.log)("opened", {
4801
4864
  deviceKey
4802
4865
  }, {
4803
- F: __dxlog_file17,
4866
+ F: __dxlog_file18,
4804
4867
  L: 316,
4805
4868
  S: this,
4806
4869
  C: (f, a) => f(...a)
@@ -4808,7 +4871,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4808
4871
  import_log16.log.trace("dxos.client-services.host.open", import_protocols12.trace.end({
4809
4872
  id: traceId
4810
4873
  }), {
4811
- F: __dxlog_file17,
4874
+ F: __dxlog_file18,
4812
4875
  L: 317,
4813
4876
  S: this,
4814
4877
  C: (f, a) => f(...a)
@@ -4822,7 +4885,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4822
4885
  (0, import_log16.log)("closing...", {
4823
4886
  deviceKey
4824
4887
  }, {
4825
- F: __dxlog_file17,
4888
+ F: __dxlog_file18,
4826
4889
  L: 328,
4827
4890
  S: this,
4828
4891
  C: (f, a) => f(...a)
@@ -4838,24 +4901,24 @@ var ClientServicesHost = class ClientServicesHost2 {
4838
4901
  (0, import_log16.log)("closed", {
4839
4902
  deviceKey
4840
4903
  }, {
4841
- F: __dxlog_file17,
4904
+ F: __dxlog_file18,
4842
4905
  L: 335,
4843
4906
  S: this,
4844
4907
  C: (f, a) => f(...a)
4845
4908
  });
4846
4909
  }
4847
4910
  async reset() {
4848
- const traceId = import_keys12.PublicKey.random().toHex();
4911
+ const traceId = import_keys13.PublicKey.random().toHex();
4849
4912
  import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.begin({
4850
4913
  id: traceId
4851
4914
  }), {
4852
- F: __dxlog_file17,
4915
+ F: __dxlog_file18,
4853
4916
  L: 340,
4854
4917
  S: this,
4855
4918
  C: (f, a) => f(...a)
4856
4919
  });
4857
4920
  (0, import_log16.log)("resetting...", void 0, {
4858
- F: __dxlog_file17,
4921
+ F: __dxlog_file18,
4859
4922
  L: 342,
4860
4923
  S: this,
4861
4924
  C: (f, a) => f(...a)
@@ -4863,7 +4926,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4863
4926
  await this._serviceContext?.close();
4864
4927
  await this._storage.reset();
4865
4928
  (0, import_log16.log)("reset", void 0, {
4866
- F: __dxlog_file17,
4929
+ F: __dxlog_file18,
4867
4930
  L: 345,
4868
4931
  S: this,
4869
4932
  C: (f, a) => f(...a)
@@ -4871,7 +4934,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4871
4934
  import_log16.log.trace("dxos.sdk.client-services-host.reset", import_protocols12.trace.end({
4872
4935
  id: traceId
4873
4936
  }), {
4874
- F: __dxlog_file17,
4937
+ F: __dxlog_file18,
4875
4938
  L: 346,
4876
4939
  S: this,
4877
4940
  C: (f, a) => f(...a)
@@ -4917,7 +4980,7 @@ ClientServicesHost = _ts_decorate7([
4917
4980
  ], ClientServicesHost);
4918
4981
 
4919
4982
  // packages/sdk/client-services/src/packlets/testing/invitation-utils.ts
4920
- var __dxlog_file18 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
4983
+ var __dxlog_file19 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/testing/invitation-utils.ts";
4921
4984
  var sanitizeInvitation = (invitation) => {
4922
4985
  return {
4923
4986
  invitationId: invitation.invitationId,
@@ -4947,8 +5010,8 @@ var performInvitation = ({ host, guest, options, hooks }) => {
4947
5010
  if (hooks?.guest?.onConnecting?.(guestObservable)) {
4948
5011
  break;
4949
5012
  }
4950
- (0, import_invariant16.invariant)(hostInvitation.swarmKey.equals(guestInvitation.swarmKey), void 0, {
4951
- F: __dxlog_file18,
5013
+ (0, import_invariant17.invariant)(hostInvitation.swarmKey.equals(guestInvitation.swarmKey), void 0, {
5014
+ F: __dxlog_file19,
4952
5015
  L: 84,
4953
5016
  S: void 0,
4954
5017
  A: [