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

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 (154) hide show
  1. package/dist/lib/browser/{chunk-XEZCTVLQ.mjs → chunk-HQ4UBZ3F.mjs} +122 -112
  2. package/dist/lib/browser/chunk-HQ4UBZ3F.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +2 -2
  4. package/dist/lib/browser/index.mjs.map +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/packlets/testing/index.mjs +1 -1
  7. package/dist/lib/browser/packlets/testing/index.mjs.map +2 -2
  8. package/dist/lib/node/index.cjs +158 -138
  9. package/dist/lib/node/index.cjs.map +3 -3
  10. package/dist/lib/node/meta.json +1 -1
  11. package/dist/lib/node/packlets/testing/index.cjs +155 -135
  12. package/dist/lib/node/packlets/testing/index.cjs.map +3 -3
  13. package/dist/types/src/packlets/devices/devices-service.d.ts +4 -4
  14. package/dist/types/src/packlets/devices/devices-service.d.ts.map +1 -1
  15. package/dist/types/src/packlets/devtools/devtools.d.ts +4 -4
  16. package/dist/types/src/packlets/devtools/devtools.d.ts.map +1 -1
  17. package/dist/types/src/packlets/devtools/feeds.d.ts +3 -3
  18. package/dist/types/src/packlets/devtools/feeds.d.ts.map +1 -1
  19. package/dist/types/src/packlets/devtools/keys.d.ts +2 -2
  20. package/dist/types/src/packlets/devtools/keys.d.ts.map +1 -1
  21. package/dist/types/src/packlets/devtools/metadata.d.ts +2 -2
  22. package/dist/types/src/packlets/devtools/metadata.d.ts.map +1 -1
  23. package/dist/types/src/packlets/devtools/network.d.ts +3 -3
  24. package/dist/types/src/packlets/devtools/network.d.ts.map +1 -1
  25. package/dist/types/src/packlets/devtools/spaces.d.ts +2 -2
  26. package/dist/types/src/packlets/devtools/spaces.d.ts.map +1 -1
  27. package/dist/types/src/packlets/identity/authenticator.d.ts +5 -5
  28. package/dist/types/src/packlets/identity/authenticator.d.ts.map +1 -1
  29. package/dist/types/src/packlets/identity/identity-manager.d.ts +5 -5
  30. package/dist/types/src/packlets/identity/identity-manager.d.ts.map +1 -1
  31. package/dist/types/src/packlets/identity/identity-service.d.ts +4 -4
  32. package/dist/types/src/packlets/identity/identity-service.d.ts.map +1 -1
  33. package/dist/types/src/packlets/identity/identity.d.ts +8 -8
  34. package/dist/types/src/packlets/identity/identity.d.ts.map +1 -1
  35. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts +4 -4
  36. package/dist/types/src/packlets/invitations/device-invitation-protocol.d.ts.map +1 -1
  37. package/dist/types/src/packlets/invitations/invitation-extension.d.ts +3 -3
  38. package/dist/types/src/packlets/invitations/invitation-extension.d.ts.map +1 -1
  39. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts +3 -3
  40. package/dist/types/src/packlets/invitations/invitation-protocol.d.ts.map +1 -1
  41. package/dist/types/src/packlets/invitations/invitations-handler.d.ts +1 -1
  42. package/dist/types/src/packlets/invitations/invitations-handler.d.ts.map +1 -1
  43. package/dist/types/src/packlets/invitations/invitations-service.d.ts +3 -3
  44. package/dist/types/src/packlets/invitations/invitations-service.d.ts.map +1 -1
  45. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts +6 -6
  46. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  47. package/dist/types/src/packlets/locks/browser.d.ts +1 -1
  48. package/dist/types/src/packlets/locks/browser.d.ts.map +1 -1
  49. package/dist/types/src/packlets/locks/node.d.ts +1 -1
  50. package/dist/types/src/packlets/locks/node.d.ts.map +1 -1
  51. package/dist/types/src/packlets/locks/resource-lock.d.ts +1 -1
  52. package/dist/types/src/packlets/locks/resource-lock.d.ts.map +1 -1
  53. package/dist/types/src/packlets/logging/logging-service.d.ts +1 -1
  54. package/dist/types/src/packlets/logging/logging-service.d.ts.map +1 -1
  55. package/dist/types/src/packlets/network/network-service.d.ts +3 -3
  56. package/dist/types/src/packlets/network/network-service.d.ts.map +1 -1
  57. package/dist/types/src/packlets/services/client-rpc-server.d.ts +5 -5
  58. package/dist/types/src/packlets/services/client-rpc-server.d.ts.map +1 -1
  59. package/dist/types/src/packlets/services/diagnostics.d.ts +8 -8
  60. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  61. package/dist/types/src/packlets/services/service-context.d.ts +6 -6
  62. package/dist/types/src/packlets/services/service-context.d.ts.map +1 -1
  63. package/dist/types/src/packlets/services/service-host.d.ts +5 -5
  64. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  65. package/dist/types/src/packlets/services/service-registry.d.ts +1 -1
  66. package/dist/types/src/packlets/services/service-registry.d.ts.map +1 -1
  67. package/dist/types/src/packlets/spaces/data-space-manager.d.ts +7 -7
  68. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  69. package/dist/types/src/packlets/spaces/data-space.d.ts +9 -9
  70. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  71. package/dist/types/src/packlets/spaces/genesis.d.ts +3 -3
  72. package/dist/types/src/packlets/spaces/genesis.d.ts.map +1 -1
  73. package/dist/types/src/packlets/spaces/notarization-plugin.d.ts +5 -5
  74. package/dist/types/src/packlets/spaces/notarization-plugin.d.ts.map +1 -1
  75. package/dist/types/src/packlets/spaces/spaces-service.d.ts +7 -7
  76. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  77. package/dist/types/src/packlets/system/system-service.d.ts +5 -5
  78. package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
  79. package/dist/types/src/packlets/testing/credential-utils.d.ts +2 -2
  80. package/dist/types/src/packlets/testing/credential-utils.d.ts.map +1 -1
  81. package/dist/types/src/packlets/testing/invitation-utils.d.ts +1 -1
  82. package/dist/types/src/packlets/testing/invitation-utils.d.ts.map +1 -1
  83. package/dist/types/src/packlets/testing/test-builder.d.ts +4 -4
  84. package/dist/types/src/packlets/testing/test-builder.d.ts.map +1 -1
  85. package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts +4 -4
  86. package/dist/types/src/packlets/vault/iframe-host-runtime.d.ts.map +1 -1
  87. package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts +4 -4
  88. package/dist/types/src/packlets/vault/iframe-proxy-runtime.d.ts.map +1 -1
  89. package/dist/types/src/packlets/vault/shell-runtime.d.ts +4 -4
  90. package/dist/types/src/packlets/vault/shell-runtime.d.ts.map +1 -1
  91. package/dist/types/src/packlets/vault/worker-runtime.d.ts +3 -3
  92. package/dist/types/src/packlets/vault/worker-runtime.d.ts.map +1 -1
  93. package/dist/types/src/packlets/vault/worker-session.d.ts +3 -3
  94. package/dist/types/src/packlets/vault/worker-session.d.ts.map +1 -1
  95. package/dist/types/src/version.d.ts +1 -1
  96. package/package.json +37 -35
  97. package/src/packlets/devices/devices-service.test.ts +2 -2
  98. package/src/packlets/devices/devices-service.ts +11 -5
  99. package/src/packlets/devtools/devtools.ts +35 -35
  100. package/src/packlets/devtools/feeds.ts +6 -6
  101. package/src/packlets/devtools/keys.ts +2 -2
  102. package/src/packlets/devtools/metadata.ts +2 -2
  103. package/src/packlets/devtools/network.ts +8 -8
  104. package/src/packlets/devtools/spaces.ts +8 -5
  105. package/src/packlets/identity/authenticator.ts +5 -5
  106. package/src/packlets/identity/identity-manager.test.ts +13 -1
  107. package/src/packlets/identity/identity-manager.ts +18 -6
  108. package/src/packlets/identity/identity-service.test.ts +2 -2
  109. package/src/packlets/identity/identity-service.ts +8 -8
  110. package/src/packlets/identity/identity.test.ts +4 -4
  111. package/src/packlets/identity/identity.ts +16 -10
  112. package/src/packlets/invitations/device-invitation-protocol.test.ts +1 -1
  113. package/src/packlets/invitations/device-invitation-protocol.ts +8 -4
  114. package/src/packlets/invitations/invitation-extension.ts +6 -6
  115. package/src/packlets/invitations/invitation-protocol.ts +7 -3
  116. package/src/packlets/invitations/invitations-handler.ts +7 -2
  117. package/src/packlets/invitations/invitations-service.ts +5 -7
  118. package/src/packlets/invitations/space-invitation-protocol.test.ts +1 -1
  119. package/src/packlets/invitations/space-invitation-protocol.ts +12 -8
  120. package/src/packlets/locks/browser.ts +1 -1
  121. package/src/packlets/locks/node.ts +2 -2
  122. package/src/packlets/locks/resource-lock.ts +1 -1
  123. package/src/packlets/logging/logging-service.ts +14 -8
  124. package/src/packlets/logging/logging.test.ts +1 -1
  125. package/src/packlets/network/network-service.test.ts +2 -2
  126. package/src/packlets/network/network-service.ts +7 -3
  127. package/src/packlets/services/client-rpc-server.ts +5 -5
  128. package/src/packlets/services/diagnostics.ts +13 -13
  129. package/src/packlets/services/service-context.test.ts +2 -2
  130. package/src/packlets/services/service-context.ts +9 -9
  131. package/src/packlets/services/service-host.test.ts +3 -3
  132. package/src/packlets/services/service-host.ts +9 -9
  133. package/src/packlets/services/service-registry.test.ts +2 -2
  134. package/src/packlets/services/service-registry.ts +1 -1
  135. package/src/packlets/spaces/data-space-manager.test.ts +4 -4
  136. package/src/packlets/spaces/data-space-manager.ts +8 -8
  137. package/src/packlets/spaces/data-space.ts +10 -10
  138. package/src/packlets/spaces/genesis.ts +3 -3
  139. package/src/packlets/spaces/notarization-plugin.test.ts +2 -2
  140. package/src/packlets/spaces/notarization-plugin.ts +5 -5
  141. package/src/packlets/spaces/spaces-service.test.ts +2 -2
  142. package/src/packlets/spaces/spaces-service.ts +17 -17
  143. package/src/packlets/system/system-service.test.ts +1 -1
  144. package/src/packlets/system/system-service.ts +9 -9
  145. package/src/packlets/testing/credential-utils.ts +2 -2
  146. package/src/packlets/testing/invitation-utils.ts +1 -1
  147. package/src/packlets/testing/test-builder.ts +4 -4
  148. package/src/packlets/vault/iframe-host-runtime.ts +6 -6
  149. package/src/packlets/vault/iframe-proxy-runtime.ts +10 -5
  150. package/src/packlets/vault/shell-runtime.ts +4 -4
  151. package/src/packlets/vault/worker-runtime.ts +3 -3
  152. package/src/packlets/vault/worker-session.ts +5 -5
  153. package/src/version.ts +1 -1
  154. package/dist/lib/browser/chunk-XEZCTVLQ.mjs.map +0 -7
@@ -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: 64,
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: 145,
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: 161,
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
  });
@@ -1086,7 +1104,7 @@ var DeviceInvitationProtocol = class {
1086
1104
  async admit(request) {
1087
1105
  invariant4(request.device, void 0, {
1088
1106
  F: __dxlog_file5,
1089
- L: 31,
1107
+ L: 35,
1090
1108
  S: this,
1091
1109
  A: [
1092
1110
  "request.device",
@@ -1122,7 +1140,7 @@ var DeviceInvitationProtocol = class {
1122
1140
  async accept(response, request) {
1123
1141
  invariant4(response.device, void 0, {
1124
1142
  F: __dxlog_file5,
1125
- L: 64,
1143
+ L: 68,
1126
1144
  S: this,
1127
1145
  A: [
1128
1146
  "response.device",
@@ -1132,7 +1150,7 @@ var DeviceInvitationProtocol = class {
1132
1150
  const { identityKey, haloSpaceKey, genesisFeedKey, controlTimeframe } = response.device;
1133
1151
  invariant4(request.device, void 0, {
1134
1152
  F: __dxlog_file5,
1135
- L: 67,
1153
+ L: 71,
1136
1154
  S: this,
1137
1155
  A: [
1138
1156
  "request.device",
@@ -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,11 +1536,11 @@ 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,
1525
- L: 75,
1543
+ L: 80,
1526
1544
  S: this,
1527
1545
  A: [
1528
1546
  "protocol",
@@ -1551,7 +1569,7 @@ var InvitationsHandler = class {
1551
1569
  ...protocol.toJSON()
1552
1570
  }, {
1553
1571
  F: __dxlog_file7,
1554
- L: 97,
1572
+ L: 102,
1555
1573
  S: this,
1556
1574
  C: (f, a) => f(...a)
1557
1575
  });
@@ -1576,7 +1594,7 @@ var InvitationsHandler = class {
1576
1594
  const deviceKey = admissionRequest.device?.deviceKey ?? admissionRequest.space?.deviceKey;
1577
1595
  invariant6(deviceKey, void 0, {
1578
1596
  F: __dxlog_file7,
1579
- L: 118,
1597
+ L: 123,
1580
1598
  S: this,
1581
1599
  A: [
1582
1600
  "deviceKey",
@@ -1593,13 +1611,13 @@ 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
1600
1618
  }), {
1601
1619
  F: __dxlog_file7,
1602
- L: 136,
1620
+ L: 141,
1603
1621
  S: this,
1604
1622
  C: (f, a) => f(...a)
1605
1623
  });
@@ -1607,7 +1625,7 @@ var InvitationsHandler = class {
1607
1625
  ...protocol.toJSON()
1608
1626
  }, {
1609
1627
  F: __dxlog_file7,
1610
- L: 137,
1628
+ L: 142,
1611
1629
  S: this,
1612
1630
  C: (f, a) => f(...a)
1613
1631
  });
@@ -1623,7 +1641,7 @@ var InvitationsHandler = class {
1623
1641
  ...protocol.toJSON()
1624
1642
  }, {
1625
1643
  F: __dxlog_file7,
1626
- L: 140,
1644
+ L: 145,
1627
1645
  S: this,
1628
1646
  C: (f, a) => f(...a)
1629
1647
  });
@@ -1635,7 +1653,7 @@ var InvitationsHandler = class {
1635
1653
  id: traceId
1636
1654
  }), {
1637
1655
  F: __dxlog_file7,
1638
- L: 142,
1656
+ L: 147,
1639
1657
  S: this,
1640
1658
  C: (f, a) => f(...a)
1641
1659
  });
@@ -1645,7 +1663,7 @@ var InvitationsHandler = class {
1645
1663
  ...protocol.toJSON()
1646
1664
  }, {
1647
1665
  F: __dxlog_file7,
1648
- L: 145,
1666
+ L: 150,
1649
1667
  S: this,
1650
1668
  C: (f, a) => f(...a)
1651
1669
  });
@@ -1656,7 +1674,7 @@ var InvitationsHandler = class {
1656
1674
  } else {
1657
1675
  log5.error("failed", err, {
1658
1676
  F: __dxlog_file7,
1659
- L: 148,
1677
+ L: 153,
1660
1678
  S: this,
1661
1679
  C: (f, a) => f(...a)
1662
1680
  });
@@ -1667,7 +1685,7 @@ var InvitationsHandler = class {
1667
1685
  error: err
1668
1686
  }), {
1669
1687
  F: __dxlog_file7,
1670
- L: 151,
1688
+ L: 156,
1671
1689
  S: this,
1672
1690
  C: (f, a) => f(...a)
1673
1691
  });
@@ -1688,7 +1706,7 @@ var InvitationsHandler = class {
1688
1706
  ...protocol.toJSON()
1689
1707
  }, {
1690
1708
  F: __dxlog_file7,
1691
- L: 166,
1709
+ L: 171,
1692
1710
  S: this,
1693
1711
  C: (f, a) => f(...a)
1694
1712
  });
@@ -1699,7 +1717,7 @@ var InvitationsHandler = class {
1699
1717
  } else {
1700
1718
  log5.error("failed", err, {
1701
1719
  F: __dxlog_file7,
1702
- L: 169,
1720
+ L: 174,
1703
1721
  S: this,
1704
1722
  C: (f, a) => f(...a)
1705
1723
  });
@@ -1744,7 +1762,7 @@ var InvitationsHandler = class {
1744
1762
  const { timeout = INVITATION_TIMEOUT } = invitation;
1745
1763
  invariant6(protocol, void 0, {
1746
1764
  F: __dxlog_file7,
1747
- L: 210,
1765
+ L: 215,
1748
1766
  S: this,
1749
1767
  A: [
1750
1768
  "protocol",
@@ -1758,7 +1776,7 @@ var InvitationsHandler = class {
1758
1776
  const setState = (newData) => {
1759
1777
  invariant6(newData.state !== void 0, void 0, {
1760
1778
  F: __dxlog_file7,
1761
- L: 221,
1779
+ L: 226,
1762
1780
  S: this,
1763
1781
  A: [
1764
1782
  "newData.state !== undefined",
@@ -1778,7 +1796,7 @@ var InvitationsHandler = class {
1778
1796
  ...protocol.toJSON()
1779
1797
  }, {
1780
1798
  F: __dxlog_file7,
1781
- L: 229,
1799
+ L: 234,
1782
1800
  S: this,
1783
1801
  C: (f, a) => f(...a)
1784
1802
  });
@@ -1788,7 +1806,7 @@ var InvitationsHandler = class {
1788
1806
  } else {
1789
1807
  log5.warn("auth failed", err, {
1790
1808
  F: __dxlog_file7,
1791
- L: 232,
1809
+ L: 237,
1792
1810
  S: this,
1793
1811
  C: (f, a) => f(...a)
1794
1812
  });
@@ -1802,7 +1820,7 @@ var InvitationsHandler = class {
1802
1820
  ...protocol.toJSON()
1803
1821
  }, {
1804
1822
  F: __dxlog_file7,
1805
- L: 240,
1823
+ L: 245,
1806
1824
  S: this,
1807
1825
  C: (f, a) => f(...a)
1808
1826
  });
@@ -1817,7 +1835,7 @@ var InvitationsHandler = class {
1817
1835
  currentState
1818
1836
  }, {
1819
1837
  F: __dxlog_file7,
1820
- L: 250,
1838
+ L: 255,
1821
1839
  S: this,
1822
1840
  C: (f, a) => f(...a)
1823
1841
  });
@@ -1826,13 +1844,13 @@ 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
1833
1851
  }), {
1834
1852
  F: __dxlog_file7,
1835
- L: 259,
1853
+ L: 264,
1836
1854
  S: this,
1837
1855
  C: (f, a) => f(...a)
1838
1856
  });
@@ -1844,7 +1862,7 @@ var InvitationsHandler = class {
1844
1862
  ...protocol.toJSON()
1845
1863
  }, {
1846
1864
  F: __dxlog_file7,
1847
- L: 267,
1865
+ L: 272,
1848
1866
  S: this,
1849
1867
  C: (f, a) => f(...a)
1850
1868
  });
@@ -1855,7 +1873,7 @@ var InvitationsHandler = class {
1855
1873
  ...protocol.toJSON()
1856
1874
  }, {
1857
1875
  F: __dxlog_file7,
1858
- L: 271,
1876
+ L: 276,
1859
1877
  S: this,
1860
1878
  C: (f, a) => f(...a)
1861
1879
  });
@@ -1865,7 +1883,7 @@ var InvitationsHandler = class {
1865
1883
  response: introductionResponse
1866
1884
  }, {
1867
1885
  F: __dxlog_file7,
1868
- L: 275,
1886
+ L: 280,
1869
1887
  S: this,
1870
1888
  C: (f, a) => f(...a)
1871
1889
  });
@@ -1877,7 +1895,7 @@ var InvitationsHandler = class {
1877
1895
  for (let attempt = 1; attempt <= MAX_OTP_ATTEMPTS; attempt++) {
1878
1896
  log5("guest waiting for authentication code...", void 0, {
1879
1897
  F: __dxlog_file7,
1880
- L: 284,
1898
+ L: 289,
1881
1899
  S: this,
1882
1900
  C: (f, a) => f(...a)
1883
1901
  });
@@ -1889,7 +1907,7 @@ var InvitationsHandler = class {
1889
1907
  });
1890
1908
  log5("sending authentication request", void 0, {
1891
1909
  F: __dxlog_file7,
1892
- L: 288,
1910
+ L: 293,
1893
1911
  S: this,
1894
1912
  C: (f, a) => f(...a)
1895
1913
  });
@@ -1910,7 +1928,7 @@ var InvitationsHandler = class {
1910
1928
  attempt
1911
1929
  }, {
1912
1930
  F: __dxlog_file7,
1913
- L: 299,
1931
+ L: 304,
1914
1932
  S: this,
1915
1933
  C: (f, a) => f(...a)
1916
1934
  });
@@ -1927,7 +1945,7 @@ var InvitationsHandler = class {
1927
1945
  ...protocol.toJSON()
1928
1946
  }, {
1929
1947
  F: __dxlog_file7,
1930
- L: 310,
1948
+ L: 315,
1931
1949
  S: this,
1932
1950
  C: (f, a) => f(...a)
1933
1951
  });
@@ -1939,7 +1957,7 @@ var InvitationsHandler = class {
1939
1957
  ...protocol.toJSON()
1940
1958
  }, {
1941
1959
  F: __dxlog_file7,
1942
- L: 321,
1960
+ L: 326,
1943
1961
  S: this,
1944
1962
  C: (f, a) => f(...a)
1945
1963
  });
@@ -1951,7 +1969,7 @@ var InvitationsHandler = class {
1951
1969
  id: traceId
1952
1970
  }), {
1953
1971
  F: __dxlog_file7,
1954
- L: 323,
1972
+ L: 328,
1955
1973
  S: this,
1956
1974
  C: (f, a) => f(...a)
1957
1975
  });
@@ -1961,7 +1979,7 @@ var InvitationsHandler = class {
1961
1979
  ...protocol.toJSON()
1962
1980
  }, {
1963
1981
  F: __dxlog_file7,
1964
- L: 326,
1982
+ L: 331,
1965
1983
  S: this,
1966
1984
  C: (f, a) => f(...a)
1967
1985
  });
@@ -1971,7 +1989,7 @@ var InvitationsHandler = class {
1971
1989
  } else {
1972
1990
  log5("auth failed", err, {
1973
1991
  F: __dxlog_file7,
1974
- L: 329,
1992
+ L: 334,
1975
1993
  S: this,
1976
1994
  C: (f, a) => f(...a)
1977
1995
  });
@@ -1982,7 +2000,7 @@ var InvitationsHandler = class {
1982
2000
  error: err
1983
2001
  }), {
1984
2002
  F: __dxlog_file7,
1985
- L: 332,
2003
+ L: 337,
1986
2004
  S: this,
1987
2005
  C: (f, a) => f(...a)
1988
2006
  });
@@ -2000,7 +2018,7 @@ var InvitationsHandler = class {
2000
2018
  ...protocol.toJSON()
2001
2019
  }, {
2002
2020
  F: __dxlog_file7,
2003
- L: 343,
2021
+ L: 348,
2004
2022
  S: this,
2005
2023
  C: (f, a) => f(...a)
2006
2024
  });
@@ -2010,7 +2028,7 @@ var InvitationsHandler = class {
2010
2028
  } else {
2011
2029
  log5("auth failed", err, {
2012
2030
  F: __dxlog_file7,
2013
- L: 346,
2031
+ L: 351,
2014
2032
  S: this,
2015
2033
  C: (f, a) => f(...a)
2016
2034
  });
@@ -2023,7 +2041,7 @@ var InvitationsHandler = class {
2023
2041
  scheduleTask2(ctx, async () => {
2024
2042
  invariant6(invitation.swarmKey, void 0, {
2025
2043
  F: __dxlog_file7,
2026
- L: 356,
2044
+ L: 361,
2027
2045
  S: this,
2028
2046
  A: [
2029
2047
  "invitation.swarmKey",
@@ -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() {
@@ -2282,7 +2291,7 @@ var SpaceInvitationProtocol = class {
2282
2291
  async admit(request, guestProfile) {
2283
2292
  invariant8(this._spaceKey, void 0, {
2284
2293
  F: __dxlog_file9,
2285
- L: 42,
2294
+ L: 46,
2286
2295
  S: this,
2287
2296
  A: [
2288
2297
  "this._spaceKey",
@@ -2292,7 +2301,7 @@ var SpaceInvitationProtocol = class {
2292
2301
  const space = await this._spaceManager.spaces.get(this._spaceKey);
2293
2302
  invariant8(space, void 0, {
2294
2303
  F: __dxlog_file9,
2295
- L: 44,
2304
+ L: 48,
2296
2305
  S: this,
2297
2306
  A: [
2298
2307
  "space",
@@ -2301,7 +2310,7 @@ var SpaceInvitationProtocol = class {
2301
2310
  });
2302
2311
  invariant8(request.space, void 0, {
2303
2312
  F: __dxlog_file9,
2304
- L: 46,
2313
+ L: 50,
2305
2314
  S: this,
2306
2315
  A: [
2307
2316
  "request.space",
@@ -2314,14 +2323,14 @@ var SpaceInvitationProtocol = class {
2314
2323
  guest: deviceKey
2315
2324
  }, {
2316
2325
  F: __dxlog_file9,
2317
- L: 49,
2326
+ L: 53,
2318
2327
  S: this,
2319
2328
  C: (f, a) => f(...a)
2320
2329
  });
2321
2330
  const credentials = await createAdmissionCredentials(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, guestProfile);
2322
2331
  invariant8(credentials[0].credential, void 0, {
2323
2332
  F: __dxlog_file9,
2324
- L: 60,
2333
+ L: 64,
2325
2334
  S: this,
2326
2335
  A: [
2327
2336
  "credentials[0].credential",
@@ -2331,7 +2340,7 @@ var SpaceInvitationProtocol = class {
2331
2340
  const spaceMemberCredential = credentials[0].credential.credential;
2332
2341
  invariant8(getCredentialAssertion(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
2333
2342
  F: __dxlog_file9,
2334
- L: 62,
2343
+ L: 66,
2335
2344
  S: this,
2336
2345
  A: [
2337
2346
  "getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2367,7 +2376,7 @@ var SpaceInvitationProtocol = class {
2367
2376
  async accept(response) {
2368
2377
  invariant8(response.space, void 0, {
2369
2378
  F: __dxlog_file9,
2370
- L: 97,
2379
+ L: 101,
2371
2380
  S: this,
2372
2381
  A: [
2373
2382
  "response.space",
@@ -2378,7 +2387,7 @@ var SpaceInvitationProtocol = class {
2378
2387
  const assertion = getCredentialAssertion(credential);
2379
2388
  invariant8(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
2380
2389
  F: __dxlog_file9,
2381
- L: 100,
2390
+ L: 104,
2382
2391
  S: this,
2383
2392
  A: [
2384
2393
  "assertion['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2387,7 +2396,7 @@ var SpaceInvitationProtocol = class {
2387
2396
  });
2388
2397
  invariant8(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
2389
2398
  F: __dxlog_file9,
2390
- L: 101,
2399
+ L: 105,
2391
2400
  S: this,
2392
2401
  A: [
2393
2402
  "credential.subject.id.equals(this._signingContext.identityKey)",
@@ -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.e5374ab";
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-HQ4UBZ3F.mjs.map