@dxos/client-services 0.3.2-main.de57e73 → 0.3.2-main.ec06501

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.
@@ -460,9 +460,11 @@ import { DeviceStateMachine, createCredentialSignerWithKey, createCredentialSign
460
460
  import { failUndefined } from "@dxos/debug";
461
461
  import { writeMessages } from "@dxos/feed-store";
462
462
  import { invariant } from "@dxos/invariant";
463
+ import { PublicKey as PublicKey3 } from "@dxos/keys";
463
464
  import { log as log2 } from "@dxos/log";
464
465
  import { AdmittedFeed } from "@dxos/protocols/proto/dxos/halo/credentials";
465
466
  import { trace } from "@dxos/tracing";
467
+ import { ComplexSet } from "@dxos/util";
466
468
  function _ts_decorate(decorators, target, key, desc) {
467
469
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
468
470
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
@@ -481,6 +483,14 @@ var Identity = class Identity2 {
481
483
  this._signer = signer;
482
484
  this.identityKey = identityKey;
483
485
  this.deviceKey = deviceKey;
486
+ log2.trace("dxos.halo.device", {
487
+ deviceKey
488
+ }, {
489
+ F: __dxlog_file2,
490
+ L: 60,
491
+ S: this,
492
+ C: (f, a) => f(...a)
493
+ });
484
494
  this._deviceStateMachine = new DeviceStateMachine({
485
495
  identityKey: this.identityKey,
486
496
  deviceKey: this.deviceKey,
@@ -491,7 +501,7 @@ var Identity = class Identity2 {
491
501
  onUpdate: () => this.stateUpdate.emit()
492
502
  });
493
503
  this.authVerifier = new TrustedKeySetAuthVerifier({
494
- trustedKeysProvider: () => this.authorizedDeviceKeys,
504
+ trustedKeysProvider: () => new ComplexSet(PublicKey3.hash, this.authorizedDeviceKeys.keys()),
495
505
  update: this.stateUpdate,
496
506
  authTimeout: AUTH_TIMEOUT
497
507
  });
@@ -549,7 +559,7 @@ var Identity = class Identity2 {
549
559
  getIdentityCredentialSigner() {
550
560
  invariant(this._deviceStateMachine.deviceCredentialChain, "Device credential chain is not ready.", {
551
561
  F: __dxlog_file2,
552
- L: 139,
562
+ L: 141,
553
563
  S: this,
554
564
  A: [
555
565
  "this._deviceStateMachine.deviceCredentialChain",
@@ -573,7 +583,7 @@ var Identity = class Identity2 {
573
583
  dataFeedKey
574
584
  }, {
575
585
  F: __dxlog_file2,
576
- L: 155,
586
+ L: 157,
577
587
  S: this,
578
588
  C: (f, a) => f(...a)
579
589
  });
@@ -625,11 +635,12 @@ Identity = _ts_decorate([
625
635
  ], Identity);
626
636
 
627
637
  // packages/sdk/client-services/src/packlets/identity/identity-manager.ts
638
+ import platform from "platform";
628
639
  import { Event as Event2 } from "@dxos/async";
629
640
  import { Context as Context3 } from "@dxos/context";
630
641
  import { createCredentialSignerWithKey as createCredentialSignerWithKey2, CredentialGenerator } from "@dxos/credentials";
631
642
  import { invariant as invariant2 } from "@dxos/invariant";
632
- import { PublicKey as PublicKey3 } from "@dxos/keys";
643
+ import { PublicKey as PublicKey4 } from "@dxos/keys";
633
644
  import { log as log3 } from "@dxos/log";
634
645
  import { trace as trace2 } from "@dxos/protocols";
635
646
  import { AdmittedFeed as AdmittedFeed2 } from "@dxos/protocols/proto/dxos/halo/credentials";
@@ -661,12 +672,12 @@ var IdentityManager = class IdentityManager2 {
661
672
  return this._identity;
662
673
  }
663
674
  async open(ctx) {
664
- const traceId = PublicKey3.random().toHex();
675
+ const traceId = PublicKey4.random().toHex();
665
676
  log3.trace("dxos.halo.identity-manager.open", trace2.begin({
666
677
  id: traceId
667
678
  }), {
668
679
  F: __dxlog_file3,
669
- L: 73,
680
+ L: 75,
670
681
  S: this,
671
682
  C: (f, a) => f(...a)
672
683
  });
@@ -675,7 +686,7 @@ var IdentityManager = class IdentityManager2 {
675
686
  identityRecord
676
687
  }, {
677
688
  F: __dxlog_file3,
678
- L: 76,
689
+ L: 78,
679
690
  S: this,
680
691
  C: (f, a) => f(...a)
681
692
  });
@@ -688,7 +699,7 @@ var IdentityManager = class IdentityManager2 {
688
699
  displayName: this._identity.profileDocument?.displayName
689
700
  }, {
690
701
  F: __dxlog_file3,
691
- L: 81,
702
+ L: 83,
692
703
  S: this,
693
704
  C: (f, a) => f(...a)
694
705
  });
@@ -698,7 +709,7 @@ var IdentityManager = class IdentityManager2 {
698
709
  id: traceId
699
710
  }), {
700
711
  F: __dxlog_file3,
701
- L: 87,
712
+ L: 89,
702
713
  S: this,
703
714
  C: (f, a) => f(...a)
704
715
  });
@@ -709,7 +720,7 @@ var IdentityManager = class IdentityManager2 {
709
720
  async createIdentity({ displayName } = {}) {
710
721
  invariant2(!this._identity, "Identity already exists.", {
711
722
  F: __dxlog_file3,
712
- L: 95,
723
+ L: 97,
713
724
  S: this,
714
725
  A: [
715
726
  "!this._identity",
@@ -718,7 +729,7 @@ var IdentityManager = class IdentityManager2 {
718
729
  });
719
730
  log3("creating identity...", void 0, {
720
731
  F: __dxlog_file3,
721
- L: 96,
732
+ L: 98,
722
733
  S: this,
723
734
  C: (f, a) => f(...a)
724
735
  });
@@ -739,7 +750,7 @@ var IdentityManager = class IdentityManager2 {
739
750
  const generator = new CredentialGenerator(this._keyring, identityRecord.identityKey, identityRecord.deviceKey);
740
751
  invariant2(identityRecord.haloSpace.genesisFeedKey, "Genesis feed key is required.", {
741
752
  F: __dxlog_file3,
742
- L: 115,
753
+ L: 117,
743
754
  S: this,
744
755
  A: [
745
756
  "identityRecord.haloSpace.genesisFeedKey",
@@ -748,7 +759,7 @@ var IdentityManager = class IdentityManager2 {
748
759
  });
749
760
  invariant2(identityRecord.haloSpace.dataFeedKey, "Data feed key is required.", {
750
761
  F: __dxlog_file3,
751
- L: 116,
762
+ L: 118,
752
763
  S: this,
753
764
  A: [
754
765
  "identityRecord.haloSpace.dataFeedKey",
@@ -767,6 +778,13 @@ var IdentityManager = class IdentityManager2 {
767
778
  }));
768
779
  }
769
780
  credentials.push(await generator.createDeviceAuthorization(identityRecord.deviceKey));
781
+ credentials.push(await generator.createDeviceProfile({
782
+ platform: platform.name,
783
+ platformVersion: platform.version,
784
+ architecture: typeof platform.os?.architecture === "number" ? String(platform.os.architecture) : void 0,
785
+ os: platform.os?.family,
786
+ osVersion: platform.os?.version
787
+ }));
770
788
  for (const credential of credentials) {
771
789
  await identity.controlPipeline.writer.write({
772
790
  credential: {
@@ -783,7 +801,7 @@ var IdentityManager = class IdentityManager2 {
783
801
  displayName: this._identity.profileDocument?.displayName
784
802
  }, {
785
803
  F: __dxlog_file3,
786
- L: 151,
804
+ L: 163,
787
805
  S: this,
788
806
  C: (f, a) => f(...a)
789
807
  });
@@ -793,7 +811,7 @@ var IdentityManager = class IdentityManager2 {
793
811
  deviceKey: identity.deviceKey
794
812
  }, {
795
813
  F: __dxlog_file3,
796
- L: 157,
814
+ L: 169,
797
815
  S: this,
798
816
  C: (f, a) => f(...a)
799
817
  });
@@ -807,13 +825,13 @@ var IdentityManager = class IdentityManager2 {
807
825
  params
808
826
  }, {
809
827
  F: __dxlog_file3,
810
- L: 165,
828
+ L: 177,
811
829
  S: this,
812
830
  C: (f, a) => f(...a)
813
831
  });
814
832
  invariant2(!this._identity, "Identity already exists.", {
815
833
  F: __dxlog_file3,
816
- L: 166,
834
+ L: 178,
817
835
  S: this,
818
836
  A: [
819
837
  "!this._identity",
@@ -841,7 +859,7 @@ var IdentityManager = class IdentityManager2 {
841
859
  displayName: this._identity.profileDocument?.displayName
842
860
  }, {
843
861
  F: __dxlog_file3,
844
- L: 185,
862
+ L: 197,
845
863
  S: this,
846
864
  C: (f, a) => f(...a)
847
865
  });
@@ -851,7 +869,7 @@ var IdentityManager = class IdentityManager2 {
851
869
  deviceKey: identity.deviceKey
852
870
  }, {
853
871
  F: __dxlog_file3,
854
- L: 191,
872
+ L: 203,
855
873
  S: this,
856
874
  C: (f, a) => f(...a)
857
875
  });
@@ -863,7 +881,7 @@ var IdentityManager = class IdentityManager2 {
863
881
  async updateProfile(profile) {
864
882
  invariant2(this._identity, "Identity not initialized.", {
865
883
  F: __dxlog_file3,
866
- L: 199,
884
+ L: 211,
867
885
  S: this,
868
886
  A: [
869
887
  "this._identity",
@@ -894,7 +912,7 @@ var IdentityManager = class IdentityManager2 {
894
912
  async _constructIdentity(identityRecord) {
895
913
  invariant2(!this._identity, void 0, {
896
914
  F: __dxlog_file3,
897
- L: 216,
915
+ L: 228,
898
916
  S: this,
899
917
  A: [
900
918
  "!this._identity",
@@ -905,13 +923,13 @@ var IdentityManager = class IdentityManager2 {
905
923
  identityRecord
906
924
  }, {
907
925
  F: __dxlog_file3,
908
- L: 217,
926
+ L: 229,
909
927
  S: this,
910
928
  C: (f, a) => f(...a)
911
929
  });
912
930
  invariant2(identityRecord.haloSpace.controlFeedKey, void 0, {
913
931
  F: __dxlog_file3,
914
- L: 220,
932
+ L: 232,
915
933
  S: this,
916
934
  A: [
917
935
  "identityRecord.haloSpace.controlFeedKey",
@@ -923,7 +941,7 @@ var IdentityManager = class IdentityManager2 {
923
941
  });
924
942
  invariant2(identityRecord.haloSpace.dataFeedKey, void 0, {
925
943
  F: __dxlog_file3,
926
- L: 224,
944
+ L: 236,
927
945
  S: this,
928
946
  A: [
929
947
  "identityRecord.haloSpace.dataFeedKey",
@@ -955,7 +973,7 @@ var IdentityManager = class IdentityManager2 {
955
973
  identityKey: identityRecord.identityKey
956
974
  }, {
957
975
  F: __dxlog_file3,
958
- L: 248,
976
+ L: 260,
959
977
  S: this,
960
978
  C: (f, a) => f(...a)
961
979
  });
@@ -976,7 +994,7 @@ var IdentityManager = class IdentityManager2 {
976
994
  onAuthFailure: () => {
977
995
  log3.warn("auth failure", void 0, {
978
996
  F: __dxlog_file3,
979
- L: 267,
997
+ L: 279,
980
998
  S: this,
981
999
  C: (f, a) => f(...a)
982
1000
  });
@@ -1161,7 +1179,7 @@ import { AuthenticatingInvitation, AUTHENTICATION_CODE_LENGTH, CancellableInvita
1161
1179
  import { Context as Context5 } from "@dxos/context";
1162
1180
  import { generatePasscode } from "@dxos/credentials";
1163
1181
  import { invariant as invariant6 } from "@dxos/invariant";
1164
- import { PublicKey as PublicKey5 } from "@dxos/keys";
1182
+ import { PublicKey as PublicKey6 } from "@dxos/keys";
1165
1183
  import { log as log5 } from "@dxos/log";
1166
1184
  import { createTeleportProtocolFactory, StarTopology } from "@dxos/network-manager";
1167
1185
  import { InvalidInvitationExtensionRoleError as InvalidInvitationExtensionRoleError2, trace as trace4 } from "@dxos/protocols";
@@ -1172,7 +1190,7 @@ import { AuthenticationResponse as AuthenticationResponse2 } from "@dxos/protoco
1172
1190
  import { Trigger as Trigger2 } from "@dxos/async";
1173
1191
  import { cancelWithContext, Context as Context4 } from "@dxos/context";
1174
1192
  import { invariant as invariant5 } from "@dxos/invariant";
1175
- import { PublicKey as PublicKey4 } from "@dxos/keys";
1193
+ import { PublicKey as PublicKey5 } from "@dxos/keys";
1176
1194
  import { log as log4 } from "@dxos/log";
1177
1195
  import { InvalidInvitationExtensionRoleError, schema as schema2, trace as trace3 } from "@dxos/protocols";
1178
1196
  import { Invitation as Invitation2 } from "@dxos/protocols/proto/dxos/client/services";
@@ -1220,7 +1238,7 @@ var InvitationHostExtension = class extends RpcExtension {
1220
1238
  },
1221
1239
  introduce: async (request) => {
1222
1240
  const { profile, invitationId } = request;
1223
- const traceId = PublicKey4.random().toHex();
1241
+ const traceId = PublicKey5.random().toHex();
1224
1242
  log4.trace("dxos.sdk.invitation-handler.host.introduce", trace3.begin({
1225
1243
  id: traceId
1226
1244
  }), {
@@ -1272,7 +1290,7 @@ var InvitationHostExtension = class extends RpcExtension {
1272
1290
  };
1273
1291
  },
1274
1292
  authenticate: async ({ authCode: code }) => {
1275
- const traceId = PublicKey4.random().toHex();
1293
+ const traceId = PublicKey5.random().toHex();
1276
1294
  log4.trace("dxos.sdk.invitation-handler.host.authenticate", trace3.begin({
1277
1295
  id: traceId
1278
1296
  }), {
@@ -1352,7 +1370,7 @@ var InvitationHostExtension = class extends RpcExtension {
1352
1370
  };
1353
1371
  },
1354
1372
  admit: async (request) => {
1355
- const traceId = PublicKey4.random().toHex();
1373
+ const traceId = PublicKey5.random().toHex();
1356
1374
  log4.trace("dxos.sdk.invitation-handler.host.admit", trace3.begin({
1357
1375
  id: traceId
1358
1376
  }), {
@@ -1518,7 +1536,7 @@ var InvitationsHandler = class {
1518
1536
  this._networkManager = _networkManager;
1519
1537
  }
1520
1538
  createInvitation(protocol, options) {
1521
- const { invitationId = PublicKey5.random().toHex(), type = Invitation3.Type.INTERACTIVE, authMethod = Invitation3.AuthMethod.SHARED_SECRET, state = Invitation3.State.INIT, timeout = INVITATION_TIMEOUT, swarmKey = PublicKey5.random() } = options ?? {};
1539
+ const { invitationId = PublicKey6.random().toHex(), type = Invitation3.Type.INTERACTIVE, authMethod = Invitation3.AuthMethod.SHARED_SECRET, state = Invitation3.State.INIT, timeout = INVITATION_TIMEOUT, swarmKey = PublicKey6.random() } = options ?? {};
1522
1540
  const authCode = options?.authCode ?? (authMethod === Invitation3.AuthMethod.SHARED_SECRET ? generatePasscode(AUTHENTICATION_CODE_LENGTH) : void 0);
1523
1541
  invariant6(protocol, void 0, {
1524
1542
  F: __dxlog_file7,
@@ -1593,7 +1611,7 @@ var InvitationsHandler = class {
1593
1611
  },
1594
1612
  onOpen: () => {
1595
1613
  scheduleTask2(ctx, async () => {
1596
- const traceId = PublicKey5.random().toHex();
1614
+ const traceId = PublicKey6.random().toHex();
1597
1615
  try {
1598
1616
  log5.trace("dxos.sdk.invitations-handler.host.onOpen", trace4.begin({
1599
1617
  id: traceId
@@ -1826,7 +1844,7 @@ var InvitationsHandler = class {
1826
1844
  }
1827
1845
  });
1828
1846
  scheduleTask2(ctx, async () => {
1829
- const traceId = PublicKey5.random().toHex();
1847
+ const traceId = PublicKey6.random().toHex();
1830
1848
  try {
1831
1849
  log5.trace("dxos.sdk.invitations-handler.guest.onOpen", trace4.begin({
1832
1850
  id: traceId
@@ -2033,7 +2051,7 @@ var InvitationsHandler = class {
2033
2051
  const topic = invitation.swarmKey;
2034
2052
  const swarmConnection = await this._networkManager.joinSwarm({
2035
2053
  topic,
2036
- peerId: PublicKey5.random(),
2054
+ peerId: PublicKey6.random(),
2037
2055
  protocolProvider: createTeleportProtocolFactory(async (teleport) => {
2038
2056
  teleport.addExtension("dxos.halo.invitations", createExtension());
2039
2057
  }),
@@ -2190,15 +2208,6 @@ var InvitationsServiceImpl = class {
2190
2208
  await accepted.cancel();
2191
2209
  this._acceptInvitations.delete(invitationId);
2192
2210
  this._removedAccepted.emit(accepted.get());
2193
- } else {
2194
- log6.warn("invalid invitation", {
2195
- invitationId
2196
- }, {
2197
- F: __dxlog_file8,
2198
- L: 132,
2199
- S: this,
2200
- C: (f, a) => f(...a)
2201
- });
2202
2211
  }
2203
2212
  }
2204
2213
  queryInvitations() {
@@ -2486,10 +2495,10 @@ var getPlatform = () => {
2486
2495
  };
2487
2496
  }
2488
2497
  } else {
2489
- const { platform, version, arch } = process;
2498
+ const { platform: platform2, version, arch } = process;
2490
2499
  return {
2491
2500
  type: "node",
2492
- platform: `${platform} ${version} ${arch}`,
2501
+ platform: `${platform2} ${version} ${arch}`,
2493
2502
  runtime: process.version,
2494
2503
  uptime: Math.floor(process.uptime()),
2495
2504
  memory: process.memoryUsage()
@@ -2498,7 +2507,7 @@ var getPlatform = () => {
2498
2507
  };
2499
2508
 
2500
2509
  // packages/sdk/client-services/src/version.ts
2501
- var DXOS_VERSION = "0.3.2-main.de57e73";
2510
+ var DXOS_VERSION = "0.3.2-main.ec06501";
2502
2511
 
2503
2512
  // packages/sdk/client-services/src/packlets/services/diagnostics.ts
2504
2513
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
@@ -2624,24 +2633,24 @@ import { AUTH_TIMEOUT as AUTH_TIMEOUT2 } from "@dxos/client-protocol";
2624
2633
  import { cancelWithContext as cancelWithContext2, Context as Context7 } from "@dxos/context";
2625
2634
  import { timed } from "@dxos/debug";
2626
2635
  import { createMappedFeedWriter } from "@dxos/echo-pipeline";
2627
- import { PublicKey as PublicKey7 } from "@dxos/keys";
2636
+ import { PublicKey as PublicKey8 } from "@dxos/keys";
2628
2637
  import { log as log10 } from "@dxos/log";
2629
2638
  import { CancelledError, SystemError } from "@dxos/protocols";
2630
2639
  import { SpaceState } from "@dxos/protocols/proto/dxos/client/services";
2631
2640
  import { AdmittedFeed as AdmittedFeed3 } from "@dxos/protocols/proto/dxos/halo/credentials";
2632
2641
  import { Timeframe as Timeframe2 } from "@dxos/timeframe";
2633
2642
  import { trace as trace5 } from "@dxos/tracing";
2634
- import { ComplexSet as ComplexSet2 } from "@dxos/util";
2643
+ import { ComplexSet as ComplexSet3 } from "@dxos/util";
2635
2644
 
2636
2645
  // packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts
2637
2646
  import { DeferredTask, Event as Event4, scheduleTask as scheduleTask3, sleep, TimeoutError as TimeoutError2, Trigger as Trigger4 } from "@dxos/async";
2638
2647
  import { Context as Context6, rejectOnDispose } from "@dxos/context";
2639
2648
  import { invariant as invariant10 } from "@dxos/invariant";
2640
- import { PublicKey as PublicKey6 } from "@dxos/keys";
2649
+ import { PublicKey as PublicKey7 } from "@dxos/keys";
2641
2650
  import { log as log9 } from "@dxos/log";
2642
2651
  import { schema as schema3 } from "@dxos/protocols";
2643
2652
  import { RpcExtension as RpcExtension2 } from "@dxos/teleport";
2644
- import { ComplexMap as ComplexMap2, ComplexSet, entry } from "@dxos/util";
2653
+ import { ComplexMap as ComplexMap2, ComplexSet as ComplexSet2, entry } from "@dxos/util";
2645
2654
  var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/spaces/notarization-plugin.ts";
2646
2655
  var DEFAULT_RETRY_TIMEOUT = 1e3;
2647
2656
  var DEFAULT_SUCCESS_DELAY = 1e3;
@@ -2652,8 +2661,8 @@ var NotarizationPlugin = class {
2652
2661
  this._ctx = new Context6();
2653
2662
  this._extensionOpened = new Event4();
2654
2663
  this._extensions = /* @__PURE__ */ new Set();
2655
- this._processedCredentials = new ComplexSet(PublicKey6.hash);
2656
- this._processCredentialsTriggers = new ComplexMap2(PublicKey6.hash);
2664
+ this._processedCredentials = new ComplexSet2(PublicKey7.hash);
2665
+ this._processCredentialsTriggers = new ComplexMap2(PublicKey7.hash);
2657
2666
  }
2658
2667
  get hasWriter() {
2659
2668
  return !!this._writer;
@@ -2935,7 +2944,7 @@ var DataSpace = class DataSpace2 {
2935
2944
  this._signingContext = params.signingContext;
2936
2945
  this._callbacks = params.callbacks ?? {};
2937
2946
  this.authVerifier = new TrustedKeySetAuthVerifier({
2938
- trustedKeysProvider: () => new ComplexSet2(PublicKey7.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
2947
+ trustedKeysProvider: () => new ComplexSet3(PublicKey8.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
2939
2948
  update: this._inner.stateUpdate,
2940
2949
  authTimeout: AUTH_TIMEOUT2
2941
2950
  });
@@ -3268,7 +3277,7 @@ import { Event as Event6, synchronized as synchronized2, trackLeaks as trackLeak
3268
3277
  import { cancelWithContext as cancelWithContext3, Context as Context8 } from "@dxos/context";
3269
3278
  import { getCredentialAssertion as getCredentialAssertion2 } from "@dxos/credentials";
3270
3279
  import { invariant as invariant11 } from "@dxos/invariant";
3271
- import { PublicKey as PublicKey8 } from "@dxos/keys";
3280
+ import { PublicKey as PublicKey9 } from "@dxos/keys";
3272
3281
  import { log as log11 } from "@dxos/log";
3273
3282
  import { trace as trace6 } from "@dxos/protocols";
3274
3283
  import { SpaceState as SpaceState2 } from "@dxos/protocols/proto/dxos/client/services";
@@ -3366,9 +3375,9 @@ var DataSpaceManager = class DataSpaceManager2 {
3366
3375
  this._feedStore = _feedStore;
3367
3376
  this._ctx = new Context8();
3368
3377
  this.updated = new Event6();
3369
- this._spaces = new ComplexMap3(PublicKey8.hash);
3378
+ this._spaces = new ComplexMap3(PublicKey9.hash);
3370
3379
  this._isOpen = false;
3371
- this._instanceId = PublicKey8.random().toHex();
3380
+ this._instanceId = PublicKey9.random().toHex();
3372
3381
  }
3373
3382
  // TODO(burdon): Remove.
3374
3383
  get spaces() {
@@ -3907,7 +3916,7 @@ import { valueEncoding, MetadataStore, SpaceManager, DataServiceSubscriptions, S
3907
3916
  import { FeedFactory, FeedStore } from "@dxos/feed-store";
3908
3917
  import { invariant as invariant13 } from "@dxos/invariant";
3909
3918
  import { Keyring } from "@dxos/keyring";
3910
- import { PublicKey as PublicKey9 } from "@dxos/keys";
3919
+ import { PublicKey as PublicKey10 } from "@dxos/keys";
3911
3920
  import { log as log13 } from "@dxos/log";
3912
3921
  import { InvalidStorageVersionError, STORAGE_VERSION as STORAGE_VERSION2, trace as trace7 } from "@dxos/protocols";
3913
3922
  import { Invitation as Invitation6 } from "@dxos/protocols/proto/dxos/client/services";
@@ -3934,7 +3943,7 @@ var ServiceContext = class ServiceContext2 {
3934
3943
  this.initialized = new Trigger5();
3935
3944
  this.dataServiceSubscriptions = new DataServiceSubscriptions();
3936
3945
  this._handlerFactories = /* @__PURE__ */ new Map();
3937
- this._instanceId = PublicKey9.random().toHex();
3946
+ this._instanceId = PublicKey10.random().toHex();
3938
3947
  this.metadataStore = new MetadataStore(storage.createDirectory("metadata"));
3939
3948
  this.snapshotStore = new SnapshotStore(storage.createDirectory("snapshots"));
3940
3949
  this.blobStore = new BlobStore(storage.createDirectory("blobs"));
@@ -4364,7 +4373,7 @@ import { DocumentModel as DocumentModel2 } from "@dxos/document-model";
4364
4373
  import { DataServiceImpl } from "@dxos/echo-pipeline";
4365
4374
  import { base } from "@dxos/echo-schema";
4366
4375
  import { invariant as invariant14 } from "@dxos/invariant";
4367
- import { PublicKey as PublicKey10 } from "@dxos/keys";
4376
+ import { PublicKey as PublicKey11 } from "@dxos/keys";
4368
4377
  import { log as log16 } from "@dxos/log";
4369
4378
  import { WebsocketSignalManager } from "@dxos/messaging";
4370
4379
  import { ModelFactory } from "@dxos/model-factory";
@@ -4383,7 +4392,7 @@ var DevicesServiceImpl = class {
4383
4392
  constructor(_identityManager) {
4384
4393
  this._identityManager = _identityManager;
4385
4394
  }
4386
- updateDevice(request) {
4395
+ async updateDevice(profile) {
4387
4396
  throw new Error("Method not implemented.");
4388
4397
  }
4389
4398
  queryDevices() {
@@ -4396,9 +4405,10 @@ var DevicesServiceImpl = class {
4396
4405
  });
4397
4406
  } else {
4398
4407
  next({
4399
- devices: Array.from(deviceKeys.values()).map((key) => ({
4408
+ devices: Array.from(deviceKeys.entries()).map(([key, profile]) => ({
4400
4409
  deviceKey: key,
4401
- kind: this._identityManager.identity?.deviceKey.equals(key) ? DeviceKind.CURRENT : DeviceKind.TRUSTED
4410
+ kind: this._identityManager.identity?.deviceKey.equals(key) ? DeviceKind.CURRENT : DeviceKind.TRUSTED,
4411
+ profile
4402
4412
  }))
4403
4413
  });
4404
4414
  }
@@ -4791,7 +4801,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4791
4801
  if (this._open) {
4792
4802
  return;
4793
4803
  }
4794
- const traceId = PublicKey10.random().toHex();
4804
+ const traceId = PublicKey11.random().toHex();
4795
4805
  log16.trace("dxos.client-services.host.open", trace8.begin({
4796
4806
  id: traceId
4797
4807
  }), {
@@ -4931,7 +4941,7 @@ var ClientServicesHost = class ClientServicesHost2 {
4931
4941
  });
4932
4942
  }
4933
4943
  async reset() {
4934
- const traceId = PublicKey10.random().toHex();
4944
+ const traceId = PublicKey11.random().toHex();
4935
4945
  log16.trace("dxos.sdk.client-services-host.reset", trace8.begin({
4936
4946
  id: traceId
4937
4947
  }), {
@@ -5035,4 +5045,4 @@ export {
5035
5045
  createDefaultModelFactory,
5036
5046
  ClientServicesHost
5037
5047
  };
5038
- //# sourceMappingURL=chunk-XEZCTVLQ.mjs.map
5048
+ //# sourceMappingURL=chunk-KLSDV4XQ.mjs.map