@dxos/client-services 0.5.1-next.638da00 → 0.5.1-next.65aaa36

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 (30) hide show
  1. package/dist/lib/browser/{chunk-L2CWGONQ.mjs → chunk-2MPSJHTS.mjs} +123 -144
  2. package/dist/lib/browser/chunk-2MPSJHTS.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/packlets/testing/index.mjs +1 -1
  6. package/dist/lib/node/{chunk-2PGHNVRY.cjs → chunk-ITFB7UCR.cjs} +145 -166
  7. package/dist/lib/node/chunk-ITFB7UCR.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +43 -43
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/packlets/testing/index.cjs +8 -8
  11. package/dist/types/src/packlets/diagnostics/diagnostics-collector.d.ts.map +1 -1
  12. package/dist/types/src/packlets/diagnostics/diagnostics.d.ts.map +1 -1
  13. package/dist/types/src/packlets/invitations/invitations-manager.d.ts.map +1 -1
  14. package/dist/types/src/packlets/invitations/space-invitation-protocol.d.ts.map +1 -1
  15. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  16. package/dist/types/src/packlets/spaces/spaces-service.d.ts +1 -2
  17. package/dist/types/src/packlets/spaces/spaces-service.d.ts.map +1 -1
  18. package/dist/types/src/version.d.ts +1 -1
  19. package/package.json +36 -36
  20. package/src/packlets/diagnostics/diagnostics-collector.ts +9 -14
  21. package/src/packlets/diagnostics/diagnostics.ts +68 -78
  22. package/src/packlets/invitations/invitations-manager.ts +0 -3
  23. package/src/packlets/invitations/space-invitation-protocol.ts +2 -4
  24. package/src/packlets/services/service-host.ts +2 -2
  25. package/src/packlets/spaces/data-space.ts +1 -2
  26. package/src/packlets/spaces/genesis.ts +1 -1
  27. package/src/packlets/spaces/spaces-service.ts +6 -12
  28. package/src/version.ts +1 -1
  29. package/dist/lib/browser/chunk-L2CWGONQ.mjs.map +0 -7
  30. package/dist/lib/node/chunk-2PGHNVRY.cjs.map +0 -7
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_2PGHNVRY_exports = {};
30
- __export(chunk_2PGHNVRY_exports, {
29
+ var chunk_ITFB7UCR_exports = {};
30
+ __export(chunk_ITFB7UCR_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  ClientServicesProviderResource: () => ClientServicesProviderResource,
@@ -66,7 +66,7 @@ __export(chunk_2PGHNVRY_exports, {
66
66
  subscribeToSpaces: () => subscribeToSpaces,
67
67
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
68
68
  });
69
- module.exports = __toCommonJS(chunk_2PGHNVRY_exports);
69
+ module.exports = __toCommonJS(chunk_ITFB7UCR_exports);
70
70
  var import_async = require("@dxos/async");
71
71
  var import_codec_protobuf = require("@dxos/codec-protobuf");
72
72
  var import_feed_store = require("@dxos/feed-store");
@@ -172,7 +172,6 @@ var import_invariant10 = require("@dxos/invariant");
172
172
  var import_keys8 = require("@dxos/keys");
173
173
  var import_log9 = require("@dxos/log");
174
174
  var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
175
- var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
176
175
  var import_codec_protobuf9 = require("@dxos/codec-protobuf");
177
176
  var import_debug2 = require("@dxos/debug");
178
177
  var import_rpc = require("@dxos/rpc");
@@ -189,13 +188,12 @@ var import_keys9 = require("@dxos/keys");
189
188
  var import_log10 = require("@dxos/log");
190
189
  var import_protocols8 = require("@dxos/protocols");
191
190
  var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
192
- var import_credentials11 = require("@dxos/protocols/proto/dxos/halo/credentials");
193
- var import_credentials12 = require("@dxos/protocols/proto/dxos/halo/credentials");
191
+ var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
194
192
  var import_timeframe2 = require("@dxos/timeframe");
195
193
  var import_tracing4 = require("@dxos/tracing");
196
194
  var import_util6 = require("@dxos/util");
197
195
  var import_async12 = require("@dxos/async");
198
- var import_credentials13 = require("@dxos/credentials");
196
+ var import_credentials11 = require("@dxos/credentials");
199
197
  var import_async13 = require("@dxos/async");
200
198
  var import_context10 = require("@dxos/context");
201
199
  var import_invariant12 = require("@dxos/invariant");
@@ -206,7 +204,7 @@ var import_teleport3 = require("@dxos/teleport");
206
204
  var import_util7 = require("@dxos/util");
207
205
  var import_async14 = require("@dxos/async");
208
206
  var import_context11 = require("@dxos/context");
209
- var import_credentials14 = require("@dxos/credentials");
207
+ var import_credentials12 = require("@dxos/credentials");
210
208
  var import_invariant13 = require("@dxos/invariant");
211
209
  var import_keys11 = require("@dxos/keys");
212
210
  var import_log12 = require("@dxos/log");
@@ -214,9 +212,9 @@ var import_protocols10 = require("@dxos/protocols");
214
212
  var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
215
213
  var import_teleport_extension_gossip2 = require("@dxos/teleport-extension-gossip");
216
214
  var import_util8 = require("@dxos/util");
217
- var import_credentials15 = require("@dxos/credentials");
215
+ var import_credentials13 = require("@dxos/credentials");
218
216
  var import_debug4 = require("@dxos/debug");
219
- var import_credentials16 = require("@dxos/protocols/proto/dxos/halo/credentials");
217
+ var import_credentials14 = require("@dxos/protocols/proto/dxos/halo/credentials");
220
218
  var import_timeframe3 = require("@dxos/timeframe");
221
219
  var import_async15 = require("@dxos/async");
222
220
  var import_codec_protobuf10 = require("@dxos/codec-protobuf");
@@ -225,10 +223,9 @@ var import_invariant14 = require("@dxos/invariant");
225
223
  var import_log13 = require("@dxos/log");
226
224
  var import_protocols11 = require("@dxos/protocols");
227
225
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
228
- var import_credentials17 = require("@dxos/protocols/proto/dxos/halo/credentials");
229
226
  var import_async16 = require("@dxos/async");
230
227
  var import_context12 = require("@dxos/context");
231
- var import_credentials18 = require("@dxos/credentials");
228
+ var import_credentials15 = require("@dxos/credentials");
232
229
  var import_debug6 = require("@dxos/debug");
233
230
  var import_echo_db = require("@dxos/echo-db");
234
231
  var import_echo_pipeline4 = require("@dxos/echo-pipeline");
@@ -242,9 +239,8 @@ var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
242
239
  var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
243
240
  var import_tracing5 = require("@dxos/tracing");
244
241
  var import_util9 = require("@dxos/util");
245
- var import_async17 = require("@dxos/async");
246
242
  var import_codec_protobuf11 = require("@dxos/codec-protobuf");
247
- var import_credentials19 = require("@dxos/credentials");
243
+ var import_credentials16 = require("@dxos/credentials");
248
244
  var import_invariant16 = require("@dxos/invariant");
249
245
  var import_protocols13 = require("@dxos/protocols");
250
246
  var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
@@ -254,7 +250,7 @@ var import_config = require("@dxos/config");
254
250
  var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
255
251
  var import_tracing7 = require("@dxos/tracing");
256
252
  var import_util10 = require("@dxos/util");
257
- var import_async18 = require("@dxos/async");
253
+ var import_async17 = require("@dxos/async");
258
254
  var import_client_protocol5 = require("@dxos/client-protocol");
259
255
  var import_context13 = require("@dxos/context");
260
256
  var import_echo_protocol = require("@dxos/echo-protocol");
@@ -269,14 +265,14 @@ var import_services16 = require("@dxos/protocols/proto/dxos/client/services");
269
265
  var import_tracing8 = require("@dxos/tracing");
270
266
  var import_util11 = require("@dxos/util");
271
267
  var import_websocket_rpc = require("@dxos/websocket-rpc");
272
- var import_async19 = require("@dxos/async");
268
+ var import_async18 = require("@dxos/async");
273
269
  var import_codec_protobuf12 = require("@dxos/codec-protobuf");
274
270
  var import_invariant18 = require("@dxos/invariant");
275
271
  var import_services17 = require("@dxos/protocols/proto/dxos/client/services");
276
272
  var import_invariant19 = require("@dxos/invariant");
277
273
  var import_lock_file = require("@dxos/lock-file");
278
274
  var import_log16 = require("@dxos/log");
279
- var import_async20 = require("@dxos/async");
275
+ var import_async19 = require("@dxos/async");
280
276
  var import_codec_protobuf13 = require("@dxos/codec-protobuf");
281
277
  var import_keys14 = require("@dxos/keys");
282
278
  var import_log17 = require("@dxos/log");
@@ -2747,7 +2743,7 @@ var SpaceInvitationProtocol = class {
2747
2743
  ""
2748
2744
  ]
2749
2745
  });
2750
- const space = this._spaceManager.spaces.get(this._spaceKey);
2746
+ const space = await this._spaceManager.spaces.get(this._spaceKey);
2751
2747
  (0, import_invariant9.invariant)(space, void 0, {
2752
2748
  F: __dxlog_file10,
2753
2749
  L: 58,
@@ -2776,10 +2772,10 @@ var SpaceInvitationProtocol = class {
2776
2772
  S: this,
2777
2773
  C: (f, a) => f(...a)
2778
2774
  });
2779
- const credentials = await (0, import_credentials7.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, invitation.role ?? import_credentials8.SpaceMember.Role.ADMIN, space.inner.spaceState.membershipChainHeads, guestProfile, invitation.delegationCredentialId);
2775
+ const credentials = await (0, import_credentials7.createAdmissionCredentials)(this._signingContext.credentialSigner, identityKey, space.key, space.inner.genesisFeedKey, guestProfile, invitation.delegationCredentialId);
2780
2776
  (0, import_invariant9.invariant)(credentials[0].credential, void 0, {
2781
2777
  F: __dxlog_file10,
2782
- L: 77,
2778
+ L: 75,
2783
2779
  S: this,
2784
2780
  A: [
2785
2781
  "credentials[0].credential",
@@ -2789,7 +2785,7 @@ var SpaceInvitationProtocol = class {
2789
2785
  const spaceMemberCredential = credentials[0].credential.credential;
2790
2786
  (0, import_invariant9.invariant)((0, import_credentials7.getCredentialAssertion)(spaceMemberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
2791
2787
  F: __dxlog_file10,
2792
- L: 79,
2788
+ L: 77,
2793
2789
  S: this,
2794
2790
  A: [
2795
2791
  "getCredentialAssertion(spaceMemberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2807,7 +2803,7 @@ var SpaceInvitationProtocol = class {
2807
2803
  async delegate(invitation) {
2808
2804
  (0, import_invariant9.invariant)(this._spaceKey, void 0, {
2809
2805
  F: __dxlog_file10,
2810
- L: 92,
2806
+ L: 90,
2811
2807
  S: this,
2812
2808
  A: [
2813
2809
  "this._spaceKey",
@@ -2817,7 +2813,7 @@ var SpaceInvitationProtocol = class {
2817
2813
  const space = this._spaceManager.spaces.get(this._spaceKey);
2818
2814
  (0, import_invariant9.invariant)(space, void 0, {
2819
2815
  F: __dxlog_file10,
2820
- L: 94,
2816
+ L: 92,
2821
2817
  S: this,
2822
2818
  A: [
2823
2819
  "space",
@@ -2827,7 +2823,7 @@ var SpaceInvitationProtocol = class {
2827
2823
  if (invitation.authMethod === import_services7.Invitation.AuthMethod.KNOWN_PUBLIC_KEY) {
2828
2824
  (0, import_invariant9.invariant)(invitation.guestKeypair?.publicKey, void 0, {
2829
2825
  F: __dxlog_file10,
2830
- L: 96,
2826
+ L: 94,
2831
2827
  S: this,
2832
2828
  A: [
2833
2829
  "invitation.guestKeypair?.publicKey",
@@ -2840,7 +2836,7 @@ var SpaceInvitationProtocol = class {
2840
2836
  id: invitation.invitationId
2841
2837
  }, {
2842
2838
  F: __dxlog_file10,
2843
- L: 99,
2839
+ L: 97,
2844
2840
  S: this,
2845
2841
  C: (f, a) => f(...a)
2846
2842
  });
@@ -2848,14 +2844,14 @@ var SpaceInvitationProtocol = class {
2848
2844
  invitationId: invitation.invitationId,
2849
2845
  authMethod: invitation.authMethod,
2850
2846
  swarmKey: invitation.swarmKey,
2851
- role: invitation.role ?? import_credentials8.SpaceMember.Role.ADMIN,
2847
+ role: import_credentials8.SpaceMember.Role.ADMIN,
2852
2848
  expiresOn: invitation.lifetime ? new Date((invitation.created?.getTime() ?? Date.now()) + invitation.lifetime) : void 0,
2853
2849
  multiUse: invitation.multiUse ?? false,
2854
2850
  guestKey: invitation.authMethod === import_services7.Invitation.AuthMethod.KNOWN_PUBLIC_KEY ? invitation.guestKeypair.publicKey : void 0
2855
2851
  });
2856
2852
  (0, import_invariant9.invariant)(credential.credential, void 0, {
2857
2853
  F: __dxlog_file10,
2858
- L: 119,
2854
+ L: 117,
2859
2855
  S: this,
2860
2856
  A: [
2861
2857
  "credential.credential",
@@ -2870,7 +2866,7 @@ var SpaceInvitationProtocol = class {
2870
2866
  async cancelDelegation(invitation) {
2871
2867
  (0, import_invariant9.invariant)(this._spaceKey, void 0, {
2872
2868
  F: __dxlog_file10,
2873
- L: 125,
2869
+ L: 123,
2874
2870
  S: this,
2875
2871
  A: [
2876
2872
  "this._spaceKey",
@@ -2879,7 +2875,7 @@ var SpaceInvitationProtocol = class {
2879
2875
  });
2880
2876
  (0, import_invariant9.invariant)(invitation.type === import_services7.Invitation.Type.DELEGATED && invitation.delegationCredentialId, void 0, {
2881
2877
  F: __dxlog_file10,
2882
- L: 126,
2878
+ L: 124,
2883
2879
  S: this,
2884
2880
  A: [
2885
2881
  "invitation.type === Invitation.Type.DELEGATED && invitation.delegationCredentialId",
@@ -2889,7 +2885,7 @@ var SpaceInvitationProtocol = class {
2889
2885
  const space = this._spaceManager.spaces.get(this._spaceKey);
2890
2886
  (0, import_invariant9.invariant)(space, void 0, {
2891
2887
  F: __dxlog_file10,
2892
- L: 128,
2888
+ L: 126,
2893
2889
  S: this,
2894
2890
  A: [
2895
2891
  "space",
@@ -2901,14 +2897,14 @@ var SpaceInvitationProtocol = class {
2901
2897
  id: invitation.invitationId
2902
2898
  }, {
2903
2899
  F: __dxlog_file10,
2904
- L: 130,
2900
+ L: 128,
2905
2901
  S: this,
2906
2902
  C: (f, a) => f(...a)
2907
2903
  });
2908
2904
  const credential = await (0, import_credentials7.createCancelDelegatedSpaceInvitationCredential)(this._signingContext.credentialSigner, space.key, invitation.delegationCredentialId);
2909
2905
  (0, import_invariant9.invariant)(credential.credential, void 0, {
2910
2906
  F: __dxlog_file10,
2911
- L: 137,
2907
+ L: 135,
2912
2908
  S: this,
2913
2909
  A: [
2914
2910
  "credential.credential",
@@ -2944,7 +2940,7 @@ var SpaceInvitationProtocol = class {
2944
2940
  async accept(response) {
2945
2941
  (0, import_invariant9.invariant)(response.space, void 0, {
2946
2942
  F: __dxlog_file10,
2947
- L: 169,
2943
+ L: 167,
2948
2944
  S: this,
2949
2945
  A: [
2950
2946
  "response.space",
@@ -2955,7 +2951,7 @@ var SpaceInvitationProtocol = class {
2955
2951
  const assertion = (0, import_credentials7.getCredentialAssertion)(credential);
2956
2952
  (0, import_invariant9.invariant)(assertion["@type"] === "dxos.halo.credentials.SpaceMember", "Invalid credential", {
2957
2953
  F: __dxlog_file10,
2958
- L: 172,
2954
+ L: 170,
2959
2955
  S: this,
2960
2956
  A: [
2961
2957
  "assertion['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -2964,7 +2960,7 @@ var SpaceInvitationProtocol = class {
2964
2960
  });
2965
2961
  (0, import_invariant9.invariant)(credential.subject.id.equals(this._signingContext.identityKey), void 0, {
2966
2962
  F: __dxlog_file10,
2967
- L: 173,
2963
+ L: 171,
2968
2964
  S: this,
2969
2965
  A: [
2970
2966
  "credential.subject.id.equals(this._signingContext.identityKey)",
@@ -3026,7 +3022,7 @@ var InvitationsManager = class {
3026
3022
  } catch (err) {
3027
3023
  import_log9.log.catch(err, void 0, {
3028
3024
  F: __dxlog_file11,
3029
- L: 77,
3025
+ L: 76,
3030
3026
  S: this,
3031
3027
  C: (f, a) => f(...a)
3032
3028
  });
@@ -3049,7 +3045,7 @@ var InvitationsManager = class {
3049
3045
  const loadTasks = freshInvitations.map((persistentInvitation) => {
3050
3046
  (0, import_invariant10.invariant)(!this._createInvitations.get(persistentInvitation.invitationId), "invitation already exists", {
3051
3047
  F: __dxlog_file11,
3052
- L: 98,
3048
+ L: 97,
3053
3049
  S: this,
3054
3050
  A: [
3055
3051
  "!this._createInvitations.get(persistentInvitation.invitationId)",
@@ -3068,7 +3064,7 @@ var InvitationsManager = class {
3068
3064
  } catch (err) {
3069
3065
  import_log9.log.catch(err, void 0, {
3070
3066
  F: __dxlog_file11,
3071
- L: 105,
3067
+ L: 104,
3072
3068
  S: this,
3073
3069
  C: (f, a) => f(...a)
3074
3070
  });
@@ -3100,13 +3096,13 @@ var InvitationsManager = class {
3100
3096
  async authenticate({ invitationId, authCode }) {
3101
3097
  (0, import_log9.log)("authenticating...", void 0, {
3102
3098
  F: __dxlog_file11,
3103
- L: 135,
3099
+ L: 134,
3104
3100
  S: this,
3105
3101
  C: (f, a) => f(...a)
3106
3102
  });
3107
3103
  (0, import_invariant10.invariant)(invitationId, void 0, {
3108
3104
  F: __dxlog_file11,
3109
- L: 136,
3105
+ L: 135,
3110
3106
  S: this,
3111
3107
  A: [
3112
3108
  "invitationId",
@@ -3119,7 +3115,7 @@ var InvitationsManager = class {
3119
3115
  invitationId
3120
3116
  }, {
3121
3117
  F: __dxlog_file11,
3122
- L: 139,
3118
+ L: 138,
3123
3119
  S: this,
3124
3120
  C: (f, a) => f(...a)
3125
3121
  });
@@ -3132,13 +3128,13 @@ var InvitationsManager = class {
3132
3128
  invitationId
3133
3129
  }, {
3134
3130
  F: __dxlog_file11,
3135
- L: 146,
3131
+ L: 145,
3136
3132
  S: this,
3137
3133
  C: (f, a) => f(...a)
3138
3134
  });
3139
3135
  (0, import_invariant10.invariant)(invitationId, void 0, {
3140
3136
  F: __dxlog_file11,
3141
- L: 147,
3137
+ L: 146,
3142
3138
  S: this,
3143
3139
  A: [
3144
3140
  "invitationId",
@@ -3184,7 +3180,7 @@ var InvitationsManager = class {
3184
3180
  }
3185
3181
  }
3186
3182
  _createInvitation(protocol, options) {
3187
- const { invitationId = import_keys8.PublicKey.random().toHex(), type = import_services8.Invitation.Type.INTERACTIVE, authMethod = import_services8.Invitation.AuthMethod.SHARED_SECRET, state = import_services8.Invitation.State.INIT, timeout = import_client_protocol3.INVITATION_TIMEOUT, swarmKey = import_keys8.PublicKey.random(), persistent = options?.authMethod !== import_services8.Invitation.AuthMethod.KNOWN_PUBLIC_KEY, created = /* @__PURE__ */ new Date(), guestKeypair = void 0, role = import_credentials10.SpaceMember.Role.ADMIN, lifetime = 86400, multiUse = false } = options ?? {};
3183
+ const { invitationId = import_keys8.PublicKey.random().toHex(), type = import_services8.Invitation.Type.INTERACTIVE, authMethod = import_services8.Invitation.AuthMethod.SHARED_SECRET, state = import_services8.Invitation.State.INIT, timeout = import_client_protocol3.INVITATION_TIMEOUT, swarmKey = import_keys8.PublicKey.random(), persistent = options?.authMethod !== import_services8.Invitation.AuthMethod.KNOWN_PUBLIC_KEY, created = /* @__PURE__ */ new Date(), guestKeypair = void 0, lifetime = 86400, multiUse = false } = options ?? {};
3188
3184
  const authCode = options?.authCode ?? (authMethod === import_services8.Invitation.AuthMethod.SHARED_SECRET ? (0, import_credentials9.generatePasscode)(import_client_protocol3.AUTHENTICATION_CODE_LENGTH) : void 0);
3189
3185
  return {
3190
3186
  invitationId,
@@ -3198,7 +3194,6 @@ var InvitationsManager = class {
3198
3194
  guestKeypair: guestKeypair ?? (authMethod === import_services8.Invitation.AuthMethod.KNOWN_PUBLIC_KEY ? createAdmissionKeypair() : void 0),
3199
3195
  created,
3200
3196
  lifetime,
3201
- role,
3202
3197
  multiUse,
3203
3198
  delegationCredentialId: options?.delegationCredentialId,
3204
3199
  ...protocol.getInvitationContext()
@@ -3217,7 +3212,7 @@ var InvitationsManager = class {
3217
3212
  ...handler.toJSON()
3218
3213
  }, {
3219
3214
  F: __dxlog_file11,
3220
- L: 236,
3215
+ L: 233,
3221
3216
  S: this,
3222
3217
  C: (f, a) => f(...a)
3223
3218
  });
@@ -3250,7 +3245,7 @@ var InvitationsManager = class {
3250
3245
  ...handler.toJSON()
3251
3246
  }, {
3252
3247
  F: __dxlog_file11,
3253
- L: 256,
3248
+ L: 253,
3254
3249
  S: this,
3255
3250
  C: (f, a) => f(...a)
3256
3251
  });
@@ -3261,7 +3256,7 @@ var InvitationsManager = class {
3261
3256
  } else {
3262
3257
  import_log9.log.warn("auth failed", err, {
3263
3258
  F: __dxlog_file11,
3264
- L: 259,
3259
+ L: 256,
3265
3260
  S: this,
3266
3261
  C: (f, a) => f(...a)
3267
3262
  });
@@ -3278,7 +3273,7 @@ var InvitationsManager = class {
3278
3273
  ...handler.toJSON()
3279
3274
  }, {
3280
3275
  F: __dxlog_file11,
3281
- L: 266,
3276
+ L: 263,
3282
3277
  S: this,
3283
3278
  C: (f, a) => f(...a)
3284
3279
  });
@@ -3323,7 +3318,7 @@ var InvitationsManager = class {
3323
3318
  } catch (err) {
3324
3319
  import_log9.log.catch(err, void 0, {
3325
3320
  F: __dxlog_file11,
3326
- L: 302,
3321
+ L: 299,
3327
3322
  S: this,
3328
3323
  C: (f, a) => f(...a)
3329
3324
  });
@@ -3419,7 +3414,7 @@ var AutomergeSpaceState = class {
3419
3414
  this._isProcessingRootDocs = false;
3420
3415
  }
3421
3416
  async processCredential(credential) {
3422
- if (!(0, import_credentials13.checkCredentialType)(credential, "dxos.halo.credentials.Epoch")) {
3417
+ if (!(0, import_credentials11.checkCredentialType)(credential, "dxos.halo.credentials.Epoch")) {
3423
3418
  return;
3424
3419
  }
3425
3420
  this.lastEpoch = credential;
@@ -3734,7 +3729,7 @@ var DataSpace = class {
3734
3729
  this._callbacks = params.callbacks ?? {};
3735
3730
  this._echoHost = params.echoHost;
3736
3731
  this.authVerifier = new TrustedKeySetAuthVerifier({
3737
- trustedKeysProvider: () => new import_util6.ComplexSet(import_keys9.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => member.role !== import_credentials11.SpaceMember.Role.REMOVED).map((member) => member.key)),
3732
+ trustedKeysProvider: () => new import_util6.ComplexSet(import_keys9.PublicKey.hash, Array.from(this._inner.spaceState.members.values()).filter((member) => !member.removed).map((member) => member.key)),
3738
3733
  update: this._inner.stateUpdate,
3739
3734
  authTimeout: import_client_protocol4.AUTH_TIMEOUT
3740
3735
  });
@@ -3744,7 +3739,7 @@ var DataSpace = class {
3744
3739
  state: import_services9.SpaceState[this._state]
3745
3740
  }, {
3746
3741
  F: __dxlog_file13,
3747
- L: 137,
3742
+ L: 136,
3748
3743
  S: this,
3749
3744
  C: (f, a) => f(...a)
3750
3745
  });
@@ -3794,7 +3789,7 @@ var DataSpace = class {
3794
3789
  state: import_services9.SpaceState[this._state]
3795
3790
  }, {
3796
3791
  F: __dxlog_file13,
3797
- L: 195,
3792
+ L: 194,
3798
3793
  S: this,
3799
3794
  C: (f, a) => f(...a)
3800
3795
  });
@@ -3812,7 +3807,7 @@ var DataSpace = class {
3812
3807
  state: import_services9.SpaceState[this._state]
3813
3808
  }, {
3814
3809
  F: __dxlog_file13,
3815
- L: 209,
3810
+ L: 208,
3816
3811
  S: this,
3817
3812
  C: (f, a) => f(...a)
3818
3813
  });
@@ -3844,7 +3839,7 @@ var DataSpace = class {
3844
3839
  if (err instanceof import_protocols8.CancelledError || err instanceof import_context9.ContextDisposedError) {
3845
3840
  (0, import_log10.log)("data pipeline initialization cancelled", err, {
3846
3841
  F: __dxlog_file13,
3847
- L: 242,
3842
+ L: 241,
3848
3843
  S: this,
3849
3844
  C: (f, a) => f(...a)
3850
3845
  });
@@ -3852,7 +3847,7 @@ var DataSpace = class {
3852
3847
  }
3853
3848
  import_log10.log.error("Error initializing data pipeline", err, {
3854
3849
  F: __dxlog_file13,
3855
- L: 246,
3850
+ L: 245,
3856
3851
  S: this,
3857
3852
  C: (f, a) => f(...a)
3858
3853
  });
@@ -3861,7 +3856,7 @@ var DataSpace = class {
3861
3856
  state: import_services9.SpaceState[this._state]
3862
3857
  }, {
3863
3858
  F: __dxlog_file13,
3864
- L: 248,
3859
+ L: 247,
3865
3860
  S: this,
3866
3861
  C: (f, a) => f(...a)
3867
3862
  });
@@ -3881,7 +3876,7 @@ var DataSpace = class {
3881
3876
  state: import_services9.SpaceState[this._state]
3882
3877
  }, {
3883
3878
  F: __dxlog_file13,
3884
- L: 264,
3879
+ L: 263,
3885
3880
  S: this,
3886
3881
  C: (f, a) => f(...a)
3887
3882
  });
@@ -3891,7 +3886,7 @@ var DataSpace = class {
3891
3886
  await (0, import_context9.cancelWithContext)(this._ctx, this.automergeSpaceState.ensureEpochInitialized());
3892
3887
  (0, import_log10.log)("data pipeline ready", void 0, {
3893
3888
  F: __dxlog_file13,
3894
- L: 276,
3889
+ L: 275,
3895
3890
  S: this,
3896
3891
  C: (f, a) => f(...a)
3897
3892
  });
@@ -3901,7 +3896,7 @@ var DataSpace = class {
3901
3896
  state: import_services9.SpaceState[this._state]
3902
3897
  }, {
3903
3898
  F: __dxlog_file13,
3904
- L: 280,
3899
+ L: 279,
3905
3900
  S: this,
3906
3901
  C: (f, a) => f(...a)
3907
3902
  });
@@ -3917,7 +3912,7 @@ var DataSpace = class {
3917
3912
  await this._createWritableFeeds();
3918
3913
  (0, import_log10.log)("writable feeds created", void 0, {
3919
3914
  F: __dxlog_file13,
3920
- L: 296,
3915
+ L: 295,
3921
3916
  S: this,
3922
3917
  C: (f, a) => f(...a)
3923
3918
  });
@@ -3944,7 +3939,7 @@ var DataSpace = class {
3944
3939
  spaceKey: this.key,
3945
3940
  deviceKey: this._signingContext.deviceKey,
3946
3941
  identityKey: this._signingContext.identityKey,
3947
- designation: import_credentials12.AdmittedFeed.Designation.CONTROL
3942
+ designation: import_credentials10.AdmittedFeed.Designation.CONTROL
3948
3943
  }
3949
3944
  }));
3950
3945
  }
@@ -3961,7 +3956,7 @@ var DataSpace = class {
3961
3956
  spaceKey: this.key,
3962
3957
  deviceKey: this._signingContext.deviceKey,
3963
3958
  identityKey: this._signingContext.identityKey,
3964
- designation: import_credentials12.AdmittedFeed.Designation.DATA
3959
+ designation: import_credentials10.AdmittedFeed.Designation.DATA
3965
3960
  }
3966
3961
  }));
3967
3962
  }
@@ -3980,7 +3975,7 @@ var DataSpace = class {
3980
3975
  rootUrl
3981
3976
  }, {
3982
3977
  F: __dxlog_file13,
3983
- L: 362,
3978
+ L: 361,
3984
3979
  S: this,
3985
3980
  C: (f, a) => f(...a)
3986
3981
  });
@@ -4012,7 +4007,7 @@ var DataSpace = class {
4012
4007
  err
4013
4008
  }, {
4014
4009
  F: __dxlog_file13,
4015
- L: 385,
4010
+ L: 384,
4016
4011
  S: this,
4017
4012
  C: (f, a) => f(...a)
4018
4013
  });
@@ -4067,7 +4062,7 @@ var DataSpace = class {
4067
4062
  const newRoot = this._echoHost.automergeRepo.create(rootHandle.docSync());
4068
4063
  (0, import_invariant11.invariant)(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
4069
4064
  F: __dxlog_file13,
4070
- L: 435,
4065
+ L: 434,
4071
4066
  S: this,
4072
4067
  A: [
4073
4068
  "typeof newRoot.url === 'string' && newRoot.url.length > 0",
@@ -4086,7 +4081,7 @@ var DataSpace = class {
4086
4081
  {
4087
4082
  import_log10.log.info("Fragmenting", void 0, {
4088
4083
  F: __dxlog_file13,
4089
- L: 447,
4084
+ L: 446,
4090
4085
  S: this,
4091
4086
  C: (f, a) => f(...a)
4092
4087
  });
@@ -4098,7 +4093,7 @@ var DataSpace = class {
4098
4093
  const otherObjects = objects.filter(([key]) => key !== properties?.[0]);
4099
4094
  (0, import_invariant11.invariant)(properties, "Properties not found", {
4100
4095
  F: __dxlog_file13,
4101
- L: 457,
4096
+ L: 456,
4102
4097
  S: this,
4103
4098
  A: [
4104
4099
  "properties",
@@ -4114,7 +4109,7 @@ var DataSpace = class {
4114
4109
  const newRoot = this._echoHost.automergeRepo.create(newSpaceDoc);
4115
4110
  (0, import_invariant11.invariant)(typeof newRoot.url === "string" && newRoot.url.length > 0, void 0, {
4116
4111
  F: __dxlog_file13,
4117
- L: 462,
4112
+ L: 461,
4118
4113
  S: this,
4119
4114
  A: [
4120
4115
  "typeof newRoot.url === 'string' && newRoot.url.length > 0",
@@ -4183,7 +4178,7 @@ var DataSpace = class {
4183
4178
  state: import_services9.SpaceState[this._state]
4184
4179
  }, {
4185
4180
  F: __dxlog_file13,
4186
- L: 528,
4181
+ L: 527,
4187
4182
  S: this,
4188
4183
  C: (f, a) => f(...a)
4189
4184
  });
@@ -4237,7 +4232,7 @@ DataSpace = _ts_decorate4([
4237
4232
  ], DataSpace);
4238
4233
  var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
4239
4234
  const credentials = [
4240
- await (0, import_credentials15.createCredential)({
4235
+ await (0, import_credentials13.createCredential)({
4241
4236
  signer: keyring,
4242
4237
  issuer: space.key,
4243
4238
  subject: space.key,
@@ -4246,14 +4241,14 @@ var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
4246
4241
  spaceKey: space.key
4247
4242
  }
4248
4243
  }),
4249
- await (0, import_credentials15.createCredential)({
4244
+ await (0, import_credentials13.createCredential)({
4250
4245
  signer: keyring,
4251
4246
  issuer: space.key,
4252
4247
  subject: signingContext.identityKey,
4253
4248
  assertion: {
4254
4249
  "@type": "dxos.halo.credentials.SpaceMember",
4255
4250
  spaceKey: space.key,
4256
- role: import_credentials16.SpaceMember.Role.OWNER,
4251
+ role: import_credentials14.SpaceMember.Role.ADMIN,
4257
4252
  profile: signingContext.getProfile(),
4258
4253
  genesisFeedKey: space.controlFeedKey ?? (0, import_debug4.failUndefined)()
4259
4254
  }
@@ -4265,7 +4260,7 @@ var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
4265
4260
  spaceKey: space.key,
4266
4261
  identityKey: signingContext.identityKey,
4267
4262
  deviceKey: signingContext.deviceKey,
4268
- designation: import_credentials16.AdmittedFeed.Designation.CONTROL
4263
+ designation: import_credentials14.AdmittedFeed.Designation.CONTROL
4269
4264
  }
4270
4265
  }),
4271
4266
  await signingContext.credentialSigner.createCredential({
@@ -4275,7 +4270,7 @@ var spaceGenesis = async (keyring, signingContext, space, automergeRoot) => {
4275
4270
  spaceKey: space.key,
4276
4271
  identityKey: signingContext.identityKey,
4277
4272
  deviceKey: signingContext.deviceKey,
4278
- designation: import_credentials16.AdmittedFeed.Designation.DATA
4273
+ designation: import_credentials14.AdmittedFeed.Designation.DATA
4279
4274
  }
4280
4275
  }),
4281
4276
  await signingContext.credentialSigner.createCredential({
@@ -4445,7 +4440,7 @@ var DataSpaceManager = class {
4445
4440
  const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner, automergeRootUrl);
4446
4441
  await this._metadataStore.addSpace(metadata);
4447
4442
  const memberCredential = credentials[1];
4448
- (0, import_invariant13.invariant)((0, import_credentials14.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
4443
+ (0, import_invariant13.invariant)((0, import_credentials12.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
4449
4444
  F: __dxlog_file14,
4450
4445
  L: 163,
4451
4446
  S: this,
@@ -4707,9 +4702,6 @@ var SpacesServiceImpl = class {
4707
4702
  }
4708
4703
  }
4709
4704
  }
4710
- async updateMemberRole(_) {
4711
- throw new Error("not implemented");
4712
- }
4713
4705
  querySpaces() {
4714
4706
  return new import_codec_protobuf10.Stream(({ next, ctx }) => {
4715
4707
  const scheduler = new import_async15.UpdateScheduler(ctx, async () => {
@@ -4719,7 +4711,7 @@ var SpacesServiceImpl = class {
4719
4711
  spaces
4720
4712
  }, {
4721
4713
  F: __dxlog_file15,
4722
- L: 82,
4714
+ L: 77,
4723
4715
  S: this,
4724
4716
  C: (f, a) => f(...a)
4725
4717
  });
@@ -4802,7 +4794,7 @@ var SpacesServiceImpl = class {
4802
4794
  } else {
4803
4795
  (0, import_invariant14.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
4804
4796
  F: __dxlog_file15,
4805
- L: 169,
4797
+ L: 164,
4806
4798
  S: this,
4807
4799
  A: [
4808
4800
  "!credential.id",
@@ -4811,7 +4803,7 @@ var SpacesServiceImpl = class {
4811
4803
  });
4812
4804
  (0, import_invariant14.invariant)(this._identityManager.identity, "Identity is not available", {
4813
4805
  F: __dxlog_file15,
4814
- L: 170,
4806
+ L: 165,
4815
4807
  S: this,
4816
4808
  A: [
4817
4809
  "this._identityManager.identity",
@@ -4821,7 +4813,7 @@ var SpacesServiceImpl = class {
4821
4813
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
4822
4814
  (0, import_invariant14.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
4823
4815
  F: __dxlog_file15,
4824
- L: 172,
4816
+ L: 167,
4825
4817
  S: this,
4826
4818
  A: [
4827
4819
  "credential.issuer.equals(signer.getIssuer())",
@@ -4876,7 +4868,7 @@ var SpacesServiceImpl = class {
4876
4868
  identityKey: member.key,
4877
4869
  profile: member.profile ?? {}
4878
4870
  },
4879
- presence: member.role === import_credentials17.SpaceMember.Role.REMOVED ? import_services11.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services11.SpaceMember.PresenceState.ONLINE : import_services11.SpaceMember.PresenceState.OFFLINE,
4871
+ presence: member.removed ? import_services11.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services11.SpaceMember.PresenceState.ONLINE : import_services11.SpaceMember.PresenceState.OFFLINE,
4880
4872
  peerStates: peers
4881
4873
  };
4882
4874
  }),
@@ -5089,7 +5081,7 @@ var ServiceContext = class extends import_context12.Resource {
5089
5081
  this.initialized.wake();
5090
5082
  this._deviceSpaceSync = {
5091
5083
  processCredential: async (credential) => {
5092
- const assertion = (0, import_credentials18.getCredentialAssertion)(credential);
5084
+ const assertion = (0, import_credentials15.getCredentialAssertion)(credential);
5093
5085
  if (assertion["@type"] !== "dxos.halo.credentials.SpaceMember") {
5094
5086
  return;
5095
5087
  }
@@ -5176,7 +5168,7 @@ var ServiceRegistry = class {
5176
5168
  delete this._handlers[name];
5177
5169
  }
5178
5170
  };
5179
- var DXOS_VERSION = "0.5.1-next.638da00";
5171
+ var DXOS_VERSION = "0.5.1-next.65aaa36";
5180
5172
  var getPlatform = () => {
5181
5173
  if (process.browser) {
5182
5174
  if (typeof window !== "undefined") {
@@ -5218,55 +5210,63 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
5218
5210
  },
5219
5211
  trace: import_tracing6.TRACE_PROCESSOR.getDiagnostics()
5220
5212
  };
5221
- await Promise.all([
5222
- (async () => {
5223
- (0, import_invariant16.invariant)(clientServices.LoggingService, "SystemService is not available.", {
5224
- F: __dxlog_file17,
5225
- L: 110,
5226
- S: void 0,
5227
- A: [
5228
- "clientServices.LoggingService",
5229
- "'SystemService is not available.'"
5230
- ]
5231
- });
5232
- diagnostics.metrics = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.LoggingService.queryMetrics({}), {
5233
- timeout: DEFAULT_TIMEOUT
5234
- }).catch(() => void 0);
5235
- })(),
5236
- (async () => {
5237
- diagnostics.storage = await (0, import_async17.asyncTimeout)(getStorageDiagnostics(), DEFAULT_TIMEOUT).catch(() => void 0);
5238
- })(),
5239
- async () => {
5240
- const identity = serviceContext.identityManager.identity;
5241
- if (identity) {
5242
- diagnostics.identity = {
5243
- identityKey: identity.identityKey,
5244
- spaceKey: identity.space.key,
5245
- profile: identity.profileDocument
5246
- };
5247
- const { devices } = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.DevicesService.queryDevices(), {
5248
- timeout: DEFAULT_TIMEOUT
5249
- }).catch(() => void 0) ?? {};
5250
- diagnostics.devices = devices;
5251
- if (serviceContext.dataSpaceManager) {
5252
- diagnostics.spaces = await Promise.all(Array.from(serviceContext.dataSpaceManager.spaces.values()).map((space) => getSpaceStats(space)) ?? []);
5253
- }
5254
- const { feeds = [] } = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.DevtoolsHost.subscribeToFeeds({}), {
5255
- timeout: DEFAULT_TIMEOUT
5256
- }).catch(() => void 0) ?? {};
5257
- diagnostics.feeds = feeds.map(({ feedKey, bytes, length }) => ({
5258
- feedKey,
5259
- bytes,
5260
- length
5261
- }));
5262
- const status = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.NetworkService.queryStatus(), {
5263
- timeout: DEFAULT_TIMEOUT
5264
- }).catch(() => void 0);
5265
- diagnostics.networkStatus = status;
5266
- diagnostics.swarms = serviceContext.networkManager.connectionLog?.swarms;
5213
+ {
5214
+ (0, import_invariant16.invariant)(clientServices.LoggingService, "SystemService is not available.", {
5215
+ F: __dxlog_file17,
5216
+ L: 108,
5217
+ S: void 0,
5218
+ A: [
5219
+ "clientServices.LoggingService",
5220
+ "'SystemService is not available.'"
5221
+ ]
5222
+ });
5223
+ diagnostics.metrics = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.LoggingService.queryMetrics({}), {
5224
+ timeout: DEFAULT_TIMEOUT
5225
+ }).catch(() => void 0);
5226
+ }
5227
+ if (typeof navigator !== "undefined" && navigator.storage) {
5228
+ const map = /* @__PURE__ */ new Map();
5229
+ const dir = await navigator.storage.getDirectory();
5230
+ for await (const filename of dir?.keys()) {
5231
+ const idx = filename.indexOf("-", filename.indexOf("-") + 1);
5232
+ if (idx === -1) {
5233
+ continue;
5267
5234
  }
5235
+ map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
5236
+ }
5237
+ diagnostics.storage = Array.from(map.entries()).sort((a, b) => b[1] - a[1]).map(([file, count]) => ({
5238
+ file,
5239
+ count
5240
+ }));
5241
+ }
5242
+ const identity = serviceContext.identityManager.identity;
5243
+ if (identity) {
5244
+ diagnostics.identity = {
5245
+ identityKey: identity.identityKey,
5246
+ spaceKey: identity.space.key,
5247
+ profile: identity.profileDocument
5248
+ };
5249
+ const { devices } = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.DevicesService.queryDevices(), {
5250
+ timeout: DEFAULT_TIMEOUT
5251
+ }).catch(() => void 0) ?? {};
5252
+ diagnostics.devices = devices;
5253
+ if (serviceContext.dataSpaceManager) {
5254
+ diagnostics.spaces = await Promise.all(Array.from(serviceContext.dataSpaceManager.spaces.values()).map((space) => getSpaceStats(space)) ?? []);
5268
5255
  }
5269
- ]);
5256
+ const { feeds = [] } = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.DevtoolsHost.subscribeToFeeds({}), {
5257
+ timeout: DEFAULT_TIMEOUT
5258
+ }).catch(() => void 0) ?? {};
5259
+ diagnostics.feeds = feeds.map(({ feedKey, bytes, length }) => ({
5260
+ feedKey,
5261
+ bytes,
5262
+ length
5263
+ }));
5264
+ const status = await (0, import_codec_protobuf11.getFirstStreamValue)(clientServices.NetworkService.queryStatus(), {
5265
+ timeout: DEFAULT_TIMEOUT
5266
+ }).catch(() => void 0);
5267
+ diagnostics.networkStatus = status;
5268
+ diagnostics.swarms = serviceContext.networkManager.connectionLog?.swarms;
5269
+ }
5270
5270
  diagnostics.config = config.values;
5271
5271
  return diagnostics;
5272
5272
  };
@@ -5274,7 +5274,7 @@ var getSpaceStats = async (space) => {
5274
5274
  const stats = {
5275
5275
  key: space.key,
5276
5276
  metrics: space.metrics,
5277
- epochs: space.inner.spaceState.credentials.filter((0, import_credentials19.credentialTypeFilter)("dxos.halo.credentials.Epoch")).map((credential) => ({
5277
+ epochs: space.inner.spaceState.credentials.filter((0, import_credentials16.credentialTypeFilter)("dxos.halo.credentials.Epoch")).map((credential) => ({
5278
5278
  ...credential.subject.assertion,
5279
5279
  id: credential.id
5280
5280
  })),
@@ -5303,24 +5303,6 @@ var getSpaceStats = async (space) => {
5303
5303
  }
5304
5304
  return stats;
5305
5305
  };
5306
- var getStorageDiagnostics = async () => {
5307
- if (typeof navigator === "undefined" || !navigator.storage) {
5308
- return void 0;
5309
- }
5310
- const map = /* @__PURE__ */ new Map();
5311
- const dir = await navigator.storage.getDirectory();
5312
- for await (const filename of dir?.keys()) {
5313
- const idx = filename.indexOf("-", filename.indexOf("-") + 1);
5314
- if (idx === -1) {
5315
- continue;
5316
- }
5317
- map.set(filename.slice(0, idx), (map.get(filename.slice(0, idx)) ?? 0) + 1);
5318
- }
5319
- return Array.from(map.entries()).sort((a, b) => b[1] - a[1]).map(([file, count]) => ({
5320
- file,
5321
- count
5322
- }));
5323
- };
5324
5306
  var createCollectDiagnosticsBroadcastSender = () => {
5325
5307
  return {
5326
5308
  broadcastDiagnosticsRequest: async () => void 0
@@ -5393,7 +5375,7 @@ var DevicesServiceImpl = class {
5393
5375
  presenceSubscribed = true;
5394
5376
  }
5395
5377
  };
5396
- const subscriptions = new import_async19.EventSubscriptions();
5378
+ const subscriptions = new import_async18.EventSubscriptions();
5397
5379
  if (this._identityManager.identity) {
5398
5380
  subscribeIdentity();
5399
5381
  subscribePresence();
@@ -5466,7 +5448,7 @@ _ts_decorate7([
5466
5448
  var isLocked = (lockPath) => import_lock_file.LockFile.isLocked(lockPath);
5467
5449
  var LoggingServiceImpl = class {
5468
5450
  constructor() {
5469
- this._logs = new import_async20.Event();
5451
+ this._logs = new import_async19.Event();
5470
5452
  this._started = Date.now();
5471
5453
  this._sessionId = import_keys14.PublicKey.random().toHex();
5472
5454
  this._logProcessor = (_config, entry2) => {
@@ -5743,7 +5725,7 @@ var ClientServicesHost = class {
5743
5725
  runtimeParams
5744
5726
  } = {}) {
5745
5727
  this._tracingService = import_tracing8.TRACE_PROCESSOR.createTraceSender();
5746
- this._statusUpdate = new import_async18.Event();
5728
+ this._statusUpdate = new import_async17.Event();
5747
5729
  this._opening = false;
5748
5730
  this._open = false;
5749
5731
  this._storage = storage;
@@ -6041,7 +6023,7 @@ var ClientServicesHost = class {
6041
6023
  S: this,
6042
6024
  C: (f, a) => f(...a)
6043
6025
  });
6044
- import_log15.log.info("resetting...", void 0, {
6026
+ (0, import_log15.log)("resetting...", void 0, {
6045
6027
  F: __dxlog_file20,
6046
6028
  L: 342,
6047
6029
  S: this,
@@ -6049,7 +6031,7 @@ var ClientServicesHost = class {
6049
6031
  });
6050
6032
  await this._serviceContext?.close();
6051
6033
  await this._storage.reset();
6052
- import_log15.log.info("reset", void 0, {
6034
+ (0, import_log15.log)("reset", void 0, {
6053
6035
  F: __dxlog_file20,
6054
6036
  L: 345,
6055
6037
  S: this,
@@ -6110,18 +6092,17 @@ _ts_decorate8([
6110
6092
  import_tracing8.trace.info()
6111
6093
  ], ClientServicesHost.prototype, "_open", void 0);
6112
6094
  _ts_decorate8([
6113
- import_async18.synchronized,
6095
+ import_async17.synchronized,
6114
6096
  import_tracing8.trace.span()
6115
6097
  ], ClientServicesHost.prototype, "open", null);
6116
6098
  _ts_decorate8([
6117
- import_async18.synchronized,
6099
+ import_async17.synchronized,
6118
6100
  import_tracing8.trace.span()
6119
6101
  ], ClientServicesHost.prototype, "close", null);
6120
6102
  ClientServicesHost = _ts_decorate8([
6121
6103
  import_tracing8.trace.resource()
6122
6104
  ], ClientServicesHost);
6123
6105
  var ClientServicesProviderResource = Symbol.for("dxos.resource.ClientServices");
6124
- var GET_DIAGNOSTICS_RPC_TIMEOUT = 1e4;
6125
6106
  var DiagnosticsCollector = class {
6126
6107
  static {
6127
6108
  this.broadcastSender = createCollectDiagnosticsBroadcastSender();
@@ -6129,8 +6110,6 @@ var DiagnosticsCollector = class {
6129
6110
  static async collect(config = findConfigs(), services = findSystemServiceProvider(), options = {}) {
6130
6111
  const serviceDiagnostics = await services?.services?.SystemService?.getDiagnostics({
6131
6112
  keys: options.humanize ? import_services15.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE : options.truncate ? import_services15.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE : void 0
6132
- }, {
6133
- timeout: GET_DIAGNOSTICS_RPC_TIMEOUT
6134
6113
  });
6135
6114
  const clientDiagnostics = {
6136
6115
  config,
@@ -6147,12 +6126,12 @@ var DiagnosticsCollector = class {
6147
6126
  }
6148
6127
  };
6149
6128
  var findSystemServiceProvider = () => {
6150
- const serviceProviders = import_tracing7.TRACE_PROCESSOR.findResourcesByAnnotation(ClientServicesProviderResource);
6129
+ const serviceProviders = import_tracing7.TRACE_PROCESSOR.findByAnnotation(ClientServicesProviderResource);
6151
6130
  const providerResource = serviceProviders.find((r) => r.instance.deref()?.services?.SystemService != null);
6152
6131
  return providerResource?.instance?.deref() ?? null;
6153
6132
  };
6154
6133
  var findConfigs = () => {
6155
- const configs = import_tracing7.TRACE_PROCESSOR.findResourcesByAnnotation(import_config.ConfigResource);
6134
+ const configs = import_tracing7.TRACE_PROCESSOR.findByAnnotation(import_config.ConfigResource);
6156
6135
  return configs.map((r) => r.instance.deref()).filter(import_util10.nonNullable);
6157
6136
  };
6158
6137
  // Annotate the CommonJS export names for ESM import in node:
@@ -6195,4 +6174,4 @@ var findConfigs = () => {
6195
6174
  subscribeToSpaces,
6196
6175
  subscribeToSwarmInfo
6197
6176
  });
6198
- //# sourceMappingURL=chunk-2PGHNVRY.cjs.map
6177
+ //# sourceMappingURL=chunk-ITFB7UCR.cjs.map