@dxos/client-services 0.3.11-main.cc2fe2c → 0.3.11-main.ccc0ca3

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 (35) hide show
  1. package/dist/lib/browser/{chunk-RGWEY4Z2.mjs → chunk-J4TEMIPQ.mjs} +81 -34
  2. package/dist/lib/browser/chunk-J4TEMIPQ.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-Q5PLF45D.cjs → chunk-2I5RUC6N.cjs} +160 -113
  7. package/dist/lib/node/chunk-2I5RUC6N.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +37 -37
  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/network/network-service.d.ts.map +1 -1
  12. package/dist/types/src/packlets/services/diagnostics.d.ts +1 -2
  13. package/dist/types/src/packlets/services/diagnostics.d.ts.map +1 -1
  14. package/dist/types/src/packlets/services/platform.d.ts +1 -14
  15. package/dist/types/src/packlets/services/platform.d.ts.map +1 -1
  16. package/dist/types/src/packlets/spaces/automerge-space-state.d.ts +2 -0
  17. package/dist/types/src/packlets/spaces/automerge-space-state.d.ts.map +1 -1
  18. package/dist/types/src/packlets/spaces/data-space-manager.d.ts.map +1 -1
  19. package/dist/types/src/packlets/spaces/data-space.d.ts +1 -0
  20. package/dist/types/src/packlets/spaces/data-space.d.ts.map +1 -1
  21. package/dist/types/src/packlets/system/system-service.d.ts +2 -1
  22. package/dist/types/src/packlets/system/system-service.d.ts.map +1 -1
  23. package/dist/types/src/version.d.ts +1 -1
  24. package/package.json +35 -35
  25. package/src/packlets/identity/identity-manager.ts +1 -1
  26. package/src/packlets/network/network-service.ts +1 -0
  27. package/src/packlets/services/diagnostics.ts +2 -1
  28. package/src/packlets/services/platform.ts +7 -19
  29. package/src/packlets/spaces/automerge-space-state.ts +4 -0
  30. package/src/packlets/spaces/data-space-manager.ts +5 -1
  31. package/src/packlets/spaces/data-space.ts +21 -1
  32. package/src/packlets/system/system-service.ts +6 -0
  33. package/src/version.ts +1 -1
  34. package/dist/lib/browser/chunk-RGWEY4Z2.mjs.map +0 -7
  35. package/dist/lib/node/chunk-Q5PLF45D.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_Q5PLF45D_exports = {};
30
- __export(chunk_Q5PLF45D_exports, {
29
+ var chunk_2I5RUC6N_exports = {};
30
+ __export(chunk_2I5RUC6N_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -60,7 +60,7 @@ __export(chunk_Q5PLF45D_exports, {
60
60
  subscribeToSpaces: () => subscribeToSpaces,
61
61
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
62
62
  });
63
- module.exports = __toCommonJS(chunk_Q5PLF45D_exports);
63
+ module.exports = __toCommonJS(chunk_2I5RUC6N_exports);
64
64
  var import_async = require("@dxos/async");
65
65
  var import_codec_protobuf = require("@dxos/codec-protobuf");
66
66
  var import_feed_store = require("@dxos/feed-store");
@@ -153,15 +153,17 @@ var import_invariant9 = require("@dxos/invariant");
153
153
  var import_log8 = require("@dxos/log");
154
154
  var import_protocols7 = require("@dxos/protocols");
155
155
  var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
156
+ var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
156
157
  var import_async10 = require("@dxos/async");
157
158
  var import_client_protocol3 = require("@dxos/client-protocol");
158
159
  var import_context6 = require("@dxos/context");
159
160
  var import_debug4 = require("@dxos/debug");
160
161
  var import_echo_pipeline = require("@dxos/echo-pipeline");
162
+ var import_invariant10 = require("@dxos/invariant");
161
163
  var import_keys7 = require("@dxos/keys");
162
164
  var import_log9 = require("@dxos/log");
163
165
  var import_protocols8 = require("@dxos/protocols");
164
- var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
166
+ var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
165
167
  var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
166
168
  var import_timeframe2 = require("@dxos/timeframe");
167
169
  var import_tracing4 = require("@dxos/tracing");
@@ -169,7 +171,7 @@ var import_util4 = require("@dxos/util");
169
171
  var import_credentials11 = require("@dxos/credentials");
170
172
  var import_async11 = require("@dxos/async");
171
173
  var import_context7 = require("@dxos/context");
172
- var import_invariant10 = require("@dxos/invariant");
174
+ var import_invariant11 = require("@dxos/invariant");
173
175
  var import_keys8 = require("@dxos/keys");
174
176
  var import_log10 = require("@dxos/log");
175
177
  var import_protocols9 = require("@dxos/protocols");
@@ -178,11 +180,11 @@ var import_util5 = require("@dxos/util");
178
180
  var import_async12 = require("@dxos/async");
179
181
  var import_context8 = require("@dxos/context");
180
182
  var import_credentials12 = require("@dxos/credentials");
181
- var import_invariant11 = require("@dxos/invariant");
183
+ var import_invariant12 = require("@dxos/invariant");
182
184
  var import_keys9 = require("@dxos/keys");
183
185
  var import_log11 = require("@dxos/log");
184
186
  var import_protocols10 = require("@dxos/protocols");
185
- var import_services8 = require("@dxos/protocols/proto/dxos/client/services");
187
+ var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
186
188
  var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
187
189
  var import_util6 = require("@dxos/util");
188
190
  var import_credentials13 = require("@dxos/credentials");
@@ -192,26 +194,26 @@ var import_timeframe3 = require("@dxos/timeframe");
192
194
  var import_async13 = require("@dxos/async");
193
195
  var import_codec_protobuf11 = require("@dxos/codec-protobuf");
194
196
  var import_debug6 = require("@dxos/debug");
195
- var import_invariant12 = require("@dxos/invariant");
197
+ var import_invariant13 = require("@dxos/invariant");
196
198
  var import_log12 = require("@dxos/log");
197
199
  var import_protocols11 = require("@dxos/protocols");
198
- var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
200
+ var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
199
201
  var import_async14 = require("@dxos/async");
200
202
  var import_context9 = require("@dxos/context");
201
203
  var import_credentials15 = require("@dxos/credentials");
202
204
  var import_debug7 = require("@dxos/debug");
203
205
  var import_echo_pipeline2 = require("@dxos/echo-pipeline");
204
206
  var import_feed_store4 = require("@dxos/feed-store");
205
- var import_invariant13 = require("@dxos/invariant");
207
+ var import_invariant14 = require("@dxos/invariant");
206
208
  var import_keyring = require("@dxos/keyring");
207
209
  var import_keys10 = require("@dxos/keys");
208
210
  var import_log13 = require("@dxos/log");
209
211
  var import_protocols12 = require("@dxos/protocols");
210
- var import_services10 = require("@dxos/protocols/proto/dxos/client/services");
212
+ var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
211
213
  var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
212
214
  var import_tracing5 = require("@dxos/tracing");
213
215
  var import_util7 = require("@dxos/util");
214
- var import_invariant14 = require("@dxos/invariant");
216
+ var import_invariant15 = require("@dxos/invariant");
215
217
  var import_lock_file = require("@dxos/lock-file");
216
218
  var import_log14 = require("@dxos/log");
217
219
  var import_client_protocol4 = require("@dxos/client-protocol");
@@ -225,28 +227,28 @@ var import_context10 = require("@dxos/context");
225
227
  var import_document_model2 = require("@dxos/document-model");
226
228
  var import_echo_pipeline3 = require("@dxos/echo-pipeline");
227
229
  var import_echo_schema = require("@dxos/echo-schema");
228
- var import_invariant15 = require("@dxos/invariant");
230
+ var import_invariant16 = require("@dxos/invariant");
229
231
  var import_keys11 = require("@dxos/keys");
230
232
  var import_log15 = require("@dxos/log");
231
233
  var import_messaging = require("@dxos/messaging");
232
234
  var import_model_factory = require("@dxos/model-factory");
233
235
  var import_network_manager2 = require("@dxos/network-manager");
234
236
  var import_protocols14 = require("@dxos/protocols");
235
- var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
237
+ var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
236
238
  var import_text_model = require("@dxos/text-model");
237
239
  var import_tracing6 = require("@dxos/tracing");
238
240
  var import_websocket_rpc = require("@dxos/websocket-rpc");
239
241
  var import_async16 = require("@dxos/async");
240
242
  var import_codec_protobuf12 = require("@dxos/codec-protobuf");
241
- var import_services12 = require("@dxos/protocols/proto/dxos/client/services");
243
+ var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
242
244
  var import_async17 = require("@dxos/async");
243
245
  var import_codec_protobuf13 = require("@dxos/codec-protobuf");
244
246
  var import_log16 = require("@dxos/log");
245
- var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
247
+ var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
246
248
  var import_util9 = require("@dxos/util");
247
249
  var import_codec_protobuf14 = require("@dxos/codec-protobuf");
248
250
  var import_codec_protobuf15 = require("@dxos/codec-protobuf");
249
- var import_services14 = require("@dxos/protocols/proto/dxos/client/services");
251
+ var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
250
252
  var import_util10 = require("@dxos/util");
251
253
  var subscribeToFeeds = ({ feedStore }, { feedKeys }) => {
252
254
  return new import_codec_protobuf.Stream(({ next }) => {
@@ -1176,7 +1178,7 @@ var IdentityManager = class {
1176
1178
  genesisFeedKey: spaceRecord.genesisFeedKey
1177
1179
  },
1178
1180
  swarmIdentity,
1179
- onNetworkConnection: () => {
1181
+ onAuthorizedConnection: () => {
1180
1182
  },
1181
1183
  onAuthFailure: () => {
1182
1184
  import_log3.log.warn("auth failure", void 0, {
@@ -2650,28 +2652,29 @@ var getPlatform = () => {
2650
2652
  if (typeof window !== "undefined") {
2651
2653
  const { userAgent } = window.navigator;
2652
2654
  return {
2653
- type: "browser",
2655
+ type: import_services7.Platform.PLATFORM_TYPE.BROWSER,
2654
2656
  userAgent,
2655
2657
  uptime: Math.floor((Date.now() - window.performance.timeOrigin) / 1e3)
2656
2658
  };
2657
2659
  } else {
2658
2660
  return {
2659
- type: "shared-worker",
2661
+ type: import_services7.Platform.PLATFORM_TYPE.SHARED_WORKER,
2660
2662
  uptime: Math.floor((Date.now() - performance.timeOrigin) / 1e3)
2661
2663
  };
2662
2664
  }
2663
2665
  } else {
2664
2666
  const { platform: platform2, version, arch } = process;
2665
2667
  return {
2666
- type: "node",
2667
- platform: `${platform2} ${version} ${arch}`,
2668
- runtime: process.version,
2668
+ type: import_services7.Platform.PLATFORM_TYPE.NODE,
2669
+ platform: platform2,
2670
+ arch,
2671
+ runtime: version,
2669
2672
  uptime: Math.floor(process.uptime()),
2670
2673
  memory: process.memoryUsage()
2671
2674
  };
2672
2675
  }
2673
2676
  };
2674
- var DXOS_VERSION = "0.3.11-main.cc2fe2c";
2677
+ var DXOS_VERSION = "0.3.11-main.ccc0ca3";
2675
2678
  var __dxlog_file10 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/services/diagnostics.ts";
2676
2679
  var DEFAULT_TIMEOUT = 1e3;
2677
2680
  var createDiagnostics = async (clientServices, serviceContext, config) => {
@@ -2688,7 +2691,7 @@ var createDiagnostics = async (clientServices, serviceContext, config) => {
2688
2691
  {
2689
2692
  (0, import_invariant9.invariant)(clientServices.LoggingService, "SystemService is not available.", {
2690
2693
  F: __dxlog_file10,
2691
- L: 93,
2694
+ L: 94,
2692
2695
  S: void 0,
2693
2696
  A: [
2694
2697
  "clientServices.LoggingService",
@@ -2754,7 +2757,7 @@ var getProperties = (space) => {
2754
2757
  } catch (err) {
2755
2758
  import_log8.log.warn(err.message, void 0, {
2756
2759
  F: __dxlog_file10,
2757
- L: 178,
2760
+ L: 179,
2758
2761
  S: void 0,
2759
2762
  C: (f, a) => f(...a)
2760
2763
  });
@@ -2809,7 +2812,8 @@ var getSpaceStats = async (space) => {
2809
2812
  return stats;
2810
2813
  };
2811
2814
  var AutomergeSpaceState = class {
2812
- constructor() {
2815
+ constructor(_onNewRoot) {
2816
+ this._onNewRoot = _onNewRoot;
2813
2817
  this.rootUrl = void 0;
2814
2818
  this.lastEpoch = void 0;
2815
2819
  }
@@ -2820,6 +2824,7 @@ var AutomergeSpaceState = class {
2820
2824
  this.lastEpoch = credential;
2821
2825
  if (credential.subject.assertion.automergeRoot) {
2822
2826
  this.rootUrl = credential.subject.assertion.automergeRoot;
2827
+ this._onNewRoot(this.rootUrl);
2823
2828
  }
2824
2829
  }
2825
2830
  };
@@ -2856,7 +2861,7 @@ var NotarizationPlugin = class {
2856
2861
  S: this,
2857
2862
  C: (f, a) => f(...a)
2858
2863
  });
2859
- (0, import_invariant10.invariant)(credentials.every((credential) => credential.id), "Credentials must have an id", {
2864
+ (0, import_invariant11.invariant)(credentials.every((credential) => credential.id), "Credentials must have an id", {
2860
2865
  F: __dxlog_file11,
2861
2866
  L: 91,
2862
2867
  S: this,
@@ -2981,7 +2986,7 @@ var NotarizationPlugin = class {
2981
2986
  this._processCredentialsTriggers.delete(credential.id);
2982
2987
  }
2983
2988
  setWriter(writer) {
2984
- (0, import_invariant10.invariant)(!this._writer, "Writer already set.", {
2989
+ (0, import_invariant11.invariant)(!this._writer, "Writer already set.", {
2985
2990
  F: __dxlog_file11,
2986
2991
  L: 181,
2987
2992
  S: this,
@@ -3006,7 +3011,7 @@ var NotarizationPlugin = class {
3006
3011
  throw new Error(WRITER_NOT_SET_ERROR_CODE);
3007
3012
  }
3008
3013
  for (const credential of request.credentials ?? []) {
3009
- (0, import_invariant10.invariant)(credential.id, "Credential must have an id", {
3014
+ (0, import_invariant11.invariant)(credential.id, "Credential must have an id", {
3010
3015
  F: __dxlog_file11,
3011
3016
  L: 200,
3012
3017
  S: this,
@@ -3098,8 +3103,8 @@ var DataSpace = class {
3098
3103
  this._ctx = new import_context6.Context();
3099
3104
  this._notarizationPlugin = new NotarizationPlugin();
3100
3105
  this._cache = void 0;
3101
- this._automergeSpaceState = new AutomergeSpaceState();
3102
- this._state = import_services7.SpaceState.CLOSED;
3106
+ this._automergeSpaceState = new AutomergeSpaceState((rootUrl) => this._onNewAutomergeRoot(rootUrl));
3107
+ this._state = import_services8.SpaceState.CLOSED;
3103
3108
  this.error = void 0;
3104
3109
  this.stateUpdate = new import_async10.Event();
3105
3110
  this.metrics = {};
@@ -3121,10 +3126,10 @@ var DataSpace = class {
3121
3126
  this._cache = params.cache;
3122
3127
  this._state = params.initialState;
3123
3128
  (0, import_log9.log)("new state", {
3124
- state: import_services7.SpaceState[this._state]
3129
+ state: import_services8.SpaceState[this._state]
3125
3130
  }, {
3126
3131
  F: __dxlog_file12,
3127
- L: 137,
3132
+ L: 138,
3128
3133
  S: this,
3129
3134
  C: (f, a) => f(...a)
3130
3135
  });
@@ -3166,12 +3171,12 @@ var DataSpace = class {
3166
3171
  await this._inner.spaceState.addCredentialProcessor(this._notarizationPlugin);
3167
3172
  await this._inner.spaceState.addCredentialProcessor(this._automergeSpaceState);
3168
3173
  await this._inner.open(new import_context6.Context());
3169
- this._state = import_services7.SpaceState.CONTROL_ONLY;
3174
+ this._state = import_services8.SpaceState.CONTROL_ONLY;
3170
3175
  (0, import_log9.log)("new state", {
3171
- state: import_services7.SpaceState[this._state]
3176
+ state: import_services8.SpaceState[this._state]
3172
3177
  }, {
3173
3178
  F: __dxlog_file12,
3174
- L: 189,
3179
+ L: 190,
3175
3180
  S: this,
3176
3181
  C: (f, a) => f(...a)
3177
3182
  });
@@ -3184,12 +3189,12 @@ var DataSpace = class {
3184
3189
  }
3185
3190
  async _close() {
3186
3191
  await this._callbacks.beforeClose?.();
3187
- this._state = import_services7.SpaceState.CLOSED;
3192
+ this._state = import_services8.SpaceState.CLOSED;
3188
3193
  (0, import_log9.log)("new state", {
3189
- state: import_services7.SpaceState[this._state]
3194
+ state: import_services8.SpaceState[this._state]
3190
3195
  }, {
3191
3196
  F: __dxlog_file12,
3192
- L: 203,
3197
+ L: 204,
3193
3198
  S: this,
3194
3199
  C: (f, a) => f(...a)
3195
3200
  });
@@ -3221,7 +3226,7 @@ var DataSpace = class {
3221
3226
  if (err instanceof import_protocols8.CancelledError) {
3222
3227
  (0, import_log9.log)("data pipeline initialization cancelled", err, {
3223
3228
  F: __dxlog_file12,
3224
- L: 236,
3229
+ L: 237,
3225
3230
  S: this,
3226
3231
  C: (f, a) => f(...a)
3227
3232
  });
@@ -3229,16 +3234,16 @@ var DataSpace = class {
3229
3234
  }
3230
3235
  import_log9.log.error("Error initializing data pipeline", err, {
3231
3236
  F: __dxlog_file12,
3232
- L: 240,
3237
+ L: 241,
3233
3238
  S: this,
3234
3239
  C: (f, a) => f(...a)
3235
3240
  });
3236
- this._state = import_services7.SpaceState.ERROR;
3241
+ this._state = import_services8.SpaceState.ERROR;
3237
3242
  (0, import_log9.log)("new state", {
3238
- state: import_services7.SpaceState[this._state]
3243
+ state: import_services8.SpaceState[this._state]
3239
3244
  }, {
3240
3245
  F: __dxlog_file12,
3241
- L: 242,
3246
+ L: 243,
3242
3247
  S: this,
3243
3248
  C: (f, a) => f(...a)
3244
3249
  });
@@ -3250,15 +3255,15 @@ var DataSpace = class {
3250
3255
  });
3251
3256
  }
3252
3257
  async initializeDataPipeline() {
3253
- if (this._state !== import_services7.SpaceState.CONTROL_ONLY) {
3258
+ if (this._state !== import_services8.SpaceState.CONTROL_ONLY) {
3254
3259
  throw new import_protocols8.SystemError("Invalid operation");
3255
3260
  }
3256
- this._state = import_services7.SpaceState.INITIALIZING;
3261
+ this._state = import_services8.SpaceState.INITIALIZING;
3257
3262
  (0, import_log9.log)("new state", {
3258
- state: import_services7.SpaceState[this._state]
3263
+ state: import_services8.SpaceState[this._state]
3259
3264
  }, {
3260
3265
  F: __dxlog_file12,
3261
- L: 258,
3266
+ L: 259,
3262
3267
  S: this,
3263
3268
  C: (f, a) => f(...a)
3264
3269
  });
@@ -3269,7 +3274,7 @@ var DataSpace = class {
3269
3274
  await (0, import_context6.cancelWithContext)(this._ctx, this._inner.dataPipeline.ensureEpochInitialized());
3270
3275
  (0, import_log9.log)("waiting for data pipeline to reach target timeframe", void 0, {
3271
3276
  F: __dxlog_file12,
3272
- L: 272,
3277
+ L: 273,
3273
3278
  S: this,
3274
3279
  C: (f, a) => f(...a)
3275
3280
  });
@@ -3280,17 +3285,17 @@ var DataSpace = class {
3280
3285
  this.metrics.dataPipelineReady = /* @__PURE__ */ new Date();
3281
3286
  (0, import_log9.log)("data pipeline ready", void 0, {
3282
3287
  F: __dxlog_file12,
3283
- L: 281,
3288
+ L: 282,
3284
3289
  S: this,
3285
3290
  C: (f, a) => f(...a)
3286
3291
  });
3287
3292
  await this._callbacks.beforeReady?.();
3288
- this._state = import_services7.SpaceState.READY;
3293
+ this._state = import_services8.SpaceState.READY;
3289
3294
  (0, import_log9.log)("new state", {
3290
- state: import_services7.SpaceState[this._state]
3295
+ state: import_services8.SpaceState[this._state]
3291
3296
  }, {
3292
3297
  F: __dxlog_file12,
3293
- L: 285,
3298
+ L: 286,
3294
3299
  S: this,
3295
3300
  C: (f, a) => f(...a)
3296
3301
  });
@@ -3306,7 +3311,7 @@ var DataSpace = class {
3306
3311
  await this._createWritableFeeds();
3307
3312
  (0, import_log9.log)("writable feeds created", void 0, {
3308
3313
  F: __dxlog_file12,
3309
- L: 301,
3314
+ L: 302,
3310
3315
  S: this,
3311
3316
  C: (f, a) => f(...a)
3312
3317
  });
@@ -3363,6 +3368,40 @@ var DataSpace = class {
3363
3368
  await this._metadataStore.setWritableFeedKeys(this.key, this.inner.controlFeedKey, this.inner.dataFeedKey);
3364
3369
  }
3365
3370
  }
3371
+ _onNewAutomergeRoot(rootUrl) {
3372
+ import_log9.log.info("loading automerge root doc for space", {
3373
+ space: this.key,
3374
+ rootUrl
3375
+ }, {
3376
+ F: __dxlog_file12,
3377
+ L: 368,
3378
+ S: this,
3379
+ C: (f, a) => f(...a)
3380
+ });
3381
+ const handle = this._automergeHost.repo.find(rootUrl);
3382
+ queueMicrotask(async () => {
3383
+ try {
3384
+ await handle.whenReady();
3385
+ const doc = handle.docSync() ?? (0, import_invariant10.failedInvariant)();
3386
+ if (!doc.experimental_spaceKey) {
3387
+ handle.change((doc2) => {
3388
+ doc2.experimental_spaceKey = this.key.toHex();
3389
+ });
3390
+ }
3391
+ } catch (err) {
3392
+ import_log9.log.warn("error loading automerge root doc", {
3393
+ space: this.key,
3394
+ rootUrl,
3395
+ err
3396
+ }, {
3397
+ F: __dxlog_file12,
3398
+ L: 381,
3399
+ S: this,
3400
+ C: (f, a) => f(...a)
3401
+ });
3402
+ }
3403
+ });
3404
+ }
3366
3405
  // TODO(dmaretskyi): Use profile from signing context.
3367
3406
  async updateOwnProfile(profile) {
3368
3407
  const credential = await this._signingContext.credentialSigner.createCredential({
@@ -3382,12 +3421,12 @@ var DataSpace = class {
3382
3421
  let epoch;
3383
3422
  switch (options?.migration) {
3384
3423
  case void 0:
3385
- case import_services7.CreateEpochRequest.Migration.NONE:
3424
+ case import_services8.CreateEpochRequest.Migration.NONE:
3386
3425
  {
3387
3426
  epoch = await this.dataPipeline.createEpoch();
3388
3427
  }
3389
3428
  break;
3390
- case import_services7.CreateEpochRequest.Migration.INIT_AUTOMERGE: {
3429
+ case import_services8.CreateEpochRequest.Migration.INIT_AUTOMERGE: {
3391
3430
  const document = this._automergeHost.repo.create();
3392
3431
  epoch = {
3393
3432
  previousId: this._automergeSpaceState.lastEpoch?.id,
@@ -3428,25 +3467,25 @@ var DataSpace = class {
3428
3467
  }
3429
3468
  }
3430
3469
  async activate() {
3431
- if (this._state !== import_services7.SpaceState.INACTIVE) {
3470
+ if (this._state !== import_services8.SpaceState.INACTIVE) {
3432
3471
  return;
3433
3472
  }
3434
- await this._metadataStore.setSpaceState(this.key, import_services7.SpaceState.ACTIVE);
3473
+ await this._metadataStore.setSpaceState(this.key, import_services8.SpaceState.ACTIVE);
3435
3474
  await this._open();
3436
3475
  this.initializeDataPipelineAsync();
3437
3476
  }
3438
3477
  async deactivate() {
3439
- if (this._state === import_services7.SpaceState.INACTIVE) {
3478
+ if (this._state === import_services8.SpaceState.INACTIVE) {
3440
3479
  return;
3441
3480
  }
3442
- await this._metadataStore.setSpaceState(this.key, import_services7.SpaceState.INACTIVE);
3481
+ await this._metadataStore.setSpaceState(this.key, import_services8.SpaceState.INACTIVE);
3443
3482
  await this._close();
3444
- this._state = import_services7.SpaceState.INACTIVE;
3483
+ this._state = import_services8.SpaceState.INACTIVE;
3445
3484
  (0, import_log9.log)("new state", {
3446
- state: import_services7.SpaceState[this._state]
3485
+ state: import_services8.SpaceState[this._state]
3447
3486
  }, {
3448
3487
  F: __dxlog_file12,
3449
- L: 450,
3488
+ L: 470,
3450
3489
  S: this,
3451
3490
  C: (f, a) => f(...a)
3452
3491
  });
@@ -3626,7 +3665,7 @@ var DataSpaceManager = class {
3626
3665
  this._isOpen = true;
3627
3666
  this.updated.emit();
3628
3667
  for (const space of this._spaces.values()) {
3629
- if (space.state !== import_services8.SpaceState.INACTIVE) {
3668
+ if (space.state !== import_services9.SpaceState.INACTIVE) {
3630
3669
  space.initializeDataPipelineAsync();
3631
3670
  }
3632
3671
  }
@@ -3656,7 +3695,7 @@ var DataSpaceManager = class {
3656
3695
  * Creates a new space writing the genesis credentials to the control feed.
3657
3696
  */
3658
3697
  async createSpace() {
3659
- (0, import_invariant11.invariant)(this._isOpen, "Not open.", {
3698
+ (0, import_invariant12.invariant)(this._isOpen, "Not open.", {
3660
3699
  F: __dxlog_file13,
3661
3700
  L: 130,
3662
3701
  S: this,
@@ -3673,7 +3712,7 @@ var DataSpaceManager = class {
3673
3712
  genesisFeedKey: controlFeedKey,
3674
3713
  controlFeedKey,
3675
3714
  dataFeedKey,
3676
- state: import_services8.SpaceState.ACTIVE
3715
+ state: import_services9.SpaceState.ACTIVE
3677
3716
  };
3678
3717
  (0, import_log11.log)("creating space...", {
3679
3718
  spaceKey
@@ -3685,12 +3724,15 @@ var DataSpaceManager = class {
3685
3724
  });
3686
3725
  const space = await this._constructSpace(metadata);
3687
3726
  const automergeRoot = this._automergeHost.repo.create();
3727
+ automergeRoot.change((doc) => {
3728
+ doc.experimental_spaceKey = spaceKey.toHex();
3729
+ });
3688
3730
  const credentials = await spaceGenesis(this._keyring, this._signingContext, space.inner, automergeRoot.url);
3689
3731
  await this._metadataStore.addSpace(metadata);
3690
3732
  const memberCredential = credentials[1];
3691
- (0, import_invariant11.invariant)((0, import_credentials12.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
3733
+ (0, import_invariant12.invariant)((0, import_credentials12.getCredentialAssertion)(memberCredential)["@type"] === "dxos.halo.credentials.SpaceMember", void 0, {
3692
3734
  F: __dxlog_file13,
3693
- L: 151,
3735
+ L: 154,
3694
3736
  S: this,
3695
3737
  A: [
3696
3738
  "getCredentialAssertion(memberCredential)['@type'] === 'dxos.halo.credentials.SpaceMember'",
@@ -3708,22 +3750,22 @@ var DataSpaceManager = class {
3708
3750
  opts
3709
3751
  }, {
3710
3752
  F: __dxlog_file13,
3711
- L: 163,
3753
+ L: 166,
3712
3754
  S: this,
3713
3755
  C: (f, a) => f(...a)
3714
3756
  });
3715
- (0, import_invariant11.invariant)(this._isOpen, "Not open.", {
3757
+ (0, import_invariant12.invariant)(this._isOpen, "Not open.", {
3716
3758
  F: __dxlog_file13,
3717
- L: 164,
3759
+ L: 167,
3718
3760
  S: this,
3719
3761
  A: [
3720
3762
  "this._isOpen",
3721
3763
  "'Not open.'"
3722
3764
  ]
3723
3765
  });
3724
- (0, import_invariant11.invariant)(!this._spaces.has(opts.spaceKey), "Space already exists.", {
3766
+ (0, import_invariant12.invariant)(!this._spaces.has(opts.spaceKey), "Space already exists.", {
3725
3767
  F: __dxlog_file13,
3726
- L: 165,
3768
+ L: 168,
3727
3769
  S: this,
3728
3770
  A: [
3729
3771
  "!this._spaces.has(opts.spaceKey)",
@@ -3750,7 +3792,7 @@ var DataSpaceManager = class {
3750
3792
  async waitUntilSpaceReady(spaceKey) {
3751
3793
  await (0, import_context8.cancelWithContext)(this._ctx, this.updated.waitForCondition(() => {
3752
3794
  const space = this._spaces.get(spaceKey);
3753
- return !!space && space.state === import_services8.SpaceState.READY;
3795
+ return !!space && space.state === import_services9.SpaceState.READY;
3754
3796
  }));
3755
3797
  }
3756
3798
  async _constructSpace(metadata) {
@@ -3758,7 +3800,7 @@ var DataSpaceManager = class {
3758
3800
  metadata
3759
3801
  }, {
3760
3802
  F: __dxlog_file13,
3761
- L: 198,
3803
+ L: 201,
3762
3804
  S: this,
3763
3805
  C: (f, a) => f(...a)
3764
3806
  });
@@ -3785,17 +3827,18 @@ var DataSpaceManager = class {
3785
3827
  credentialProvider: createAuthProvider(this._signingContext.credentialSigner),
3786
3828
  credentialAuthenticator: (0, import_util6.deferFunction)(() => dataSpace.authVerifier.verifier)
3787
3829
  },
3788
- onNetworkConnection: (session) => {
3830
+ onAuthorizedConnection: (session) => {
3789
3831
  session.addExtension("dxos.mesh.teleport.gossip", gossip.createExtension({
3790
3832
  remotePeerId: session.remotePeerId
3791
3833
  }));
3792
3834
  session.addExtension("dxos.mesh.teleport.notarization", dataSpace.notarizationPlugin.createExtension());
3835
+ this._automergeHost.authorizeDevice(space.key, session.remotePeerId);
3793
3836
  session.addExtension("dxos.mesh.teleport.automerge", this._automergeHost.createExtension());
3794
3837
  },
3795
3838
  onAuthFailure: () => {
3796
3839
  import_log11.log.warn("auth failure", void 0, {
3797
3840
  F: __dxlog_file13,
3798
- L: 234,
3841
+ L: 238,
3799
3842
  S: this,
3800
3843
  C: (f, a) => f(...a)
3801
3844
  });
@@ -3806,7 +3849,7 @@ var DataSpaceManager = class {
3806
3849
  dataFeed && space.setDataFeed(dataFeed);
3807
3850
  const dataSpace = new DataSpace({
3808
3851
  inner: space,
3809
- initialState: metadata.state === import_services8.SpaceState.INACTIVE ? import_services8.SpaceState.INACTIVE : import_services8.SpaceState.CLOSED,
3852
+ initialState: metadata.state === import_services9.SpaceState.INACTIVE ? import_services9.SpaceState.INACTIVE : import_services9.SpaceState.CLOSED,
3810
3853
  metadataStore: this._metadataStore,
3811
3854
  gossip,
3812
3855
  presence,
@@ -3819,7 +3862,7 @@ var DataSpaceManager = class {
3819
3862
  space: space.key
3820
3863
  }, {
3821
3864
  F: __dxlog_file13,
3822
- L: 252,
3865
+ L: 256,
3823
3866
  S: this,
3824
3867
  C: (f, a) => f(...a)
3825
3868
  });
@@ -3831,7 +3874,7 @@ var DataSpaceManager = class {
3831
3874
  open: this._isOpen
3832
3875
  }, {
3833
3876
  F: __dxlog_file13,
3834
- L: 259,
3877
+ L: 263,
3835
3878
  S: this,
3836
3879
  C: (f, a) => f(...a)
3837
3880
  });
@@ -3844,7 +3887,7 @@ var DataSpaceManager = class {
3844
3887
  space: space.key
3845
3888
  }, {
3846
3889
  F: __dxlog_file13,
3847
- L: 265,
3890
+ L: 269,
3848
3891
  S: this,
3849
3892
  C: (f, a) => f(...a)
3850
3893
  });
@@ -3854,7 +3897,7 @@ var DataSpaceManager = class {
3854
3897
  cache: metadata.cache,
3855
3898
  automergeHost: this._automergeHost
3856
3899
  });
3857
- if (metadata.state !== import_services8.SpaceState.INACTIVE) {
3900
+ if (metadata.state !== import_services9.SpaceState.INACTIVE) {
3858
3901
  await dataSpace.open();
3859
3902
  }
3860
3903
  if (metadata.controlTimeframe) {
@@ -3903,10 +3946,10 @@ var SpacesServiceImpl = class {
3903
3946
  const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug6.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
3904
3947
  if (state) {
3905
3948
  switch (state) {
3906
- case import_services9.SpaceState.ACTIVE:
3949
+ case import_services10.SpaceState.ACTIVE:
3907
3950
  await space.activate();
3908
3951
  break;
3909
- case import_services9.SpaceState.INACTIVE:
3952
+ case import_services10.SpaceState.INACTIVE:
3910
3953
  await space.deactivate();
3911
3954
  break;
3912
3955
  default:
@@ -4007,7 +4050,7 @@ var SpacesServiceImpl = class {
4007
4050
  }
4008
4051
  });
4009
4052
  } else {
4010
- (0, import_invariant12.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
4053
+ (0, import_invariant13.invariant)(!credential.id, "Id on unsigned credentials is not allowed", {
4011
4054
  F: __dxlog_file14,
4012
4055
  L: 168,
4013
4056
  S: this,
@@ -4016,7 +4059,7 @@ var SpacesServiceImpl = class {
4016
4059
  "'Id on unsigned credentials is not allowed'"
4017
4060
  ]
4018
4061
  });
4019
- (0, import_invariant12.invariant)(this._identityManager.identity, "Identity is not available", {
4062
+ (0, import_invariant13.invariant)(this._identityManager.identity, "Identity is not available", {
4020
4063
  F: __dxlog_file14,
4021
4064
  L: 169,
4022
4065
  S: this,
@@ -4026,7 +4069,7 @@ var SpacesServiceImpl = class {
4026
4069
  ]
4027
4070
  });
4028
4071
  const signer = this._identityManager.identity.getIdentityCredentialSigner();
4029
- (0, import_invariant12.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
4072
+ (0, import_invariant13.invariant)(credential.issuer.equals(signer.getIssuer()), void 0, {
4030
4073
  F: __dxlog_file14,
4031
4074
  L: 171,
4032
4075
  S: this,
@@ -4083,7 +4126,7 @@ var SpacesServiceImpl = class {
4083
4126
  displayName: member.profile?.displayName
4084
4127
  }
4085
4128
  },
4086
- presence: member.removed ? import_services9.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services9.SpaceMember.PresenceState.ONLINE : import_services9.SpaceMember.PresenceState.OFFLINE,
4129
+ presence: member.removed ? import_services10.SpaceMember.PresenceState.REMOVED : isMe || peers.length > 0 ? import_services10.SpaceMember.PresenceState.ONLINE : import_services10.SpaceMember.PresenceState.OFFLINE,
4087
4130
  peerStates: peers
4088
4131
  };
4089
4132
  }),
@@ -4140,7 +4183,7 @@ var ServiceContext = class {
4140
4183
  this.identityManager = new IdentityManager(this.metadataStore, this.keyring, this.feedStore, this.spaceManager);
4141
4184
  this.automergeHost = new import_echo_pipeline2.AutomergeHost(storage.createDirectory("automerge"));
4142
4185
  this.invitations = new InvitationsHandler(this.networkManager);
4143
- this._handlerFactories.set(import_services10.Invitation.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? (0, import_debug7.failUndefined)(), this._acceptIdentity.bind(this)));
4186
+ this._handlerFactories.set(import_services11.Invitation.Kind.DEVICE, () => new DeviceInvitationProtocol(this.keyring, () => this.identityManager.identity ?? (0, import_debug7.failUndefined)(), this._acceptIdentity.bind(this)));
4144
4187
  }
4145
4188
  async open(ctx) {
4146
4189
  await this._checkStorageVersion();
@@ -4214,7 +4257,7 @@ var ServiceContext = class {
4214
4257
  }
4215
4258
  getInvitationHandler(invitation) {
4216
4259
  const factory = this._handlerFactories.get(invitation.kind);
4217
- (0, import_invariant13.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
4260
+ (0, import_invariant14.invariant)(factory, `Unknown invitation kind: ${invitation.kind}`, {
4218
4261
  F: __dxlog_file15,
4219
4262
  L: 173,
4220
4263
  S: this,
@@ -4268,8 +4311,8 @@ var ServiceContext = class {
4268
4311
  };
4269
4312
  this.dataSpaceManager = new DataSpaceManager(this.spaceManager, this.metadataStore, this.dataServiceSubscriptions, this.keyring, signingContext, this.feedStore, this.automergeHost);
4270
4313
  await this.dataSpaceManager.open();
4271
- this._handlerFactories.set(import_services10.Invitation.Kind.SPACE, (invitation) => {
4272
- (0, import_invariant13.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
4314
+ this._handlerFactories.set(import_services11.Invitation.Kind.SPACE, (invitation) => {
4315
+ (0, import_invariant14.invariant)(this.dataSpaceManager, "dataSpaceManager not initialized yet", {
4273
4316
  F: __dxlog_file15,
4274
4317
  L: 228,
4275
4318
  S: this,
@@ -4408,7 +4451,7 @@ var Lock = class {
4408
4451
  }
4409
4452
  async release() {
4410
4453
  await this._onRelease?.();
4411
- (0, import_invariant14.invariant)(this._fileHandle, "Lock is not acquired", {
4454
+ (0, import_invariant15.invariant)(this._fileHandle, "Lock is not acquired", {
4412
4455
  F: __dxlog_file16,
4413
4456
  L: 42,
4414
4457
  S: this,
@@ -4485,7 +4528,7 @@ var DevicesServiceImpl = class {
4485
4528
  next({
4486
4529
  devices: Array.from(deviceKeys.entries()).map(([key, profile]) => ({
4487
4530
  deviceKey: key,
4488
- kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services12.DeviceKind.CURRENT : import_services12.DeviceKind.TRUSTED,
4531
+ kind: this._identityManager.identity?.deviceKey.equals(key) ? import_services13.DeviceKind.CURRENT : import_services13.DeviceKind.TRUSTED,
4489
4532
  profile
4490
4533
  }))
4491
4534
  });
@@ -4600,16 +4643,16 @@ var LoggingServiceImpl = class {
4600
4643
  };
4601
4644
  var matchFilter = (filter, level, path, options) => {
4602
4645
  switch (options) {
4603
- case import_services13.QueryLogsRequest.MatchingOptions.INCLUSIVE:
4646
+ case import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE:
4604
4647
  return level >= filter.level && (!filter.pattern || path.includes(filter.pattern));
4605
- case import_services13.QueryLogsRequest.MatchingOptions.EXPLICIT:
4648
+ case import_services14.QueryLogsRequest.MatchingOptions.EXPLICIT:
4606
4649
  return level === filter.level && (!filter.pattern || path.includes(filter.pattern));
4607
4650
  }
4608
4651
  };
4609
4652
  var shouldLog = (entry2, request) => {
4610
- const options = request.options ?? import_services13.QueryLogsRequest.MatchingOptions.INCLUSIVE;
4653
+ const options = request.options ?? import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE;
4611
4654
  if (request.filters === void 0) {
4612
- return options === import_services13.QueryLogsRequest.MatchingOptions.INCLUSIVE;
4655
+ return options === import_services14.QueryLogsRequest.MatchingOptions.INCLUSIVE;
4613
4656
  } else {
4614
4657
  return request.filters.some((filter) => matchFilter(filter, entry2.level, entry2.meta?.F ?? "", options));
4615
4658
  }
@@ -4625,6 +4668,7 @@ var NetworkServiceImpl = class {
4625
4668
  const update = () => {
4626
4669
  next({
4627
4670
  swarm: this.networkManager.connectionState,
4671
+ connectionInfo: this.networkManager.connectionLog?.swarms,
4628
4672
  signaling: this.signalManager.getStatus().map(({ host, state }) => ({
4629
4673
  server: host,
4630
4674
  state
@@ -4664,11 +4708,14 @@ var SystemServiceImpl = class {
4664
4708
  return {
4665
4709
  timestamp: /* @__PURE__ */ new Date(),
4666
4710
  diagnostics: JSON.parse(JSON.stringify(diagnostics, (0, import_util10.jsonKeyReplacer)({
4667
- truncate: keys === import_services14.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE,
4668
- humanize: keys === import_services14.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE
4711
+ truncate: keys === import_services15.GetDiagnosticsRequest.KEY_OPTION.TRUNCATE,
4712
+ humanize: keys === import_services15.GetDiagnosticsRequest.KEY_OPTION.HUMANIZE
4669
4713
  })))
4670
4714
  };
4671
4715
  }
4716
+ async getPlatform() {
4717
+ return getPlatform();
4718
+ }
4672
4719
  async updateStatus({ status }) {
4673
4720
  await this._onUpdateStatus(status);
4674
4721
  }
@@ -4758,14 +4805,14 @@ var ClientServicesHost = class {
4758
4805
  this._systemService = new SystemServiceImpl({
4759
4806
  config: this._config,
4760
4807
  statusUpdate: this._statusUpdate,
4761
- getCurrentStatus: () => this.isOpen ? import_services11.SystemStatus.ACTIVE : import_services11.SystemStatus.INACTIVE,
4808
+ getCurrentStatus: () => this.isOpen ? import_services12.SystemStatus.ACTIVE : import_services12.SystemStatus.INACTIVE,
4762
4809
  getDiagnostics: () => {
4763
4810
  return createDiagnostics(this._serviceRegistry.services, this._serviceContext, this._config);
4764
4811
  },
4765
4812
  onUpdateStatus: async (status) => {
4766
- if (!this.isOpen && status === import_services11.SystemStatus.ACTIVE) {
4813
+ if (!this.isOpen && status === import_services12.SystemStatus.ACTIVE) {
4767
4814
  await this._resourceLock?.acquire();
4768
- } else if (this.isOpen && status === import_services11.SystemStatus.INACTIVE) {
4815
+ } else if (this.isOpen && status === import_services12.SystemStatus.INACTIVE) {
4769
4816
  await this._resourceLock?.release();
4770
4817
  }
4771
4818
  },
@@ -4803,7 +4850,7 @@ var ClientServicesHost = class {
4803
4850
  * Can only be called once.
4804
4851
  */
4805
4852
  initialize({ config, ...options }) {
4806
- (0, import_invariant15.invariant)(!this._open, "service host is open", {
4853
+ (0, import_invariant16.invariant)(!this._open, "service host is open", {
4807
4854
  F: __dxlog_file17,
4808
4855
  L: 201,
4809
4856
  S: this,
@@ -4819,7 +4866,7 @@ var ClientServicesHost = class {
4819
4866
  C: (f, a) => f(...a)
4820
4867
  });
4821
4868
  if (config) {
4822
- (0, import_invariant15.invariant)(!this._config, "config already set", {
4869
+ (0, import_invariant16.invariant)(!this._config, "config already set", {
4823
4870
  F: __dxlog_file17,
4824
4871
  L: 205,
4825
4872
  S: this,
@@ -4837,7 +4884,7 @@ var ClientServicesHost = class {
4837
4884
  iceServers: this._config?.get("runtime.services.ice")
4838
4885
  }), signalManager = new import_messaging.WebsocketSignalManager(this._config?.get("runtime.services.signaling") ?? []) } = options;
4839
4886
  this._signalManager = signalManager;
4840
- (0, import_invariant15.invariant)(!this._networkManager, "network manager already set", {
4887
+ (0, import_invariant16.invariant)(!this._networkManager, "network manager already set", {
4841
4888
  F: __dxlog_file17,
4842
4889
  L: 221,
4843
4890
  S: this,
@@ -4871,7 +4918,7 @@ var ClientServicesHost = class {
4871
4918
  S: this,
4872
4919
  C: (f, a) => f(...a)
4873
4920
  });
4874
- (0, import_invariant15.invariant)(this._config, "config not set", {
4921
+ (0, import_invariant16.invariant)(this._config, "config not set", {
4875
4922
  F: __dxlog_file17,
4876
4923
  L: 241,
4877
4924
  S: this,
@@ -4880,7 +4927,7 @@ var ClientServicesHost = class {
4880
4927
  "'config not set'"
4881
4928
  ]
4882
4929
  });
4883
- (0, import_invariant15.invariant)(this._storage, "storage not set", {
4930
+ (0, import_invariant16.invariant)(this._storage, "storage not set", {
4884
4931
  F: __dxlog_file17,
4885
4932
  L: 242,
4886
4933
  S: this,
@@ -4889,7 +4936,7 @@ var ClientServicesHost = class {
4889
4936
  "'storage not set'"
4890
4937
  ]
4891
4938
  });
4892
- (0, import_invariant15.invariant)(this._signalManager, "signal manager not set", {
4939
+ (0, import_invariant16.invariant)(this._signalManager, "signal manager not set", {
4893
4940
  F: __dxlog_file17,
4894
4941
  L: 243,
4895
4942
  S: this,
@@ -4898,7 +4945,7 @@ var ClientServicesHost = class {
4898
4945
  "'signal manager not set'"
4899
4946
  ]
4900
4947
  });
4901
- (0, import_invariant15.invariant)(this._networkManager, "network manager not set", {
4948
+ (0, import_invariant16.invariant)(this._networkManager, "network manager not set", {
4902
4949
  F: __dxlog_file17,
4903
4950
  L: 244,
4904
4951
  S: this,
@@ -5057,7 +5104,7 @@ var ClientServicesHost = class {
5057
5104
  });
5058
5105
  } else {
5059
5106
  const automergeIndex = space.automergeSpaceState.rootUrl;
5060
- (0, import_invariant15.invariant)(automergeIndex, void 0, {
5107
+ (0, import_invariant16.invariant)(automergeIndex, void 0, {
5061
5108
  F: __dxlog_file17,
5062
5109
  L: 375,
5063
5110
  S: this,
@@ -5127,4 +5174,4 @@ ClientServicesHost = _ts_decorate8([
5127
5174
  subscribeToSpaces,
5128
5175
  subscribeToSwarmInfo
5129
5176
  });
5130
- //# sourceMappingURL=chunk-Q5PLF45D.cjs.map
5177
+ //# sourceMappingURL=chunk-2I5RUC6N.cjs.map