@dxos/client-services 0.1.32-next.86f5578 → 0.1.34

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.
@@ -82,6 +82,7 @@ var import_client8 = require("@dxos/client");
82
82
  var import_debug7 = require("@dxos/debug");
83
83
  var import_echo_pipeline5 = require("@dxos/echo-pipeline");
84
84
  var import_log16 = require("@dxos/log");
85
+ var import_protocols7 = require("@dxos/protocols");
85
86
  var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
86
87
 
87
88
  // packages/sdk/client-services/src/packlets/deprecated/tracing.ts
@@ -675,7 +676,9 @@ var Identity = class {
675
676
  var import_node_assert2 = __toESM(require("node:assert"));
676
677
  var import_async6 = require("@dxos/async");
677
678
  var import_credentials5 = require("@dxos/credentials");
679
+ var import_keys5 = require("@dxos/keys");
678
680
  var import_log3 = require("@dxos/log");
681
+ var import_protocols2 = require("@dxos/protocols");
679
682
  var import_credentials6 = require("@dxos/protocols/proto/dxos/halo/credentials");
680
683
  var import_util2 = require("@dxos/util");
681
684
  var IdentityManager = class {
@@ -687,18 +690,28 @@ var IdentityManager = class {
687
690
  this._feedStore = _feedStore;
688
691
  this._spaceManager = _spaceManager;
689
692
  this.stateUpdate = new import_async6.Event();
693
+ this._instanceId = import_keys5.PublicKey.random().toHex();
690
694
  }
691
695
  get identity() {
692
696
  return this._identity;
693
697
  }
694
698
  async open() {
699
+ var _a;
700
+ import_log3.log.trace("dxos.halo.identity-manager", import_protocols2.trace.begin({
701
+ id: this._instanceId
702
+ }), {
703
+ file: "identity-manager.ts",
704
+ line: 71,
705
+ scope: this,
706
+ callSite: (f, a) => f(...a)
707
+ });
695
708
  await this._metadataStore.load();
696
709
  const identityRecord = this._metadataStore.getIdentityRecord();
697
710
  (0, import_log3.log)("identity record", {
698
711
  identityRecord
699
712
  }, {
700
713
  file: "identity-manager.ts",
701
- line: 71,
714
+ line: 75,
702
715
  scope: this,
703
716
  callSite: (f, a) => f(...a)
704
717
  });
@@ -706,18 +719,36 @@ var IdentityManager = class {
706
719
  this._identity = await this._constructIdentity(identityRecord);
707
720
  await this._identity.open();
708
721
  await this._identity.ready();
722
+ import_log3.log.trace("dxos.halo.identity", {
723
+ identityKey: identityRecord.identityKey,
724
+ displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
725
+ }, {
726
+ file: "identity-manager.ts",
727
+ line: 80,
728
+ scope: this,
729
+ callSite: (f, a) => f(...a)
730
+ });
709
731
  this.stateUpdate.emit();
710
732
  }
711
733
  }
712
734
  async close() {
713
735
  var _a;
714
736
  await ((_a = this._identity) == null ? void 0 : _a.close());
737
+ import_log3.log.trace("dxos.halo.identity-manager", import_protocols2.trace.end({
738
+ id: this._instanceId
739
+ }), {
740
+ file: "identity-manager.ts",
741
+ line: 90,
742
+ scope: this,
743
+ callSite: (f, a) => f(...a)
744
+ });
715
745
  }
716
746
  async createIdentity({ displayName } = {}) {
747
+ var _a;
717
748
  (0, import_node_assert2.default)(!this._identity, "Identity already exists.");
718
749
  (0, import_log3.log)("creating identity...", {}, {
719
750
  file: "identity-manager.ts",
720
- line: 86,
751
+ line: 95,
721
752
  scope: this,
722
753
  callSite: (f, a) => f(...a)
723
754
  });
@@ -761,13 +792,22 @@ var IdentityManager = class {
761
792
  await this._metadataStore.setIdentityRecord(identityRecord);
762
793
  this._identity = identity;
763
794
  await this._identity.ready();
795
+ import_log3.log.trace("dxos.halo.identity", {
796
+ identityKey: identityRecord.identityKey,
797
+ displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
798
+ }, {
799
+ file: "identity-manager.ts",
800
+ line: 150,
801
+ scope: this,
802
+ callSite: (f, a) => f(...a)
803
+ });
764
804
  this.stateUpdate.emit();
765
805
  (0, import_log3.log)("created identity", {
766
806
  identityKey: identity.identityKey,
767
807
  deviceKey: identity.deviceKey
768
808
  }, {
769
809
  file: "identity-manager.ts",
770
- line: 143,
810
+ line: 156,
771
811
  scope: this,
772
812
  callSite: (f, a) => f(...a)
773
813
  });
@@ -777,11 +817,12 @@ var IdentityManager = class {
777
817
  * Accept an existing identity. Expects it's device key to be authorized (now or later).
778
818
  */
779
819
  async acceptIdentity(params) {
820
+ var _a;
780
821
  (0, import_log3.log)("accepting identity", {
781
822
  params
782
823
  }, {
783
824
  file: "identity-manager.ts",
784
- line: 151,
825
+ line: 164,
785
826
  scope: this,
786
827
  callSite: (f, a) => f(...a)
787
828
  });
@@ -802,13 +843,22 @@ var IdentityManager = class {
802
843
  this._identity = identity;
803
844
  await this._metadataStore.setIdentityRecord(identityRecord);
804
845
  await this._identity.ready();
846
+ import_log3.log.trace("dxos.halo.identity", {
847
+ identityKey: identityRecord.identityKey,
848
+ displayName: (_a = this._identity.profileDocument) == null ? void 0 : _a.displayName
849
+ }, {
850
+ file: "identity-manager.ts",
851
+ line: 184,
852
+ scope: this,
853
+ callSite: (f, a) => f(...a)
854
+ });
805
855
  this.stateUpdate.emit();
806
856
  (0, import_log3.log)("accepted identity", {
807
857
  identityKey: identity.identityKey,
808
858
  deviceKey: identity.deviceKey
809
859
  }, {
810
860
  file: "identity-manager.ts",
811
- line: 172,
861
+ line: 190,
812
862
  scope: this,
813
863
  callSite: (f, a) => f(...a)
814
864
  });
@@ -820,7 +870,7 @@ var IdentityManager = class {
820
870
  identityRecord
821
871
  }, {
822
872
  file: "identity-manager.ts",
823
- line: 178,
873
+ line: 196,
824
874
  scope: this,
825
875
  callSite: (f, a) => f(...a)
826
876
  });
@@ -853,7 +903,7 @@ var IdentityManager = class {
853
903
  identityKey: identityRecord.identityKey
854
904
  }, {
855
905
  file: "identity-manager.ts",
856
- line: 206,
906
+ line: 224,
857
907
  scope: this,
858
908
  callSite: (f, a) => f(...a)
859
909
  });
@@ -929,10 +979,10 @@ var import_async7 = require("@dxos/async");
929
979
  var import_client = require("@dxos/client");
930
980
  var import_context3 = require("@dxos/context");
931
981
  var import_credentials8 = require("@dxos/credentials");
932
- var import_keys5 = require("@dxos/keys");
982
+ var import_keys6 = require("@dxos/keys");
933
983
  var import_log4 = require("@dxos/log");
934
984
  var import_network_manager = require("@dxos/network-manager");
935
- var import_protocols2 = require("@dxos/protocols");
985
+ var import_protocols3 = require("@dxos/protocols");
936
986
  var import_services2 = require("@dxos/protocols/proto/dxos/client/services");
937
987
  var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
938
988
  var import_teleport = require("@dxos/teleport");
@@ -951,8 +1001,8 @@ var DeviceInvitationsHandler = class extends import_client.AbstractInvitationsHa
951
1001
  const identity = this._params.getIdentity();
952
1002
  const invitation = {
953
1003
  type,
954
- invitationId: import_keys5.PublicKey.random().toHex(),
955
- swarmKey: swarmKey != null ? swarmKey : import_keys5.PublicKey.random(),
1004
+ invitationId: import_keys6.PublicKey.random().toHex(),
1005
+ swarmKey: swarmKey != null ? swarmKey : import_keys6.PublicKey.random(),
956
1006
  authenticationCode: (0, import_credentials8.generatePasscode)(import_client.AUTHENTICATION_CODE_LENGTH)
957
1007
  };
958
1008
  const ctx = new import_context3.Context({
@@ -1213,7 +1263,7 @@ var DeviceInvitationsHandler = class extends import_client.AbstractInvitationsHa
1213
1263
  const topic = invitation.swarmKey;
1214
1264
  const swarmConnection = await this._networkManager.joinSwarm({
1215
1265
  topic,
1216
- peerId: import_keys5.PublicKey.random(),
1266
+ peerId: import_keys6.PublicKey.random(),
1217
1267
  protocolProvider: (0, import_network_manager.createTeleportProtocolFactory)(async (teleport) => {
1218
1268
  teleport.addExtension("dxos.halo.invitations", createExtension());
1219
1269
  }),
@@ -1232,7 +1282,7 @@ var HostHaloInvitationExtension = class extends import_teleport.RpcExtension {
1232
1282
  constructor(_callbacks) {
1233
1283
  super({
1234
1284
  exposed: {
1235
- HaloHostService: import_protocols2.schema.getService("dxos.halo.invitations.HaloHostService")
1285
+ HaloHostService: import_protocols3.schema.getService("dxos.halo.invitations.HaloHostService")
1236
1286
  }
1237
1287
  });
1238
1288
  this._callbacks = _callbacks;
@@ -1264,7 +1314,7 @@ var GuestHaloInvitationExtension = class extends import_teleport.RpcExtension {
1264
1314
  constructor(_callbacks) {
1265
1315
  super({
1266
1316
  requested: {
1267
- HaloHostService: import_protocols2.schema.getService("dxos.halo.invitations.HaloHostService")
1317
+ HaloHostService: import_protocols3.schema.getService("dxos.halo.invitations.HaloHostService")
1268
1318
  }
1269
1319
  });
1270
1320
  this._callbacks = _callbacks;
@@ -1518,10 +1568,10 @@ var import_client2 = require("@dxos/client");
1518
1568
  var import_context4 = require("@dxos/context");
1519
1569
  var import_credentials9 = require("@dxos/credentials");
1520
1570
  var import_feed_store3 = require("@dxos/feed-store");
1521
- var import_keys6 = require("@dxos/keys");
1571
+ var import_keys7 = require("@dxos/keys");
1522
1572
  var import_log6 = require("@dxos/log");
1523
1573
  var import_network_manager2 = require("@dxos/network-manager");
1524
- var import_protocols3 = require("@dxos/protocols");
1574
+ var import_protocols4 = require("@dxos/protocols");
1525
1575
  var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
1526
1576
  var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations");
1527
1577
  var import_teleport2 = require("@dxos/teleport");
@@ -1544,8 +1594,8 @@ var SpaceInvitationsHandler = class extends import_client2.AbstractInvitationsHa
1544
1594
  (0, import_node_assert6.default)(space);
1545
1595
  const invitation = {
1546
1596
  type,
1547
- invitationId: import_keys6.PublicKey.random().toHex(),
1548
- swarmKey: swarmKey != null ? swarmKey : import_keys6.PublicKey.random(),
1597
+ invitationId: import_keys7.PublicKey.random().toHex(),
1598
+ swarmKey: swarmKey != null ? swarmKey : import_keys7.PublicKey.random(),
1549
1599
  spaceKey: space.key,
1550
1600
  authMethod: (_a = options == null ? void 0 : options.authMethod) != null ? _a : import_invitations2.AuthMethod.SHARED_SECRET,
1551
1601
  authenticationCode: (0, import_credentials9.generatePasscode)(import_client2.AUTHENTICATION_CODE_LENGTH)
@@ -1898,7 +1948,7 @@ var SpaceInvitationsHandler = class extends import_client2.AbstractInvitationsHa
1898
1948
  const topic = invitation.swarmKey;
1899
1949
  const swarmConnection = await this._networkManager.joinSwarm({
1900
1950
  topic,
1901
- peerId: import_keys6.PublicKey.random(),
1951
+ peerId: import_keys7.PublicKey.random(),
1902
1952
  protocolProvider: (0, import_network_manager2.createTeleportProtocolFactory)(async (teleport) => {
1903
1953
  teleport.addExtension("dxos.halo.invitations", createExtension());
1904
1954
  }),
@@ -1918,7 +1968,7 @@ var HostSpaceInvitationExtension = class extends import_teleport2.RpcExtension {
1918
1968
  constructor(_callbacks) {
1919
1969
  super({
1920
1970
  exposed: {
1921
- SpaceHostService: import_protocols3.schema.getService("dxos.halo.invitations.SpaceHostService")
1971
+ SpaceHostService: import_protocols4.schema.getService("dxos.halo.invitations.SpaceHostService")
1922
1972
  }
1923
1973
  });
1924
1974
  this._callbacks = _callbacks;
@@ -1949,7 +1999,7 @@ var GuestSpaceInvitationExtension = class extends import_teleport2.RpcExtension
1949
1999
  constructor(_callbacks) {
1950
2000
  super({
1951
2001
  requested: {
1952
- SpaceHostService: import_protocols3.schema.getService("dxos.halo.invitations.SpaceHostService")
2002
+ SpaceHostService: import_protocols4.schema.getService("dxos.halo.invitations.SpaceHostService")
1953
2003
  }
1954
2004
  });
1955
2005
  this._callbacks = _callbacks;
@@ -2010,7 +2060,7 @@ var import_client4 = require("@dxos/client");
2010
2060
  var import_context7 = require("@dxos/context");
2011
2061
  var import_credentials11 = require("@dxos/credentials");
2012
2062
  var import_echo_pipeline2 = require("@dxos/echo-pipeline");
2013
- var import_keys9 = require("@dxos/keys");
2063
+ var import_keys10 = require("@dxos/keys");
2014
2064
  var import_log9 = require("@dxos/log");
2015
2065
  var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
2016
2066
  var import_util5 = require("@dxos/util");
@@ -2022,7 +2072,7 @@ var import_context6 = require("@dxos/context");
2022
2072
  var import_debug3 = require("@dxos/debug");
2023
2073
  var import_echo_pipeline = require("@dxos/echo-pipeline");
2024
2074
  var import_errors = require("@dxos/errors");
2025
- var import_keys8 = require("@dxos/keys");
2075
+ var import_keys9 = require("@dxos/keys");
2026
2076
  var import_log8 = require("@dxos/log");
2027
2077
  var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
2028
2078
  var import_util4 = require("@dxos/util");
@@ -2031,9 +2081,9 @@ var import_util4 = require("@dxos/util");
2031
2081
  var import_node_assert8 = __toESM(require("node:assert"));
2032
2082
  var import_async9 = require("@dxos/async");
2033
2083
  var import_context5 = require("@dxos/context");
2034
- var import_keys7 = require("@dxos/keys");
2084
+ var import_keys8 = require("@dxos/keys");
2035
2085
  var import_log7 = require("@dxos/log");
2036
- var import_protocols4 = require("@dxos/protocols");
2086
+ var import_protocols5 = require("@dxos/protocols");
2037
2087
  var import_teleport3 = require("@dxos/teleport");
2038
2088
  var import_util3 = require("@dxos/util");
2039
2089
  var DEFAULT_RETRY_TIMEOUT = 1e3;
@@ -2044,8 +2094,8 @@ var NotarizationPlugin = class {
2044
2094
  this._ctx = new import_context5.Context();
2045
2095
  this._extensionOpened = new import_async9.Event();
2046
2096
  this._extensions = /* @__PURE__ */ new Set();
2047
- this._processedCredentials = new import_util3.ComplexSet(import_keys7.PublicKey.hash);
2048
- this._processCredentialsTriggers = new import_util3.ComplexMap(import_keys7.PublicKey.hash);
2097
+ this._processedCredentials = new import_util3.ComplexSet(import_keys8.PublicKey.hash);
2098
+ this._processCredentialsTriggers = new import_util3.ComplexMap(import_keys8.PublicKey.hash);
2049
2099
  }
2050
2100
  async open() {
2051
2101
  }
@@ -2239,10 +2289,10 @@ var NotarizationTeleportExtension = class extends import_teleport3.RpcExtension
2239
2289
  constructor(_params) {
2240
2290
  super({
2241
2291
  requested: {
2242
- NotarizationService: import_protocols4.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
2292
+ NotarizationService: import_protocols5.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
2243
2293
  },
2244
2294
  exposed: {
2245
- NotarizationService: import_protocols4.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
2295
+ NotarizationService: import_protocols5.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
2246
2296
  }
2247
2297
  });
2248
2298
  this._params = _params;
@@ -2303,7 +2353,7 @@ var DataSpace = class DataSpace2 {
2303
2353
  snapshotId: params.snapshotId
2304
2354
  });
2305
2355
  this.authVerifier = new TrustedKeySetAuthVerifier({
2306
- trustedKeysProvider: () => new import_util4.ComplexSet(import_keys8.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
2356
+ trustedKeysProvider: () => new import_util4.ComplexSet(import_keys9.PublicKey.hash, Array.from(this._inner.spaceState.members.keys())),
2307
2357
  update: this._inner.stateUpdate,
2308
2358
  authTimeout: AUTH_TIMEOUT2
2309
2359
  });
@@ -2506,7 +2556,7 @@ var DataSpaceManager = class DataSpaceManager2 {
2506
2556
  this._snapshotStore = _snapshotStore;
2507
2557
  this._ctx = new import_context7.Context();
2508
2558
  this.updated = new import_async11.Event();
2509
- this._spaces = new import_util5.ComplexMap(import_keys9.PublicKey.hash);
2559
+ this._spaces = new import_util5.ComplexMap(import_keys10.PublicKey.hash);
2510
2560
  this._isOpen = false;
2511
2561
  }
2512
2562
  // TODO(burdon): Remove.
@@ -3509,7 +3559,9 @@ var import_debug6 = require("@dxos/debug");
3509
3559
  var import_echo_pipeline4 = require("@dxos/echo-pipeline");
3510
3560
  var import_feed_store4 = require("@dxos/feed-store");
3511
3561
  var import_keyring = require("@dxos/keyring");
3562
+ var import_keys11 = require("@dxos/keys");
3512
3563
  var import_log15 = require("@dxos/log");
3564
+ var import_protocols6 = require("@dxos/protocols");
3513
3565
  var ServiceContext = class {
3514
3566
  // prettier-ignore
3515
3567
  constructor(storage, networkManager, modelFactory) {
@@ -3518,6 +3570,7 @@ var ServiceContext = class {
3518
3570
  this.modelFactory = modelFactory;
3519
3571
  this.initialized = new import_async18.Trigger();
3520
3572
  this.dataServiceSubscriptions = new import_echo_pipeline4.DataServiceSubscriptions();
3573
+ this._instanceId = import_keys11.PublicKey.random().toHex();
3521
3574
  this.metadataStore = new import_echo_pipeline4.MetadataStore(storage.createDirectory("metadata"));
3522
3575
  this.snapshotStore = new import_echo_pipeline4.SnapshotStore(storage.createDirectory("snapshots"));
3523
3576
  this.keyring = new import_keyring.Keyring(storage.createDirectory("keyring"));
@@ -3546,9 +3599,17 @@ var ServiceContext = class {
3546
3599
  });
3547
3600
  }
3548
3601
  async open() {
3602
+ import_log15.log.trace("dxos.sdk.client-services", import_protocols6.trace.begin({
3603
+ id: this._instanceId
3604
+ }), {
3605
+ file: "service-context.ts",
3606
+ line: 98,
3607
+ scope: this,
3608
+ callSite: (f, a) => f(...a)
3609
+ });
3549
3610
  (0, import_log15.log)("opening...", {}, {
3550
3611
  file: "service-context.ts",
3551
- line: 94,
3612
+ line: 100,
3552
3613
  scope: this,
3553
3614
  callSite: (f, a) => f(...a)
3554
3615
  });
@@ -3560,7 +3621,7 @@ var ServiceContext = class {
3560
3621
  }
3561
3622
  (0, import_log15.log)("opened", {}, {
3562
3623
  file: "service-context.ts",
3563
- line: 101,
3624
+ line: 107,
3564
3625
  scope: this,
3565
3626
  callSite: (f, a) => f(...a)
3566
3627
  });
@@ -3569,7 +3630,7 @@ var ServiceContext = class {
3569
3630
  var _a, _b;
3570
3631
  (0, import_log15.log)("closing...", {}, {
3571
3632
  file: "service-context.ts",
3572
- line: 105,
3633
+ line: 111,
3573
3634
  scope: this,
3574
3635
  callSite: (f, a) => f(...a)
3575
3636
  });
@@ -3582,7 +3643,15 @@ var ServiceContext = class {
3582
3643
  this.dataServiceSubscriptions.clear();
3583
3644
  (0, import_log15.log)("closed", {}, {
3584
3645
  file: "service-context.ts",
3585
- line: 113,
3646
+ line: 119,
3647
+ scope: this,
3648
+ callSite: (f, a) => f(...a)
3649
+ });
3650
+ import_log15.log.trace("dxos.sdk.client-services", import_protocols6.trace.end({
3651
+ id: this._instanceId
3652
+ }), {
3653
+ file: "service-context.ts",
3654
+ line: 121,
3586
3655
  scope: this,
3587
3656
  callSite: (f, a) => f(...a)
3588
3657
  });
@@ -3590,7 +3659,7 @@ var ServiceContext = class {
3590
3659
  async reset() {
3591
3660
  (0, import_log15.log)("resetting...", {}, {
3592
3661
  file: "service-context.ts",
3593
- line: 117,
3662
+ line: 125,
3594
3663
  scope: this,
3595
3664
  callSite: (f, a) => f(...a)
3596
3665
  });
@@ -3598,7 +3667,7 @@ var ServiceContext = class {
3598
3667
  await this.storage.reset();
3599
3668
  (0, import_log15.log)("reset", {}, {
3600
3669
  file: "service-context.ts",
3601
- line: 120,
3670
+ line: 128,
3602
3671
  scope: this,
3603
3672
  callSite: (f, a) => f(...a)
3604
3673
  });
@@ -3618,7 +3687,7 @@ var ServiceContext = class {
3618
3687
  var _a;
3619
3688
  (0, import_log15.log)("initializing spaces...", {}, {
3620
3689
  file: "service-context.ts",
3621
- line: 139,
3690
+ line: 147,
3622
3691
  scope: this,
3623
3692
  callSite: (f, a) => f(...a)
3624
3693
  });
@@ -3654,7 +3723,7 @@ var ServiceContext = class {
3654
3723
  details: assertion
3655
3724
  }, {
3656
3725
  file: "service-context.ts",
3657
- line: 182,
3726
+ line: 190,
3658
3727
  scope: this,
3659
3728
  callSite: (f, a) => f(...a)
3660
3729
  });
@@ -3665,7 +3734,7 @@ var ServiceContext = class {
3665
3734
  details: assertion
3666
3735
  }, {
3667
3736
  file: "service-context.ts",
3668
- line: 186,
3737
+ line: 194,
3669
3738
  scope: this,
3670
3739
  callSite: (f, a) => f(...a)
3671
3740
  });
@@ -3676,7 +3745,7 @@ var ServiceContext = class {
3676
3745
  details: assertion
3677
3746
  }, {
3678
3747
  file: "service-context.ts",
3679
- line: 191,
3748
+ line: 199,
3680
3749
  scope: this,
3681
3750
  callSite: (f, a) => f(...a)
3682
3751
  });
@@ -3687,7 +3756,7 @@ var ServiceContext = class {
3687
3756
  } catch (err) {
3688
3757
  import_log15.log.catch(err, {}, {
3689
3758
  file: "service-context.ts",
3690
- line: 197,
3759
+ line: 205,
3691
3760
  scope: this,
3692
3761
  callSite: (f, a) => f(...a)
3693
3762
  });
@@ -3736,6 +3805,7 @@ var ClientServicesHost = class {
3736
3805
  this._statusUpdate = new import_async19.Event();
3737
3806
  this._opening = false;
3738
3807
  this._open = false;
3808
+ this._instanceId = import_client8.PublicKey.random().toHex();
3739
3809
  this._storage = storage;
3740
3810
  this._modelFactory = modelFactory;
3741
3811
  if (config) {
@@ -3808,6 +3878,14 @@ var ClientServicesHost = class {
3808
3878
  if (this._open) {
3809
3879
  return;
3810
3880
  }
3881
+ import_log16.log.trace("dxos.sdk.client-services-host", import_protocols7.trace.begin({
3882
+ id: this._instanceId
3883
+ }), {
3884
+ file: "service-host.ts",
3885
+ line: 168,
3886
+ scope: this,
3887
+ callSite: (f, a) => f(...a)
3888
+ });
3811
3889
  (0, import_node_assert12.default)(this._config, "config not set");
3812
3890
  (0, import_node_assert12.default)(this._storage, "storage not set");
3813
3891
  (0, import_node_assert12.default)(this._networkManager, "network manager not set");
@@ -3816,7 +3894,7 @@ var ClientServicesHost = class {
3816
3894
  lockKey: (_a = this._resourceLock) == null ? void 0 : _a.lockKey
3817
3895
  }, {
3818
3896
  file: "service-host.ts",
3819
- line: 170,
3897
+ line: 175,
3820
3898
  scope: this,
3821
3899
  callSite: (f, a) => f(...a)
3822
3900
  });
@@ -3857,7 +3935,7 @@ var ClientServicesHost = class {
3857
3935
  deviceKey
3858
3936
  }, {
3859
3937
  file: "service-host.ts",
3860
- line: 224,
3938
+ line: 229,
3861
3939
  scope: this,
3862
3940
  callSite: (f, a) => f(...a)
3863
3941
  });
@@ -3872,7 +3950,7 @@ var ClientServicesHost = class {
3872
3950
  deviceKey
3873
3951
  }, {
3874
3952
  file: "service-host.ts",
3875
- line: 233,
3953
+ line: 238,
3876
3954
  scope: this,
3877
3955
  callSite: (f, a) => f(...a)
3878
3956
  });
@@ -3886,7 +3964,15 @@ var ClientServicesHost = class {
3886
3964
  deviceKey
3887
3965
  }, {
3888
3966
  file: "service-host.ts",
3889
- line: 238,
3967
+ line: 243,
3968
+ scope: this,
3969
+ callSite: (f, a) => f(...a)
3970
+ });
3971
+ import_log16.log.trace("dxos.sdk.client-services-host", import_protocols7.trace.end({
3972
+ id: this._instanceId
3973
+ }), {
3974
+ file: "service-host.ts",
3975
+ line: 245,
3890
3976
  scope: this,
3891
3977
  callSite: (f, a) => f(...a)
3892
3978
  });
@@ -4084,7 +4170,7 @@ var import_config3 = require("@dxos/config");
4084
4170
  var import_debug9 = require("@dxos/debug");
4085
4171
  var import_document_model = require("@dxos/document-model");
4086
4172
  var import_echo_db = require("@dxos/echo-db");
4087
- var import_keys10 = require("@dxos/keys");
4173
+ var import_keys12 = require("@dxos/keys");
4088
4174
  var import_log18 = require("@dxos/log");
4089
4175
  var import_messaging5 = require("@dxos/messaging");
4090
4176
  var import_network_manager8 = require("@dxos/network-manager");
@@ -4174,7 +4260,7 @@ var TestBuilder = class {
4174
4260
  }
4175
4261
  };
4176
4262
  var testSpace = async (create, check = create) => {
4177
- const objectId = import_keys10.PublicKey.random().toHex();
4263
+ const objectId = import_keys12.PublicKey.random().toHex();
4178
4264
  const result = create.mutate((0, import_echo_db.genesisMutation)(objectId, import_document_model.DocumentModel.meta.type));
4179
4265
  await result.batch.getReceipt();
4180
4266
  (0, import_node_assert14.default)(create._itemManager.entities.has(result.objectsUpdated[0].id));