@dxos/client-services 0.6.10-main.bbdfaa4 → 0.6.10-staging.3cfcc89

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.
@@ -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_JZHOBYSS_exports = {};
30
- __export(chunk_JZHOBYSS_exports, {
29
+ var chunk_R4RSPN2P_exports = {};
30
+ __export(chunk_R4RSPN2P_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -70,7 +70,7 @@ __export(chunk_JZHOBYSS_exports, {
70
70
  subscribeToSpaces: () => subscribeToSpaces,
71
71
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
72
72
  });
73
- module.exports = __toCommonJS(chunk_JZHOBYSS_exports);
73
+ module.exports = __toCommonJS(chunk_R4RSPN2P_exports);
74
74
  var import_async = require("@dxos/async");
75
75
  var import_codec_protobuf = require("@dxos/codec-protobuf");
76
76
  var import_feed_store = require("@dxos/feed-store");
@@ -103,7 +103,7 @@ var import_async5 = require("@dxos/async");
103
103
  var import_context2 = require("@dxos/context");
104
104
  var import_credentials2 = require("@dxos/credentials");
105
105
  var import_log2 = require("@dxos/log");
106
- var import_protocols2 = require("@dxos/protocols");
106
+ var import_proto = require("@dxos/protocols/proto");
107
107
  var import_async6 = require("@dxos/async");
108
108
  var import_client_protocol2 = require("@dxos/client-protocol");
109
109
  var import_credentials3 = require("@dxos/credentials");
@@ -125,7 +125,7 @@ var import_credentials6 = require("@dxos/credentials");
125
125
  var import_invariant3 = require("@dxos/invariant");
126
126
  var import_keys5 = require("@dxos/keys");
127
127
  var import_log5 = require("@dxos/log");
128
- var import_protocols3 = require("@dxos/protocols");
128
+ var import_protocols2 = require("@dxos/protocols");
129
129
  var import_services4 = require("@dxos/protocols/proto/dxos/client/services");
130
130
  var import_credentials7 = require("@dxos/protocols/proto/dxos/halo/credentials");
131
131
  var import_teleport_extension_gossip = require("@dxos/teleport-extension-gossip");
@@ -142,7 +142,7 @@ var import_log6 = require("@dxos/log");
142
142
  var import_services5 = require("@dxos/protocols/proto/dxos/client/services");
143
143
  var import_util5 = require("@dxos/util");
144
144
  var import_invariant5 = require("@dxos/invariant");
145
- var import_protocols4 = require("@dxos/protocols");
145
+ var import_protocols3 = require("@dxos/protocols");
146
146
  var import_services6 = require("@dxos/protocols/proto/dxos/client/services");
147
147
  var import_async9 = require("@dxos/async");
148
148
  var import_client_protocol3 = require("@dxos/client-protocol");
@@ -152,7 +152,7 @@ var import_invariant6 = require("@dxos/invariant");
152
152
  var import_keys6 = require("@dxos/keys");
153
153
  var import_log7 = require("@dxos/log");
154
154
  var import_network_manager = require("@dxos/network-manager");
155
- var import_protocols5 = require("@dxos/protocols");
155
+ var import_protocols4 = require("@dxos/protocols");
156
156
  var import_services7 = require("@dxos/protocols/proto/dxos/client/services");
157
157
  var import_invitations = require("@dxos/protocols/proto/dxos/halo/invitations");
158
158
  var import_invitations2 = require("@dxos/protocols/proto/dxos/halo/invitations");
@@ -162,7 +162,8 @@ var import_async10 = require("@dxos/async");
162
162
  var import_context6 = require("@dxos/context");
163
163
  var import_invariant7 = require("@dxos/invariant");
164
164
  var import_log8 = require("@dxos/log");
165
- var import_protocols6 = require("@dxos/protocols");
165
+ var import_protocols5 = require("@dxos/protocols");
166
+ var import_proto2 = require("@dxos/protocols/proto");
166
167
  var import_invitations3 = require("@dxos/protocols/proto/dxos/halo/invitations");
167
168
  var import_teleport = require("@dxos/teleport");
168
169
  var import_context7 = require("@dxos/context");
@@ -173,7 +174,8 @@ var import_crypto2 = require("@dxos/crypto");
173
174
  var import_invariant8 = require("@dxos/invariant");
174
175
  var import_keys7 = require("@dxos/keys");
175
176
  var import_log9 = require("@dxos/log");
176
- var import_protocols7 = require("@dxos/protocols");
177
+ var import_protocols6 = require("@dxos/protocols");
178
+ var import_proto3 = require("@dxos/protocols/proto");
177
179
  var import_services9 = require("@dxos/protocols/proto/dxos/client/services");
178
180
  var import_invitations4 = require("@dxos/protocols/proto/dxos/halo/invitations");
179
181
  var import_teleport2 = require("@dxos/teleport");
@@ -188,7 +190,7 @@ var import_credentials9 = require("@dxos/credentials");
188
190
  var import_feed_store3 = require("@dxos/feed-store");
189
191
  var import_invariant10 = require("@dxos/invariant");
190
192
  var import_log11 = require("@dxos/log");
191
- var import_protocols8 = require("@dxos/protocols");
193
+ var import_protocols7 = require("@dxos/protocols");
192
194
  var import_services11 = require("@dxos/protocols/proto/dxos/client/services");
193
195
  var import_credentials10 = require("@dxos/protocols/proto/dxos/halo/credentials");
194
196
  var import_async12 = require("@dxos/async");
@@ -214,7 +216,7 @@ var import_context10 = require("@dxos/context");
214
216
  var import_invariant13 = require("@dxos/invariant");
215
217
  var import_keys10 = require("@dxos/keys");
216
218
  var import_log14 = require("@dxos/log");
217
- var import_protocols9 = require("@dxos/protocols");
219
+ var import_protocols8 = require("@dxos/protocols");
218
220
  var import_buf = require("@dxos/protocols/buf");
219
221
  var import_messenger_pb = require("@dxos/protocols/buf/dxos/edge/messenger_pb");
220
222
  var import_util8 = require("@dxos/util");
@@ -227,7 +229,7 @@ var import_echo_protocol = require("@dxos/echo-protocol");
227
229
  var import_invariant14 = require("@dxos/invariant");
228
230
  var import_keys11 = require("@dxos/keys");
229
231
  var import_log15 = require("@dxos/log");
230
- var import_protocols10 = require("@dxos/protocols");
232
+ var import_protocols9 = require("@dxos/protocols");
231
233
  var import_services13 = require("@dxos/protocols/proto/dxos/client/services");
232
234
  var import_credentials13 = require("@dxos/protocols/proto/dxos/halo/credentials");
233
235
  var import_timeframe3 = require("@dxos/timeframe");
@@ -247,7 +249,7 @@ var import_context13 = require("@dxos/context");
247
249
  var import_invariant16 = require("@dxos/invariant");
248
250
  var import_keys12 = require("@dxos/keys");
249
251
  var import_log17 = require("@dxos/log");
250
- var import_protocols11 = require("@dxos/protocols");
252
+ var import_proto4 = require("@dxos/protocols/proto");
251
253
  var import_teleport3 = require("@dxos/teleport");
252
254
  var import_util10 = require("@dxos/util");
253
255
  var import_async17 = require("@dxos/async");
@@ -262,7 +264,7 @@ var import_feed_store4 = require("@dxos/feed-store");
262
264
  var import_invariant17 = require("@dxos/invariant");
263
265
  var import_keys13 = require("@dxos/keys");
264
266
  var import_log18 = require("@dxos/log");
265
- var import_protocols12 = require("@dxos/protocols");
267
+ var import_protocols10 = require("@dxos/protocols");
266
268
  var import_services15 = require("@dxos/protocols/proto/dxos/client/services");
267
269
  var import_credentials16 = require("@dxos/protocols/proto/dxos/halo/credentials");
268
270
  var import_teleport_extension_gossip2 = require("@dxos/teleport-extension-gossip");
@@ -279,7 +281,7 @@ var import_debug5 = require("@dxos/debug");
279
281
  var import_feed_store5 = require("@dxos/feed-store");
280
282
  var import_invariant18 = require("@dxos/invariant");
281
283
  var import_log19 = require("@dxos/log");
282
- var import_protocols13 = require("@dxos/protocols");
284
+ var import_protocols11 = require("@dxos/protocols");
283
285
  var import_services16 = require("@dxos/protocols/proto/dxos/client/services");
284
286
  var import_tracing9 = require("@dxos/tracing");
285
287
  var import_async19 = require("@dxos/async");
@@ -293,12 +295,12 @@ var import_invariant19 = require("@dxos/invariant");
293
295
  var import_keyring = require("@dxos/keyring");
294
296
  var import_keys14 = require("@dxos/keys");
295
297
  var import_log20 = require("@dxos/log");
296
- var import_protocols14 = require("@dxos/protocols");
298
+ var import_protocols12 = require("@dxos/protocols");
297
299
  var import_services17 = require("@dxos/protocols/proto/dxos/client/services");
298
300
  var import_teleport_extension_object_sync = require("@dxos/teleport-extension-object-sync");
299
301
  var import_tracing10 = require("@dxos/tracing");
300
302
  var import_util12 = require("@dxos/util");
301
- var import_protocols15 = require("@dxos/protocols");
303
+ var import_protocols13 = require("@dxos/protocols");
302
304
  var import_config2 = require("@dxos/protocols/proto/dxos/config");
303
305
  var import_random_access_storage = require("@dxos/random-access-storage");
304
306
  var import_client_protocol7 = require("@dxos/client-protocol");
@@ -310,7 +312,7 @@ var import_kv_store = require("@dxos/kv-store");
310
312
  var import_automerge_repo = require("@dxos/automerge/automerge-repo");
311
313
  var import_invariant20 = require("@dxos/invariant");
312
314
  var import_log21 = require("@dxos/log");
313
- var import_protocols16 = require("@dxos/protocols");
315
+ var import_protocols14 = require("@dxos/protocols");
314
316
  var import_util14 = require("@dxos/util");
315
317
  var import_async20 = require("@dxos/async");
316
318
  var import_client_protocol8 = require("@dxos/client-protocol");
@@ -321,7 +323,7 @@ var import_keys16 = require("@dxos/keys");
321
323
  var import_log22 = require("@dxos/log");
322
324
  var import_messaging = require("@dxos/messaging");
323
325
  var import_network_manager2 = require("@dxos/network-manager");
324
- var import_protocols17 = require("@dxos/protocols");
326
+ var import_protocols15 = require("@dxos/protocols");
325
327
  var import_services18 = require("@dxos/protocols/proto/dxos/client/services");
326
328
  var import_tracing11 = require("@dxos/tracing");
327
329
  var import_websocket_rpc = require("@dxos/websocket-rpc");
@@ -385,7 +387,7 @@ var findFeedOwner = (spaceManager, feedKey) => {
385
387
  ].flatMap((space) => [
386
388
  ...space.spaceState.feeds.values()
387
389
  ]).find((feed) => feed.key.equals(feedKey));
388
- import_log.log.info("feeds", {
390
+ (0, import_log.log)("feeds", {
389
391
  feedInfo,
390
392
  key: feedKey.truncate(),
391
393
  allSpaces: spaceManager.spaces.size
@@ -701,7 +703,7 @@ var DevtoolsServiceImpl = class {
701
703
  });
702
704
  }
703
705
  };
704
- var DXOS_VERSION = "0.6.10-main.bbdfaa4";
706
+ var DXOS_VERSION = "0.6.10-staging.3cfcc89";
705
707
  var getPlatform = () => {
706
708
  if (process.browser) {
707
709
  if (typeof window !== "undefined") {
@@ -895,7 +897,7 @@ var findConfigs = () => {
895
897
  return configs.map((r) => r.instance.deref()).filter(import_util2.nonNullable);
896
898
  };
897
899
  var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
898
- var Credential = import_protocols2.schema.getCodecForType("dxos.halo.credentials.Credential");
900
+ var Credential = import_proto.schema.getCodecForType("dxos.halo.credentials.Credential");
899
901
  var createAuthProvider = (signer) => async (nonce) => {
900
902
  const credential = await signer.createCredential({
901
903
  assertion: {
@@ -1274,7 +1276,7 @@ var IdentityManager = class {
1274
1276
  }
1275
1277
  async open(ctx) {
1276
1278
  const traceId = import_keys5.PublicKey.random().toHex();
1277
- import_log5.log.trace("dxos.halo.identity-manager.open", import_protocols3.trace.begin({
1279
+ import_log5.log.trace("dxos.halo.identity-manager.open", import_protocols2.trace.begin({
1278
1280
  id: traceId
1279
1281
  }), {
1280
1282
  F: __dxlog_file7,
@@ -1306,7 +1308,7 @@ var IdentityManager = class {
1306
1308
  });
1307
1309
  this.stateUpdate.emit();
1308
1310
  }
1309
- import_log5.log.trace("dxos.halo.identity-manager.open", import_protocols3.trace.end({
1311
+ import_log5.log.trace("dxos.halo.identity-manager.open", import_protocols2.trace.end({
1310
1312
  id: traceId
1311
1313
  }), {
1312
1314
  F: __dxlog_file7,
@@ -1896,7 +1898,7 @@ var DeviceInvitationProtocol = class {
1896
1898
  try {
1897
1899
  const identity = this._getIdentity();
1898
1900
  if (identity) {
1899
- return new import_protocols4.AlreadyJoinedError("Currently only one identity per client is supported.");
1901
+ return new import_protocols3.AlreadyJoinedError("Currently only one identity per client is supported.");
1900
1902
  }
1901
1903
  } catch {
1902
1904
  }
@@ -1974,17 +1976,17 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1974
1976
  constructor(_invitationFlowMutex, _callbacks) {
1975
1977
  super({
1976
1978
  requested: {
1977
- InvitationHostService: import_protocols6.schema.getService("dxos.halo.invitations.InvitationHostService")
1979
+ InvitationHostService: import_proto2.schema.getService("dxos.halo.invitations.InvitationHostService")
1978
1980
  },
1979
1981
  exposed: {
1980
- InvitationHostService: import_protocols6.schema.getService("dxos.halo.invitations.InvitationHostService")
1982
+ InvitationHostService: import_proto2.schema.getService("dxos.halo.invitations.InvitationHostService")
1981
1983
  }
1982
1984
  });
1983
1985
  this._invitationFlowMutex = _invitationFlowMutex;
1984
1986
  this._callbacks = _callbacks;
1985
1987
  this._ctx = new import_context6.Context(void 0, {
1986
1988
  F: __dxlog_file10,
1987
- L: 33
1989
+ L: 34
1988
1990
  });
1989
1991
  this._remoteOptionsTrigger = new import_async10.Trigger();
1990
1992
  this._invitationFlowLock = null;
@@ -1998,7 +2000,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
1998
2000
  options: async (options) => {
1999
2001
  (0, import_invariant7.invariant)(!this._remoteOptions, "Remote options already set.", {
2000
2002
  F: __dxlog_file10,
2001
- L: 63,
2003
+ L: 64,
2002
2004
  S: this,
2003
2005
  A: [
2004
2006
  "!this._remoteOptions",
@@ -2025,14 +2027,14 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
2025
2027
  try {
2026
2028
  (0, import_log8.log)("guest acquire lock", void 0, {
2027
2029
  F: __dxlog_file10,
2028
- L: 84,
2030
+ L: 85,
2029
2031
  S: this,
2030
2032
  C: (f, a) => f(...a)
2031
2033
  });
2032
2034
  this._invitationFlowLock = await tryAcquireBeforeContextDisposed(this._ctx, this._invitationFlowMutex);
2033
2035
  (0, import_log8.log)("guest lock acquired", void 0, {
2034
2036
  F: __dxlog_file10,
2035
- L: 86,
2037
+ L: 87,
2036
2038
  S: this,
2037
2039
  C: (f, a) => f(...a)
2038
2040
  });
@@ -2041,7 +2043,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
2041
2043
  }));
2042
2044
  (0, import_log8.log)("options sent", void 0, {
2043
2045
  F: __dxlog_file10,
2044
- L: 91,
2046
+ L: 92,
2045
2047
  S: this,
2046
2048
  C: (f, a) => f(...a)
2047
2049
  });
@@ -2050,12 +2052,12 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
2050
2052
  }));
2051
2053
  (0, import_log8.log)("options received", void 0, {
2052
2054
  F: __dxlog_file10,
2053
- L: 93,
2055
+ L: 94,
2054
2056
  S: this,
2055
2057
  C: (f, a) => f(...a)
2056
2058
  });
2057
2059
  if (this._remoteOptions?.role !== import_invitations3.InvitationOptions.Role.HOST) {
2058
- throw new import_protocols6.InvalidInvitationExtensionRoleError(void 0, {
2060
+ throw new import_protocols5.InvalidInvitationExtensionRoleError(void 0, {
2059
2061
  expected: import_invitations3.InvitationOptions.Role.HOST,
2060
2062
  remoteOptions: this._remoteOptions,
2061
2063
  remotePeerId: context.remotePeerId
@@ -2084,7 +2086,7 @@ var InvitationGuestExtension = class extends import_teleport.RpcExtension {
2084
2086
  this._invitationFlowLock = null;
2085
2087
  (0, import_log8.log)("invitation flow lock released", void 0, {
2086
2088
  F: __dxlog_file10,
2087
- L: 126,
2089
+ L: 127,
2088
2090
  S: this,
2089
2091
  C: (f, a) => f(...a)
2090
2092
  });
@@ -2098,17 +2100,17 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2098
2100
  constructor(_invitationFlowMutex, _callbacks) {
2099
2101
  super({
2100
2102
  requested: {
2101
- InvitationHostService: import_protocols7.schema.getService("dxos.halo.invitations.InvitationHostService")
2103
+ InvitationHostService: import_proto3.schema.getService("dxos.halo.invitations.InvitationHostService")
2102
2104
  },
2103
2105
  exposed: {
2104
- InvitationHostService: import_protocols7.schema.getService("dxos.halo.invitations.InvitationHostService")
2106
+ InvitationHostService: import_proto3.schema.getService("dxos.halo.invitations.InvitationHostService")
2105
2107
  }
2106
2108
  });
2107
2109
  this._invitationFlowMutex = _invitationFlowMutex;
2108
2110
  this._callbacks = _callbacks;
2109
2111
  this._ctx = new import_context8.Context(void 0, {
2110
2112
  F: __dxlog_file11,
2111
- L: 52
2113
+ L: 53
2112
2114
  });
2113
2115
  this._remoteOptionsTrigger = new import_async11.Trigger();
2114
2116
  this._challenge = void 0;
@@ -2129,7 +2131,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2129
2131
  options: async (options) => {
2130
2132
  (0, import_invariant8.invariant)(!this._remoteOptions, "Remote options already set.", {
2131
2133
  F: __dxlog_file11,
2132
- L: 101,
2134
+ L: 102,
2133
2135
  S: this,
2134
2136
  A: [
2135
2137
  "!this._remoteOptions",
@@ -2142,11 +2144,11 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2142
2144
  introduce: async (request) => {
2143
2145
  const { profile, invitationId } = request;
2144
2146
  const traceId = import_keys7.PublicKey.random().toHex();
2145
- import_log9.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols7.trace.begin({
2147
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols6.trace.begin({
2146
2148
  id: traceId
2147
2149
  }), {
2148
2150
  F: __dxlog_file11,
2149
- L: 110,
2151
+ L: 111,
2150
2152
  S: this,
2151
2153
  C: (f, a) => f(...a)
2152
2154
  });
@@ -2158,7 +2160,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2158
2160
  actual: invitationId
2159
2161
  }, {
2160
2162
  F: __dxlog_file11,
2161
- L: 116,
2163
+ L: 117,
2162
2164
  S: this,
2163
2165
  C: (f, a) => f(...a)
2164
2166
  });
@@ -2172,18 +2174,18 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2172
2174
  guestProfile: profile
2173
2175
  }, {
2174
2176
  F: __dxlog_file11,
2175
- L: 125,
2177
+ L: 126,
2176
2178
  S: this,
2177
2179
  C: (f, a) => f(...a)
2178
2180
  });
2179
2181
  this.guestProfile = profile;
2180
2182
  this._callbacks.onStateUpdate(import_services9.Invitation.State.READY_FOR_AUTHENTICATION);
2181
2183
  this._challenge = invitation.authMethod === import_services9.Invitation.AuthMethod.KNOWN_PUBLIC_KEY ? (0, import_crypto2.randomBytes)(32) : void 0;
2182
- import_log9.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols7.trace.end({
2184
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.introduce", import_protocols6.trace.end({
2183
2185
  id: traceId
2184
2186
  }), {
2185
2187
  F: __dxlog_file11,
2186
- L: 132,
2188
+ L: 133,
2187
2189
  S: this,
2188
2190
  C: (f, a) => f(...a)
2189
2191
  });
@@ -2194,11 +2196,11 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2194
2196
  },
2195
2197
  authenticate: async ({ authCode: code, signedChallenge }) => {
2196
2198
  const traceId = import_keys7.PublicKey.random().toHex();
2197
- import_log9.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols7.trace.begin({
2199
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols6.trace.begin({
2198
2200
  id: traceId
2199
2201
  }), {
2200
2202
  F: __dxlog_file11,
2201
- L: 141,
2203
+ L: 142,
2202
2204
  S: this,
2203
2205
  C: (f, a) => f(...a)
2204
2206
  });
@@ -2207,7 +2209,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2207
2209
  authCode: code
2208
2210
  }, {
2209
2211
  F: __dxlog_file11,
2210
- L: 144,
2212
+ L: 145,
2211
2213
  S: this,
2212
2214
  C: (f, a) => f(...a)
2213
2215
  });
@@ -2221,7 +2223,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2221
2223
  case import_services9.Invitation.AuthMethod.NONE: {
2222
2224
  (0, import_log9.log)("authentication not required", void 0, {
2223
2225
  F: __dxlog_file11,
2224
- L: 152,
2226
+ L: 153,
2225
2227
  S: this,
2226
2228
  C: (f, a) => f(...a)
2227
2229
  });
@@ -2259,7 +2261,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2259
2261
  authMethod: invitation.authMethod
2260
2262
  }, {
2261
2263
  F: __dxlog_file11,
2262
- L: 190,
2264
+ L: 191,
2263
2265
  S: this,
2264
2266
  C: (f, a) => f(...a)
2265
2267
  });
@@ -2277,14 +2279,14 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2277
2279
  status
2278
2280
  };
2279
2281
  }
2280
- import_log9.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols7.trace.end({
2282
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.authenticate", import_protocols6.trace.end({
2281
2283
  id: traceId,
2282
2284
  data: {
2283
2285
  status
2284
2286
  }
2285
2287
  }), {
2286
2288
  F: __dxlog_file11,
2287
- L: 202,
2289
+ L: 203,
2288
2290
  S: this,
2289
2291
  C: (f, a) => f(...a)
2290
2292
  });
@@ -2294,11 +2296,11 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2294
2296
  },
2295
2297
  admit: async (request) => {
2296
2298
  const traceId = import_keys7.PublicKey.random().toHex();
2297
- import_log9.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols7.trace.begin({
2299
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols6.trace.begin({
2298
2300
  id: traceId
2299
2301
  }), {
2300
2302
  F: __dxlog_file11,
2301
- L: 208,
2303
+ L: 209,
2302
2304
  S: this,
2303
2305
  C: (f, a) => f(...a)
2304
2306
  });
@@ -2311,11 +2313,11 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2311
2313
  }
2312
2314
  }
2313
2315
  const response = await this._callbacks.admit(request);
2314
- import_log9.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols7.trace.end({
2316
+ import_log9.log.trace("dxos.sdk.invitation-handler.host.admit", import_protocols6.trace.end({
2315
2317
  id: traceId
2316
2318
  }), {
2317
2319
  F: __dxlog_file11,
2318
- L: 222,
2320
+ L: 223,
2319
2321
  S: this,
2320
2322
  C: (f, a) => f(...a)
2321
2323
  });
@@ -2333,14 +2335,14 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2333
2335
  try {
2334
2336
  (0, import_log9.log)("host acquire lock", void 0, {
2335
2337
  F: __dxlog_file11,
2336
- L: 237,
2338
+ L: 238,
2337
2339
  S: this,
2338
2340
  C: (f, a) => f(...a)
2339
2341
  });
2340
2342
  this._invitationFlowLock = await tryAcquireBeforeContextDisposed(this._ctx, this._invitationFlowMutex);
2341
2343
  (0, import_log9.log)("host lock acquired", void 0, {
2342
2344
  F: __dxlog_file11,
2343
- L: 239,
2345
+ L: 240,
2344
2346
  S: this,
2345
2347
  C: (f, a) => f(...a)
2346
2348
  });
@@ -2351,7 +2353,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2351
2353
  });
2352
2354
  (0, import_log9.log)("options sent", void 0, {
2353
2355
  F: __dxlog_file11,
2354
- L: 243,
2356
+ L: 244,
2355
2357
  S: this,
2356
2358
  C: (f, a) => f(...a)
2357
2359
  });
@@ -2360,13 +2362,13 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2360
2362
  }));
2361
2363
  (0, import_log9.log)("options received", void 0, {
2362
2364
  F: __dxlog_file11,
2363
- L: 245,
2365
+ L: 246,
2364
2366
  S: this,
2365
2367
  C: (f, a) => f(...a)
2366
2368
  });
2367
2369
  if (this._remoteOptions?.role !== import_invitations4.InvitationOptions.Role.GUEST) {
2368
2370
  this._callbacks.onStateUpdate(lastState);
2369
- throw new import_protocols7.InvalidInvitationExtensionRoleError(void 0, {
2371
+ throw new import_protocols6.InvalidInvitationExtensionRoleError(void 0, {
2370
2372
  expected: import_invitations4.InvitationOptions.Role.GUEST,
2371
2373
  remoteOptions: this._remoteOptions,
2372
2374
  remotePeerId: context.remotePeerId
@@ -2414,7 +2416,7 @@ var InvitationHostExtension = class extends import_teleport2.RpcExtension {
2414
2416
  this._invitationFlowLock = null;
2415
2417
  (0, import_log9.log)("invitation flow lock released", void 0, {
2416
2418
  F: __dxlog_file11,
2417
- L: 300,
2419
+ L: 301,
2418
2420
  S: this,
2419
2421
  C: (f, a) => f(...a)
2420
2422
  });
@@ -2546,7 +2548,7 @@ var InvitationsHandler = class {
2546
2548
  (0, import_async9.scheduleTask)(connectionCtx, async () => {
2547
2549
  const traceId = import_keys6.PublicKey.random().toHex();
2548
2550
  try {
2549
- import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols5.trace.begin({
2551
+ import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.begin({
2550
2552
  id: traceId
2551
2553
  }), {
2552
2554
  F: __dxlog_file13,
@@ -2576,7 +2578,7 @@ var InvitationsHandler = class {
2576
2578
  });
2577
2579
  guardedState.set(extension, import_services7.Invitation.State.SUCCESS);
2578
2580
  metrics.increment("dxos.invitation.success");
2579
- import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols5.trace.end({
2581
+ import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.end({
2580
2582
  id: traceId
2581
2583
  }), {
2582
2584
  F: __dxlog_file13,
@@ -2612,7 +2614,7 @@ var InvitationsHandler = class {
2612
2614
  });
2613
2615
  }
2614
2616
  }
2615
- import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols5.trace.error({
2617
+ import_log7.log.trace("dxos.sdk.invitations-handler.host.onOpen", import_protocols4.trace.error({
2616
2618
  id: traceId,
2617
2619
  error: err
2618
2620
  }), {
@@ -2626,7 +2628,7 @@ var InvitationsHandler = class {
2626
2628
  });
2627
2629
  },
2628
2630
  onError: (err) => {
2629
- if (err instanceof import_protocols5.InvalidInvitationExtensionRoleError) {
2631
+ if (err instanceof import_protocols4.InvalidInvitationExtensionRoleError) {
2630
2632
  (0, import_log7.log)("invalid role", {
2631
2633
  ...err.context
2632
2634
  }, {
@@ -2751,7 +2753,7 @@ var InvitationsHandler = class {
2751
2753
  (0, import_async9.scheduleTask)(connectionCtx, async () => {
2752
2754
  const traceId = import_keys6.PublicKey.random().toHex();
2753
2755
  try {
2754
- import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols5.trace.begin({
2756
+ import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.begin({
2755
2757
  id: traceId
2756
2758
  }), {
2757
2759
  F: __dxlog_file13,
@@ -2831,7 +2833,7 @@ var InvitationsHandler = class {
2831
2833
  ...result,
2832
2834
  state: import_services7.Invitation.State.SUCCESS
2833
2835
  });
2834
- import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols5.trace.end({
2836
+ import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.end({
2835
2837
  id: traceId
2836
2838
  }), {
2837
2839
  F: __dxlog_file13,
@@ -2860,7 +2862,7 @@ var InvitationsHandler = class {
2860
2862
  guardedState.error(extension, err);
2861
2863
  }
2862
2864
  extensionCtx.close(err);
2863
- import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols5.trace.error({
2865
+ import_log7.log.trace("dxos.sdk.invitations-handler.guest.onOpen", import_protocols4.trace.error({
2864
2866
  id: traceId,
2865
2867
  error: err
2866
2868
  }), {
@@ -2873,7 +2875,7 @@ var InvitationsHandler = class {
2873
2875
  });
2874
2876
  },
2875
2877
  onError: (err) => {
2876
- if (err instanceof import_protocols5.InvalidInvitationExtensionRoleError) {
2878
+ if (err instanceof import_protocols4.InvalidInvitationExtensionRoleError) {
2877
2879
  return;
2878
2880
  }
2879
2881
  if (err instanceof import_async9.TimeoutError) {
@@ -3219,14 +3221,14 @@ var SpaceInvitationProtocol = class {
3219
3221
  }
3220
3222
  checkCanInviteNewMembers() {
3221
3223
  if (this._spaceKey == null) {
3222
- return new import_protocols8.InvalidInvitationError("No spaceKey was provided for a space invitation.");
3224
+ return new import_protocols7.InvalidInvitationError("No spaceKey was provided for a space invitation.");
3223
3225
  }
3224
3226
  const space = this._spaceManager.spaces.get(this._spaceKey);
3225
3227
  if (space == null) {
3226
- return new import_protocols8.SpaceNotFoundError(this._spaceKey);
3228
+ return new import_protocols7.SpaceNotFoundError(this._spaceKey);
3227
3229
  }
3228
3230
  if (!space?.inner.spaceState.hasMembershipManagementPermission(this._signingContext.identityKey)) {
3229
- return new import_protocols8.AuthorizationError("No member management permission.");
3231
+ return new import_protocols7.AuthorizationError("No member management permission.");
3230
3232
  }
3231
3233
  return void 0;
3232
3234
  }
@@ -3387,10 +3389,10 @@ var SpaceInvitationProtocol = class {
3387
3389
  }
3388
3390
  checkInvitation(invitation) {
3389
3391
  if (invitation.spaceKey == null) {
3390
- return new import_protocols8.InvalidInvitationError("No spaceKey was provided for a space invitation.");
3392
+ return new import_protocols7.InvalidInvitationError("No spaceKey was provided for a space invitation.");
3391
3393
  }
3392
3394
  if (this._spaceManager.spaces.has(invitation.spaceKey)) {
3393
- return new import_protocols8.AlreadyJoinedError("Already joined space.");
3395
+ return new import_protocols7.AlreadyJoinedError("Already joined space.");
3394
3396
  }
3395
3397
  }
3396
3398
  createIntroduction() {
@@ -3441,7 +3443,7 @@ var SpaceInvitationProtocol = class {
3441
3443
  ]
3442
3444
  });
3443
3445
  if (this._spaceManager.spaces.has(assertion.spaceKey)) {
3444
- throw new import_protocols8.AlreadyJoinedError("Already joined space.");
3446
+ throw new import_protocols7.AlreadyJoinedError("Already joined space.");
3445
3447
  }
3446
3448
  await this._spaceManager.acceptSpace({
3447
3449
  spaceKey: assertion.spaceKey,
@@ -4024,7 +4026,7 @@ var EdgeFeedReplicator = class extends import_context10.Resource {
4024
4026
  return;
4025
4027
  }
4026
4028
  const [service, ...rest] = message.serviceId.split(":");
4027
- if (service !== import_protocols9.EdgeService.FEED_REPLICATOR) {
4029
+ if (service !== import_protocols8.EdgeService.FEED_REPLICATOR) {
4028
4030
  return;
4029
4031
  }
4030
4032
  const [spaceId] = rest;
@@ -4124,7 +4126,7 @@ var EdgeFeedReplicator = class extends import_context10.Resource {
4124
4126
  identityKey: this._messenger.identityKey,
4125
4127
  peerKey: this._messenger.peerKey
4126
4128
  },
4127
- serviceId: `${import_protocols9.EdgeService.FEED_REPLICATOR}:${this._spaceId}`,
4129
+ serviceId: `${import_protocols8.EdgeService.FEED_REPLICATOR}:${this._spaceId}`,
4128
4130
  payload: {
4129
4131
  value: payloadValue
4130
4132
  }
@@ -4736,10 +4738,10 @@ var NotarizationTeleportExtension = class extends import_teleport3.RpcExtension
4736
4738
  constructor(_params) {
4737
4739
  super({
4738
4740
  requested: {
4739
- NotarizationService: import_protocols11.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
4741
+ NotarizationService: import_proto4.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
4740
4742
  },
4741
4743
  exposed: {
4742
- NotarizationService: import_protocols11.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
4744
+ NotarizationService: import_proto4.schema.getService("dxos.mesh.teleport.notarization.NotarizationService")
4743
4745
  }
4744
4746
  });
4745
4747
  this._params = _params;
@@ -5008,7 +5010,7 @@ var DataSpace = class {
5008
5010
  this.metrics.pipelineInitBegin = /* @__PURE__ */ new Date();
5009
5011
  await this.initializeDataPipeline();
5010
5012
  } catch (err) {
5011
- if (err instanceof import_protocols10.CancelledError || err instanceof import_context11.ContextDisposedError) {
5013
+ if (err instanceof import_protocols9.CancelledError || err instanceof import_context11.ContextDisposedError) {
5012
5014
  (0, import_log15.log)("data pipeline initialization cancelled", err, {
5013
5015
  F: __dxlog_file20,
5014
5016
  L: 297,
@@ -5041,7 +5043,7 @@ var DataSpace = class {
5041
5043
  }
5042
5044
  async initializeDataPipeline() {
5043
5045
  if (this._state !== import_services13.SpaceState.SPACE_CONTROL_ONLY) {
5044
- throw new import_protocols10.SystemError("Invalid operation");
5046
+ throw new import_protocols9.SystemError("Invalid operation");
5045
5047
  }
5046
5048
  this._state = import_services13.SpaceState.SPACE_INITIALIZING;
5047
5049
  (0, import_log15.log)("new state", {
@@ -5476,7 +5478,7 @@ var DataSpaceManager = class extends import_context14.Resource {
5476
5478
  S: this,
5477
5479
  C: (f, a) => f(...a)
5478
5480
  });
5479
- import_log18.log.trace("dxos.echo.data-space-manager.open", import_protocols12.trace.begin({
5481
+ import_log18.log.trace("dxos.echo.data-space-manager.open", import_protocols10.trace.begin({
5480
5482
  id: this._instanceId
5481
5483
  }), {
5482
5484
  F: __dxlog_file21,
@@ -5516,7 +5518,7 @@ var DataSpaceManager = class extends import_context14.Resource {
5516
5518
  }
5517
5519
  });
5518
5520
  this.updated.emit();
5519
- import_log18.log.trace("dxos.echo.data-space-manager.open", import_protocols12.trace.end({
5521
+ import_log18.log.trace("dxos.echo.data-space-manager.open", import_protocols10.trace.end({
5520
5522
  id: this._instanceId
5521
5523
  }), {
5522
5524
  F: __dxlog_file21,
@@ -5707,7 +5709,7 @@ var DataSpaceManager = class extends import_context14.Resource {
5707
5709
  ]
5708
5710
  });
5709
5711
  if (space.spaceState.getMemberRole(options.identityKey) !== import_credentials16.SpaceMember.Role.REMOVED) {
5710
- throw new import_protocols12.AlreadyJoinedError();
5712
+ throw new import_protocols10.AlreadyJoinedError();
5711
5713
  }
5712
5714
  const credentials = await (0, import_credentials15.createAdmissionCredentials)(this._signingContext.credentialSigner, options.identityKey, space.key, space.genesisFeedKey, options.role, space.spaceState.membershipChainHeads, options.profile, options.delegationCredentialId);
5713
5715
  (0, import_invariant17.invariant)(credentials[0].credential, void 0, {
@@ -6035,7 +6037,7 @@ var SpacesServiceImpl = class {
6035
6037
  }
6036
6038
  async updateSpace({ spaceKey, state }) {
6037
6039
  const dataSpaceManager = await this._getDataSpaceManager();
6038
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6040
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6039
6041
  if (state) {
6040
6042
  switch (state) {
6041
6043
  case import_services16.SpaceState.SPACE_ACTIVE:
@@ -6045,7 +6047,7 @@ var SpacesServiceImpl = class {
6045
6047
  await space.deactivate();
6046
6048
  break;
6047
6049
  default:
6048
- throw new import_protocols13.ApiError("Invalid space state");
6050
+ throw new import_protocols11.ApiError("Invalid space state");
6049
6051
  }
6050
6052
  }
6051
6053
  }
@@ -6053,10 +6055,10 @@ var SpacesServiceImpl = class {
6053
6055
  const identity = this._requireIdentity();
6054
6056
  const space = this._spaceManager.spaces.get(request.spaceKey);
6055
6057
  if (space == null) {
6056
- throw new import_protocols13.SpaceNotFoundError(request.spaceKey);
6058
+ throw new import_protocols11.SpaceNotFoundError(request.spaceKey);
6057
6059
  }
6058
6060
  if (!space.spaceState.hasMembershipManagementPermission(identity.identityKey)) {
6059
- throw new import_protocols13.AuthorizationError("No member management permission.", {
6061
+ throw new import_protocols11.AuthorizationError("No member management permission.", {
6060
6062
  spaceKey: space.key,
6061
6063
  role: space.spaceState.getMemberRole(identity.identityKey)
6062
6064
  });
@@ -6140,14 +6142,14 @@ var SpacesServiceImpl = class {
6140
6142
  }
6141
6143
  async postMessage({ spaceKey, channel, message }) {
6142
6144
  const dataSpaceManager = await this._getDataSpaceManager();
6143
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6145
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6144
6146
  await space.postMessage(getChannelId(channel), message);
6145
6147
  }
6146
6148
  subscribeMessages({ spaceKey, channel }) {
6147
6149
  return new import_codec_protobuf11.Stream(({ ctx, next }) => {
6148
6150
  (0, import_async18.scheduleTask)(ctx, async () => {
6149
6151
  const dataSpaceManager = await this._getDataSpaceManager();
6150
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6152
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6151
6153
  const handle = space.listen(getChannelId(channel), (message) => {
6152
6154
  next(message);
6153
6155
  });
@@ -6157,7 +6159,7 @@ var SpacesServiceImpl = class {
6157
6159
  }
6158
6160
  queryCredentials({ spaceKey, noTail }) {
6159
6161
  return new import_codec_protobuf11.Stream(({ ctx, next, close }) => {
6160
- const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6162
+ const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6161
6163
  const processor = {
6162
6164
  processCredential: async (credential) => {
6163
6165
  next(credential);
@@ -6173,7 +6175,7 @@ var SpacesServiceImpl = class {
6173
6175
  });
6174
6176
  }
6175
6177
  async writeCredentials({ spaceKey, credentials }) {
6176
- const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6178
+ const space = this._spaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6177
6179
  for (const credential of credentials ?? []) {
6178
6180
  if (credential.proof) {
6179
6181
  await space.controlPipeline.writer.write({
@@ -6224,7 +6226,7 @@ var SpacesServiceImpl = class {
6224
6226
  }
6225
6227
  async createEpoch({ spaceKey, migration, automergeRootUrl }) {
6226
6228
  const dataSpaceManager = await this._getDataSpaceManager();
6227
- const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols13.SpaceNotFoundError(spaceKey));
6229
+ const space = dataSpaceManager.spaces.get(spaceKey) ?? (0, import_debug5.raise)(new import_protocols11.SpaceNotFoundError(spaceKey));
6228
6230
  const result = await space.createEpoch({
6229
6231
  migration,
6230
6232
  newAutomergeRoot: automergeRootUrl
@@ -6292,7 +6294,7 @@ var SpacesServiceImpl = class {
6292
6294
  id: space.id,
6293
6295
  spaceKey: space.key,
6294
6296
  state: space.state,
6295
- error: space.error ? (0, import_protocols13.encodeError)(space.error) : void 0,
6297
+ error: space.error ? (0, import_protocols11.encodeError)(space.error) : void 0,
6296
6298
  pipeline: {
6297
6299
  currentEpoch: space.automergeSpaceState.lastEpoch,
6298
6300
  appliedEpoch: space.automergeSpaceState.lastEpoch,
@@ -6330,7 +6332,7 @@ var SpacesServiceImpl = class {
6330
6332
  }
6331
6333
  _requireIdentity() {
6332
6334
  if (!this._identityManager.identity) {
6333
- throw new import_protocols13.IdentityNotInitializedError("This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo");
6335
+ throw new import_protocols11.IdentityNotInitializedError("This device has no HALO identity available. See https://docs.dxos.org/guide/platform/halo");
6334
6336
  }
6335
6337
  return this._identityManager.identity;
6336
6338
  }
@@ -6441,7 +6443,7 @@ var ServiceContext = class extends import_context15.Resource {
6441
6443
  S: this,
6442
6444
  C: (f, a) => f(...a)
6443
6445
  });
6444
- import_log20.log.trace("dxos.sdk.service-context.open", import_protocols14.trace.begin({
6446
+ import_log20.log.trace("dxos.sdk.service-context.open", import_protocols12.trace.begin({
6445
6447
  id: this._instanceId
6446
6448
  }), {
6447
6449
  F: __dxlog_file23,
@@ -6474,7 +6476,7 @@ var ServiceContext = class extends import_context15.Resource {
6474
6476
  S: this,
6475
6477
  C: (f, a) => f(...a)
6476
6478
  });
6477
- import_log20.log.trace("dxos.sdk.service-context.open", import_protocols14.trace.end({
6479
+ import_log20.log.trace("dxos.sdk.service-context.open", import_protocols12.trace.end({
6478
6480
  id: this._instanceId
6479
6481
  }), {
6480
6482
  F: __dxlog_file23,
@@ -6554,8 +6556,8 @@ var ServiceContext = class extends import_context15.Resource {
6554
6556
  }
6555
6557
  async _checkStorageVersion() {
6556
6558
  await this.metadataStore.load();
6557
- if (this.metadataStore.version !== import_protocols14.STORAGE_VERSION) {
6558
- throw new import_protocols14.InvalidStorageVersionError(import_protocols14.STORAGE_VERSION, this.metadataStore.version);
6559
+ if (this.metadataStore.version !== import_protocols12.STORAGE_VERSION) {
6560
+ throw new import_protocols12.InvalidStorageVersionError(import_protocols12.STORAGE_VERSION, this.metadataStore.version);
6559
6561
  }
6560
6562
  }
6561
6563
  // Called when identity is created.
@@ -6709,16 +6711,16 @@ var StorageDriver = import_config2.Runtime.Client.Storage.StorageDriver;
6709
6711
  var createStorageObjects = (config) => {
6710
6712
  const { persistent = false, keyStore, dataStore } = config ?? {};
6711
6713
  if (persistent && dataStore === StorageDriver.RAM) {
6712
- throw new import_protocols15.InvalidConfigError("RAM storage cannot be used in persistent mode.");
6714
+ throw new import_protocols13.InvalidConfigError("RAM storage cannot be used in persistent mode.");
6713
6715
  }
6714
6716
  if (!persistent && dataStore !== void 0 && dataStore !== StorageDriver.RAM) {
6715
- throw new import_protocols15.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
6717
+ throw new import_protocols13.InvalidConfigError("Cannot use a persistent storage in not persistent mode.");
6716
6718
  }
6717
6719
  if (persistent && keyStore === StorageDriver.RAM) {
6718
- throw new import_protocols15.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
6720
+ throw new import_protocols13.InvalidConfigError("RAM key storage cannot be used in persistent mode.");
6719
6721
  }
6720
6722
  if (!persistent && keyStore !== StorageDriver.RAM && keyStore !== void 0) {
6721
- throw new import_protocols15.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
6723
+ throw new import_protocols13.InvalidConfigError("Cannot use a persistent key storage in not persistent mode.");
6722
6724
  }
6723
6725
  return {
6724
6726
  storage: (0, import_random_access_storage.createStorage)({
@@ -6780,7 +6782,7 @@ var exportProfileData = async ({ storage, level }) => {
6780
6782
  const { size } = await file.stat();
6781
6783
  const data = await file.read(0, size);
6782
6784
  archive.storage.push({
6783
- type: import_protocols16.ProfileArchiveEntryType.FILE,
6785
+ type: import_protocols14.ProfileArchiveEntryType.FILE,
6784
6786
  key: filename,
6785
6787
  value: data
6786
6788
  });
@@ -6808,7 +6810,7 @@ var exportProfileData = async ({ storage, level }) => {
6808
6810
  let count = 0;
6809
6811
  for await (const [key, value] of iter) {
6810
6812
  archive.storage.push({
6811
- type: import_protocols16.ProfileArchiveEntryType.KEY_VALUE,
6813
+ type: import_protocols14.ProfileArchiveEntryType.KEY_VALUE,
6812
6814
  key,
6813
6815
  value
6814
6816
  });
@@ -6830,7 +6832,7 @@ var importProfileData = async ({ storage, level }, archive) => {
6830
6832
  let count = 0;
6831
6833
  for (const entry2 of archive.storage) {
6832
6834
  switch (entry2.type) {
6833
- case import_protocols16.ProfileArchiveEntryType.FILE: {
6835
+ case import_protocols14.ProfileArchiveEntryType.FILE: {
6834
6836
  const directory = await storage.createDirectory();
6835
6837
  (0, import_invariant20.invariant)(typeof entry2.key === "string", "Invalid key type", {
6836
6838
  F: __dxlog_file24,
@@ -6855,7 +6857,7 @@ var importProfileData = async ({ storage, level }, archive) => {
6855
6857
  await file.close();
6856
6858
  break;
6857
6859
  }
6858
- case import_protocols16.ProfileArchiveEntryType.KEY_VALUE: {
6860
+ case import_protocols14.ProfileArchiveEntryType.KEY_VALUE: {
6859
6861
  (0, import_invariant20.invariant)(entry2.key instanceof Uint8Array, "Invalid key type", {
6860
6862
  F: __dxlog_file24,
6861
6863
  L: 87,
@@ -7443,7 +7445,7 @@ var ClientServicesHost = class {
7443
7445
  return;
7444
7446
  }
7445
7447
  const traceId = import_keys16.PublicKey.random().toHex();
7446
- import_log22.log.trace("dxos.client-services.host.open", import_protocols17.trace.begin({
7448
+ import_log22.log.trace("dxos.client-services.host.open", import_protocols15.trace.begin({
7447
7449
  id: traceId
7448
7450
  }), {
7449
7451
  F: __dxlog_file26,
@@ -7552,7 +7554,7 @@ var ClientServicesHost = class {
7552
7554
  S: this,
7553
7555
  C: (f, a) => f(...a)
7554
7556
  });
7555
- import_log22.log.trace("dxos.client-services.host.open", import_protocols17.trace.end({
7557
+ import_log22.log.trace("dxos.client-services.host.open", import_protocols15.trace.end({
7556
7558
  id: traceId
7557
7559
  }), {
7558
7560
  F: __dxlog_file26,
@@ -7595,7 +7597,7 @@ var ClientServicesHost = class {
7595
7597
  }
7596
7598
  async reset() {
7597
7599
  const traceId = import_keys16.PublicKey.random().toHex();
7598
- import_log22.log.trace("dxos.sdk.client-services-host.reset", import_protocols17.trace.begin({
7600
+ import_log22.log.trace("dxos.sdk.client-services-host.reset", import_protocols15.trace.begin({
7599
7601
  id: traceId
7600
7602
  }), {
7601
7603
  F: __dxlog_file26,
@@ -7617,7 +7619,7 @@ var ClientServicesHost = class {
7617
7619
  S: this,
7618
7620
  C: (f, a) => f(...a)
7619
7621
  });
7620
- import_log22.log.trace("dxos.sdk.client-services-host.reset", import_protocols17.trace.end({
7622
+ import_log22.log.trace("dxos.sdk.client-services-host.reset", import_protocols15.trace.end({
7621
7623
  id: traceId
7622
7624
  }), {
7623
7625
  F: __dxlog_file26,
@@ -7694,4 +7696,4 @@ ClientServicesHost = _ts_decorate8([
7694
7696
  subscribeToSpaces,
7695
7697
  subscribeToSwarmInfo
7696
7698
  });
7697
- //# sourceMappingURL=chunk-JZHOBYSS.cjs.map
7699
+ //# sourceMappingURL=chunk-R4RSPN2P.cjs.map